SOFA API  1c8b807d
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 parameter 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
 
template<typename DataTypes >
using Coord_t = typename DataTypes::Coord
 
template<typename DataTypes >
using Real_t = typename DataTypes::Real
 
template<typename DataTypes >
using VecReal_t = typename DataTypes::VecReal
 
template<typename DataTypes >
using Deriv_t = typename DataTypes::Deriv
 
template<typename DataTypes >
using MatrixDeriv_t = typename DataTypes::MatrixDeriv
 
template<typename DataTypes >
using VecCoord_t = typename DataTypes::VecCoord
 
template<typename DataTypes >
using VecDeriv_t = typename DataTypes::VecDeriv
 
template<typename DataTypes >
using DataVecCoord_t = core::objectmodel::Data< VecCoord_t< DataTypes > >
 
template<typename DataTypes >
using DataVecDeriv_t = core::objectmodel::Data< VecDeriv_t< DataTypes > >
 
template<typename DataTypes >
using DataMatrixDeriv_t = core::objectmodel::Data< MatrixDeriv_t< DataTypes > >
 

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 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

◆ Coord_t

template<typename DataTypes >
using sofa::Coord_t = typedef typename DataTypes::Coord

◆ DataMatrixDeriv_t

template<typename DataTypes >
using sofa::DataMatrixDeriv_t = typedef core::objectmodel::Data<MatrixDeriv_t<DataTypes> >

◆ DataTypes

typedef Types< Vec3Types > sofa::DataTypes

◆ DataVecCoord_t

template<typename DataTypes >
using sofa::DataVecCoord_t = typedef core::objectmodel::Data<VecCoord_t<DataTypes> >

◆ DataVecDeriv_t

template<typename DataTypes >
using sofa::DataVecDeriv_t = typedef core::objectmodel::Data<VecDeriv_t<DataTypes> >

◆ Deriv_t

template<typename DataTypes >
using sofa::Deriv_t = typedef typename DataTypes::Deriv

◆ MatrixDeriv_t

template<typename DataTypes >
using sofa::MatrixDeriv_t = typedef typename DataTypes::MatrixDeriv

◆ MechanicalObject3

◆ Real_t

template<typename DataTypes >
using sofa::Real_t = typedef typename DataTypes::Real

◆ VecCoord_t

template<typename DataTypes >
using sofa::VecCoord_t = typedef typename DataTypes::VecCoord

◆ VecDeriv_t

template<typename DataTypes >
using sofa::VecDeriv_t = typedef typename DataTypes::VecDeriv

◆ VecReal_t

template<typename DataTypes >
using sofa::VecReal_t = typedef typename DataTypes::VecReal

Function Documentation

◆ convertSPtr()

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

Converts a BaseMatrix to a eigen sparse matrix encapsulated 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.

◆ 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}