SOFA API  1a4bb3e7
Open source framework for multi-physics simuation
sofa Namespace Reference

Namespaces

 collision_test
 
 component
 
 core
 
 defaulttype
 
 framework
 
 geometry
 
 gl
 Forward declaration.
 
 gui
 
 helper
 
 linearalgebra
 
 mapping_test
 
 simpleapi
 
 simulation
 
 testing
 
 topology
 
 type
 for std::pair
 

Classes

class  TestDataEngine
 
struct  DataEngine_test
 Helper for writing DataEngine tests. More...
 
struct  MultiMapping_test
 Base class for the MultiMapping tests, directly adapted from Mapping_test. More...
 
struct  AffinePatch_sofa_test
 
struct  CylinderTractionStruct
 Structure which contains the nodes and the pointers useful for the cylindertraction test. More...
 
struct  LinearElasticity_test
 
struct  ForceField_test
 Helper for writing ForceField tests. The constructor creates a root node and adds it a State and a ForceField (of the paremeter type of this template class). Pointers to node, state and force are available. Deriving the ForceField test from this class makes it easy to write: just call function run_test with positions, velocities and the corresponding expected forces. This function automatically checks not only the forces (function addForce), but also the stiffness (methods addDForce and addKToMatrix), using finite differences. More...
 
struct  PatchTestStruct
 Structure which contains the nodes and the pointers useful for the patch test. More...
 
class  TemplateAliasTest
 
struct  AdvancedTimerTest
 
struct  DefaultAnimationLoop_test
 

Typedefs

typedef Types< Vec3TypesDataTypes
 
typedef component::statecontainer::MechanicalObject< defaulttype::Vec3TypesMechanicalObject3
 

Functions

 TYPED_TEST_SUITE (AffinePatch_sofa_test, DataTypes)
 
 TYPED_TEST (AffinePatch_sofa_test, patchTest2D)
 
 TYPED_TEST (AffinePatch_sofa_test, patchTest3D)
 
template<typename DataTypes >
CylinderTractionStruct< DataTypescreateCylinderTractionScene (int resolutionCircumferential, int resolutionRadial, int resolutionHeight, int maxIter)
 
 TYPED_TEST_SUITE (LinearElasticity_test, DataTypes)
 
 TYPED_TEST (LinearElasticity_test, testTractionTensorMass)
 
 TYPED_TEST (LinearElasticity_test, testTractionCorotational)
 
template<class DataTypes >
PatchTestStruct< DataTypescreateRegularGridScene (simulation::Node::SPtr root, typename DataTypes::Coord startPoint, typename DataTypes::Coord endPoint, int numX, int numY, int numZ, sofa::type::Vec< 6, SReal > entireBoxRoi, sofa::type::Vec< 6, SReal > inclusiveBox, sofa::type::Vec< 6, SReal > includedBox)
 Create a scene with a regular grid and an affine constraint for patch test. More...
 
SOFA_EXPORT_DYNAMIC_LIBRARY void initSofaCompat ()
 
SOFA_EXPORT_DYNAMIC_LIBRARY void initSofaConfig ()
 
 TEST_F (TemplateAliasTest, Register)
 
 TEST_F (AdvancedTimerTest, IsEnabled)
 
 TEST_F (AdvancedTimerTest, SetOutputType)
 
 TEST_F (AdvancedTimerTest, End)
 
template<class mat >
helper::OwnershipSPtr< mat > convertSPtr (const linearalgebra::BaseMatrix *m)
 
 TEST_F (DefaultAnimationLoop_test, testOneStep)
 

Variables

const double pressureArray [] = {0.6, 0.2, -0.2, -0.6}
 
const size_t sizePressureArray = sizeof(pressureArray)/sizeof(pressureArray[0])
 
const double youngModulusArray [] = {1.0,2.0}
 
const size_t sizeYoungModulusArray = sizeof(youngModulusArray)/sizeof(youngModulusArray[0])
 
const double poissonRatioArray [] = {0.0,0.3,0.49}
 
const size_t sizePoissonRatioArray = sizeof(poissonRatioArray)/sizeof(poissonRatioArray[0])
 

Typedef Documentation

◆ DataTypes

typedef Types< Vec3Types > sofa::DataTypes

◆ MechanicalObject3

Function Documentation

◆ convertSPtr()

template<class mat >
helper::OwnershipSPtr<mat> sofa::convertSPtr ( const linearalgebra::BaseMatrix m)

Converts a BaseMatrix to a eigen sparse matrix encapsulted in a OwnershipSPtr. It the conversion needs to create a temporary matrix, it will be automatically deleted by the OwnershipSPtr (with ownership). It the conversion did not create a temporary data, and points to an existing matrix, the OwnershipSPtr does not take the ownership and won't delete anything. @TODO move this somewhere else?

Author
Matthieu Nesme

◆ createCylinderTractionScene()

template<typename DataTypes >
CylinderTractionStruct<DataTypes> sofa::createCylinderTractionScene ( int  resolutionCircumferential,
int  resolutionRadial,
int  resolutionHeight,
int  maxIter 
)

◆ createRegularGridScene()

template<class DataTypes >
PatchTestStruct<DataTypes> sofa::createRegularGridScene ( simulation::Node::SPtr  root,
typename DataTypes::Coord  startPoint,
typename DataTypes::Coord  endPoint,
int  numX,
int  numY,
int  numZ,
sofa::type::Vec< 6, SReal >  entireBoxRoi,
sofa::type::Vec< 6, SReal >  inclusiveBox,
sofa::type::Vec< 6, SReal >  includedBox 
)

Create a scene with a regular grid and an affine constraint for patch test.

◆ initSofaCompat()

SOFA_EXPORT_DYNAMIC_LIBRARY void sofa::initSofaCompat ( )

◆ initSofaConfig()

SOFA_EXPORT_DYNAMIC_LIBRARY void sofa::initSofaConfig ( )

◆ TEST_F() [1/5]

sofa::TEST_F ( AdvancedTimerTest  ,
End   
)

◆ TEST_F() [2/5]

sofa::TEST_F ( AdvancedTimerTest  ,
IsEnabled   
)

◆ TEST_F() [3/5]

sofa::TEST_F ( AdvancedTimerTest  ,
SetOutputType   
)

◆ TEST_F() [4/5]

sofa::TEST_F ( DefaultAnimationLoop_test  ,
testOneStep   
)

◆ TEST_F() [5/5]

sofa::TEST_F ( TemplateAliasTest  ,
Register   
)

◆ TYPED_TEST() [1/4]

sofa::TYPED_TEST ( AffinePatch_sofa_test  ,
patchTest2D   
)

◆ TYPED_TEST() [2/4]

sofa::TYPED_TEST ( AffinePatch_sofa_test  ,
patchTest3D   
)

◆ TYPED_TEST() [3/4]

sofa::TYPED_TEST ( LinearElasticity_test  ,
testTractionCorotational   
)

◆ TYPED_TEST() [4/4]

sofa::TYPED_TEST ( LinearElasticity_test  ,
testTractionTensorMass   
)

◆ TYPED_TEST_SUITE() [1/2]

sofa::TYPED_TEST_SUITE ( AffinePatch_sofa_test  ,
DataTypes   
)

◆ TYPED_TEST_SUITE() [2/2]

sofa::TYPED_TEST_SUITE ( LinearElasticity_test  ,
DataTypes   
)

Variable Documentation

◆ poissonRatioArray

const double sofa::poissonRatioArray[] = {0.0,0.3,0.49}

◆ pressureArray

const double sofa::pressureArray[] = {0.6, 0.2, -0.2, -0.6}

◆ sizePoissonRatioArray

const size_t sofa::sizePoissonRatioArray = sizeof(poissonRatioArray)/sizeof(poissonRatioArray[0])

◆ sizePressureArray

const size_t sofa::sizePressureArray = sizeof(pressureArray)/sizeof(pressureArray[0])

◆ sizeYoungModulusArray

const size_t sofa::sizeYoungModulusArray = sizeof(youngModulusArray)/sizeof(youngModulusArray[0])

◆ youngModulusArray

const double sofa::youngModulusArray[] = {1.0,2.0}