FEDEM Solver
R8.0
Source code of the dynamics solver
|
Unit testing for the linear FE solver. More...
Classes | |
struct | Case |
Struct with parameters to instantiate particular units tests over. More... | |
class | Solve |
Class describing a unit test instance. More... | |
Functions | |
int | ffl_loadPart (const std::string &) |
From FFlLinkHandler_F.C. More... | |
int | solvePartDis (int, const int *, double *) |
From reducerInterface.C. More... | |
void | initSolverArgs (int, char **, bool, bool) |
From reducerInterface.C. More... | |
void | freeSingeltons () |
From reducerInterface.C. More... | |
int | main (int argc, char **argv) |
Main program for the FE solver unit test executable. More... | |
std::ostream & | operator<< (std::ostream &os, const Case &c) |
Global stream operator to print out a Case instance. More... | |
TEST_P (Solve, FEmodel) | |
INSTANTIATE_TEST_CASE_P (TestBeams, Solve, testing::Values(Case{ "01_1D_BeamElements.nas", 1251, 0.0, 0.0128, 0.0 }, Case{ "02_1D2D_Hybrid.nas", 1259, 0.0, 0.0129, 0.0 }, Case{ "03_2D_ShellElements.nas", 29358, 0.0, 0.0123, 0.0 }, Case{ "04_3D_VolumeElements.nas", 1257, 0.0, 0.0128, 0.0 }, Case{ "L-beam.nas", 3, 0.00806403, 0.330873, -0.0302335 }, Case{ "CylinderBeam.nas", 6, 0.0, 0.3450, 0.0 }, Case{ "CylinderBeam-generic.nas", 6, 0.0, 0.3450, 0.0 }, Case{ "CylinderBeam-shearY.nas", 6, 0.3434, 0.3450, 0.0 }, Case{ "CylinderBeam-noshear.nas", 6, 0.0, 0.3434, 0.0 })) | |
Variables | |
static std::string | srcdir |
Full path of the source directory of this test. More... | |
Unit testing for the linear FE solver.
The purpose of this file is to provide some unit/regression tests for various FE models, on a low level. It also covers parsing of Nastran bulk data files containing the FE model definition. For each model, the linear- elastic stiffness matrix is assembled, and solved for some external load (defined in the FE data file). Then the response at one node is compared against the reference values (u_x, u_y, u_z).
int ffl_loadPart | ( | const std::string & | ) |
From FFlLinkHandler_F.C.
void freeSingeltons | ( | ) |
From reducerInterface.C.
void initSolverArgs | ( | int | , |
char ** | , | ||
bool | , | ||
bool | |||
) |
From reducerInterface.C.
INSTANTIATE_TEST_CASE_P | ( | TestBeams | , |
Solve | , | ||
testing::Values(Case{ "01_1D_BeamElements.nas", 1251, 0.0, 0.0128, 0.0 }, Case{ "02_1D2D_Hybrid.nas", 1259, 0.0, 0.0129, 0.0 }, Case{ "03_2D_ShellElements.nas", 29358, 0.0, 0.0123, 0.0 }, Case{ "04_3D_VolumeElements.nas", 1257, 0.0, 0.0128, 0.0 }, Case{ "L-beam.nas", 3, 0.00806403, 0.330873, -0.0302335 }, Case{ "CylinderBeam.nas", 6, 0.0, 0.3450, 0.0 }, Case{ "CylinderBeam-generic.nas", 6, 0.0, 0.3450, 0.0 }, Case{ "CylinderBeam-shearY.nas", 6, 0.3434, 0.3450, 0.0 }, Case{ "CylinderBeam-noshear.nas", 6, 0.0, 0.3434, 0.0 }) | |||
) |
Instantiate the test over a list of file names, node for which to extract displacements, and associated reference values to compare with.
int main | ( | int | argc, |
char ** | argv | ||
) |
Main program for the FE solver unit test executable.
std::ostream& operator<< | ( | std::ostream & | os, |
const Case & | c | ||
) |
Global stream operator to print out a Case instance.
int solvePartDis | ( | int | , |
const int * | , | ||
double * | |||
) |
From reducerInterface.C.
TEST_P | ( | Solve | , |
FEmodel | |||
) |
Creates a parameterized test reading a FE data file, solving it, and comparing the nodal response with given reference values. GetParam() will return a Case instance, with the actual file name, node number and displacement values at that node to compare the response against.
|
static |
Full path of the source directory of this test.