SOFA API  651e7a3a
Open source framework for multi-physics simuation
sofa::component::linearsystem Namespace Reference

Classes

class  BaseMatrixProjectionMethod
 
class  CompositeLinearSystem
 
class  SparsityPatternLocalMatrix
 
class  SparsityPatternLocalMappedMatrix
 
class  ConstantSparsityPatternSystem
 
struct  CheckNoChangeInInsertionOrder
 Check that the incoming rows and columns are expected by the constant sparsity pattern. More...
 
class  ConstantSparsityProjectionMethod
 
struct  CreateMatrixDispatcher
 
struct  LinearSystemData
 
struct  MappedMassMatrixObserver
 
class  ComponentGroupsVisitor
 
class  MappingGraph
 
class  MappingJacobians
 
class  AssemblingMappedMatrixAccumulator
 
class  AssemblingMatrixAccumulator
 
class  BaseAssemblingMatrixAccumulator
 
class  ConstantLocalMappedMatrix
 
class  ConstantLocalMatrix
 
class  MatrixFreeSystem
 
struct  LocalMatrixMaps
 
class  MatrixLinearSystem
 
struct  GroupOfComponentsAssociatedToAPairOfMechanicalStates
 
class  MatrixProjectionMethod
 
class  TypedMatrixLinearSystem
 
class  AssembleGlobalVectorFromLocalVectorVisitor
 
class  DispatchFromGlobalVectorToLocalVectorVisitor
 

Typedefs

using StrategyCheckerType = sofa::core::matrixaccumulator::CompositeIndexVerificationStrategy< core::matrixaccumulator::RangeVerification, CheckNoChangeInInsertionOrder >
 
template<class TReal >
using LocalMappedMatrixType = sofa::linearalgebra::CompressedRowSparseMatrix< TReal >
 

Functions

void init ()
 
SOFA_COMPONENT_LINEARSYSTEM_API void initExternalModule ()
 
SOFA_COMPONENT_LINEARSYSTEM_API const chargetModuleName ()
 
SOFA_COMPONENT_LINEARSYSTEM_API const chargetModuleVersion ()
 
SOFA_COMPONENT_LINEARSYSTEM_API const chargetModuleLicense ()
 
SOFA_COMPONENT_LINEARSYSTEM_API const chargetModuleDescription ()
 
SOFA_COMPONENT_LINEARSYSTEM_API const chargetModuleComponentList ()
 
std::ostream & operator<< (std::ostream &os, const GroupOfComponentsAssociatedToAPairOfMechanicalStates &group)
 
sofa::type::vector< core::behavior::BaseMechanicalState * > retrieveAssociatedMechanicalState (const sofa::core::behavior::StateAccessor *component)
 
sofa::type::vector< core::behavior::BaseMechanicalState * > retrieveAssociatedMechanicalState (BaseMapping *component)
 
auto generatePairs (const sofa::type::vector< core::behavior::BaseMechanicalState * > &mstates) -> sofa::type::vector< sofa::type::fixed_array< core::behavior::BaseMechanicalState *, 2 > >
 Generate all possible pairs of Mechanical States from a list of Mechanical States. More...
 
template<core::matrixaccumulator::Contribution c>
void configureCreatedMatrixComponent (typename BaseAssemblingMatrixAccumulator< c >::SPtr mat, typename BaseAssemblingMatrixAccumulator< c >::ComponentType *object, const SReal factor, bool printLog)
 
template<class BlockType >
void computeProjection (const Eigen::Map< Eigen::SparseMatrix< BlockType, Eigen::RowMajor > > KMap, const sofa::type::fixed_array< std::shared_ptr< linearalgebra::CompressedRowSparseMatrix< BlockType >>, 2 > J, Eigen::SparseMatrix< BlockType, Eigen::RowMajor > &JT_K_J)
 
template<class BlockType >
void addToGlobalMatrix (linearalgebra::BaseMatrix *globalMatrix, Eigen::SparseMatrix< BlockType, Eigen::RowMajor > JT_K_J, const type::Vec2u positionInGlobalMatrix)
 

Variables

int AssemblingMatrixLinearSystemBTDClass
 
template struct SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API LinearSystemData< GraphScatteredMatrix, GraphScatteredVector >
 
int MatrixFreeSystemClass
 
template class SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API MatrixFreeSystem< GraphScatteredMatrix, GraphScatteredVector >
 
template class SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API TypedMatrixLinearSystem< GraphScatteredMatrix, GraphScatteredVector >
 
template class SOFA_COMPONENT_LINEARSYSTEM_API CompositeLinearSystem< FullMatrix< SReal >, FullVector< SReal > >
 
template class SOFA_COMPONENT_LINEARSYSTEM_API CompositeLinearSystem< SparseMatrix< SReal >, FullVector< SReal > >
 
template class SOFA_COMPONENT_LINEARSYSTEM_API CompositeLinearSystem< CompressedRowSparseMatrix< SReal >, FullVector< SReal > >
 
template class SOFA_COMPONENT_LINEARSYSTEM_API CompositeLinearSystem< DiagonalMatrix< SReal >, FullVector< SReal > >
 
template class SOFA_COMPONENT_LINEARSYSTEM_API CompositeLinearSystem< BlockDiagonalMatrix< 3, SReal >, FullVector< SReal > >
 
template class SOFA_COMPONENT_LINEARSYSTEM_API CompositeLinearSystem< RotationMatrix< SReal >, FullVector< SReal > >
 
int CompositeLinearSystemClass
 
int ConstantSparsityPatternSystemClass
 
int ConstantSparsityProjectionMethodClass
 
template struct SOFA_COMPONENT_LINEARSYSTEM_API MappedMassMatrixObserver< SReal >
 
template class SOFA_COMPONENT_LINEARSYSTEM_API MatrixLinearSystem< FullMatrix< SReal >, FullVector< SReal > >
 
template class SOFA_COMPONENT_LINEARSYSTEM_API MatrixLinearSystem< SparseMatrix< SReal >, FullVector< SReal > >
 
template class SOFA_COMPONENT_LINEARSYSTEM_API MatrixLinearSystem< CompressedRowSparseMatrix< SReal >, FullVector< SReal > >
 
template class SOFA_COMPONENT_LINEARSYSTEM_API MatrixLinearSystem< DiagonalMatrix< SReal >, FullVector< SReal > >
 
template class SOFA_COMPONENT_LINEARSYSTEM_API MatrixLinearSystem< BlockDiagonalMatrix< 3, SReal >, FullVector< SReal > >
 
template class SOFA_COMPONENT_LINEARSYSTEM_API MatrixLinearSystem< RotationMatrix< SReal >, FullVector< SReal > >
 
int AssemblingMatrixLinearSystemClass
 
int EigenMatrixMappingClass
 
template class SOFA_COMPONENT_LINEARSYSTEM_API TypedMatrixLinearSystem< FullMatrix< double >, FullVector< double > >
 
template class SOFA_COMPONENT_LINEARSYSTEM_API TypedMatrixLinearSystem< FullMatrix< float >, FullVector< float > >
 
template class SOFA_COMPONENT_LINEARSYSTEM_API TypedMatrixLinearSystem< SparseMatrix< double >, FullVector< double > >
 
template class SOFA_COMPONENT_LINEARSYSTEM_API TypedMatrixLinearSystem< SparseMatrix< float >, FullVector< float > >
 
template class SOFA_COMPONENT_LINEARSYSTEM_API TypedMatrixLinearSystem< CompressedRowSparseMatrix< double >, FullVector< double > >
 
template class SOFA_COMPONENT_LINEARSYSTEM_API TypedMatrixLinearSystem< CompressedRowSparseMatrix< float >, FullVector< float > >
 
template class SOFA_COMPONENT_LINEARSYSTEM_API TypedMatrixLinearSystem< DiagonalMatrix< double >, FullVector< double > >
 
template class SOFA_COMPONENT_LINEARSYSTEM_API TypedMatrixLinearSystem< DiagonalMatrix< float >, FullVector< float > >
 
template class SOFA_COMPONENT_LINEARSYSTEM_API TypedMatrixLinearSystem< BlockDiagonalMatrix< 3, double >, FullVector< double > >
 
template class SOFA_COMPONENT_LINEARSYSTEM_API TypedMatrixLinearSystem< BlockDiagonalMatrix< 3, float >, FullVector< float > >
 
template class SOFA_COMPONENT_LINEARSYSTEM_API TypedMatrixLinearSystem< RotationMatrix< double >, FullVector< double > >
 
template class SOFA_COMPONENT_LINEARSYSTEM_API TypedMatrixLinearSystem< RotationMatrix< float >, FullVector< float > >
 

Typedef Documentation

◆ LocalMappedMatrixType

◆ StrategyCheckerType

The strategy used to check the incoming rows and columns is a combination of: 1) checking if the indices are in the authorized submatrix (range) 2) checking if the indices comply with the initial sparsity pattern

Function Documentation

◆ addToGlobalMatrix()

template<class BlockType >
void sofa::component::linearsystem::addToGlobalMatrix ( linearalgebra::BaseMatrix globalMatrix,
Eigen::SparseMatrix< BlockType, Eigen::RowMajor >  JT_K_J,
const type::Vec2u  positionInGlobalMatrix 
)

◆ computeProjection()

template<class BlockType >
void sofa::component::linearsystem::computeProjection ( const Eigen::Map< Eigen::SparseMatrix< BlockType, Eigen::RowMajor > >  KMap,
const sofa::type::fixed_array< std::shared_ptr< linearalgebra::CompressedRowSparseMatrix< BlockType >>, 2 >  J,
Eigen::SparseMatrix< BlockType, Eigen::RowMajor > &  JT_K_J 
)

◆ configureCreatedMatrixComponent()

template<core::matrixaccumulator::Contribution c>
void sofa::component::linearsystem::configureCreatedMatrixComponent ( typename BaseAssemblingMatrixAccumulator< c >::SPtr  mat,
typename BaseAssemblingMatrixAccumulator< c >::ComponentType *  object,
const SReal  factor,
bool  printLog 
)

Generic function to configure a local matrix and associate it to a component

◆ generatePairs()

auto sofa::component::linearsystem::generatePairs ( const sofa::type::vector< core::behavior::BaseMechanicalState * > &  mstates) -> sofa::type::vector<sofa::type::fixed_array<core::behavior::BaseMechanicalState*, 2> >
inline

Generate all possible pairs of Mechanical States from a list of Mechanical States.

◆ getModuleComponentList()

const char * sofa::component::linearsystem::getModuleComponentList ( )

◆ getModuleDescription()

const char * sofa::component::linearsystem::getModuleDescription ( )

◆ getModuleLicense()

const char * sofa::component::linearsystem::getModuleLicense ( )

◆ getModuleName()

const char * sofa::component::linearsystem::getModuleName ( )

◆ getModuleVersion()

const char * sofa::component::linearsystem::getModuleVersion ( )

◆ init()

void SOFA_COMPONENT_LINEARSYSTEM_API sofa::component::linearsystem::init ( )

◆ initExternalModule()

void sofa::component::linearsystem::initExternalModule ( )

◆ operator<<()

std::ostream& sofa::component::linearsystem::operator<< ( std::ostream &  os,
const GroupOfComponentsAssociatedToAPairOfMechanicalStates group 
)
inline

◆ retrieveAssociatedMechanicalState() [1/2]

sofa::type::vector<core::behavior::BaseMechanicalState*> sofa::component::linearsystem::retrieveAssociatedMechanicalState ( BaseMapping component)
inline

◆ retrieveAssociatedMechanicalState() [2/2]

sofa::type::vector<core::behavior::BaseMechanicalState*> sofa::component::linearsystem::retrieveAssociatedMechanicalState ( const sofa::core::behavior::StateAccessor component)
inline

Variable Documentation

◆ AssemblingMatrixLinearSystemBTDClass

int sofa::component::linearsystem::AssemblingMatrixLinearSystemBTDClass
Initial value:
= core::RegisterObject("Linear system")
.add<MatrixLinearSystem< linearalgebra::BTDMatrix<6, SReal>, linearalgebra::BlockVector<6, SReal> > >()

◆ AssemblingMatrixLinearSystemClass

int sofa::component::linearsystem::AssemblingMatrixLinearSystemClass
Initial value:
= core::RegisterObject("Linear system")
.add<MatrixLinearSystem< FullMatrix<SReal>, FullVector<SReal> > >()
.add<MatrixLinearSystem< SparseMatrix<SReal>, FullVector<SReal> > >()
.add<MatrixLinearSystem< CompressedRowSparseMatrix<SReal>, FullVector<SReal> > >(true)
.add<MatrixLinearSystem< CompressedRowSparseMatrix<type::Mat<2,2,SReal> >, FullVector<SReal> > >()
.add<MatrixLinearSystem< CompressedRowSparseMatrix<type::Mat<3,3,SReal> >, FullVector<SReal> > >()
.add<MatrixLinearSystem< CompressedRowSparseMatrix<type::Mat<4,4,SReal> >, FullVector<SReal> > >()
.add<MatrixLinearSystem< CompressedRowSparseMatrix<type::Mat<6,6,SReal> >, FullVector<SReal> > >()
.add<MatrixLinearSystem< CompressedRowSparseMatrix<type::Mat<8,8,SReal> >, FullVector<SReal> > >()

◆ CompositeLinearSystem< BlockDiagonalMatrix< 3, SReal >, FullVector< SReal > >

template class SOFA_COMPONENT_LINEARSYSTEM_API sofa::component::linearsystem::CompositeLinearSystem< BlockDiagonalMatrix< 3, SReal >, FullVector< SReal > >

◆ CompositeLinearSystem< CompressedRowSparseMatrix< SReal >, FullVector< SReal > >

template class SOFA_COMPONENT_LINEARSYSTEM_API sofa::component::linearsystem::CompositeLinearSystem< CompressedRowSparseMatrix< SReal >, FullVector< SReal > >

◆ CompositeLinearSystem< DiagonalMatrix< SReal >, FullVector< SReal > >

template class SOFA_COMPONENT_LINEARSYSTEM_API sofa::component::linearsystem::CompositeLinearSystem< DiagonalMatrix< SReal >, FullVector< SReal > >

◆ CompositeLinearSystem< FullMatrix< SReal >, FullVector< SReal > >

template class SOFA_COMPONENT_LINEARSYSTEM_API sofa::component::linearsystem::CompositeLinearSystem< FullMatrix< SReal >, FullVector< SReal > >

◆ CompositeLinearSystem< RotationMatrix< SReal >, FullVector< SReal > >

template class SOFA_COMPONENT_LINEARSYSTEM_API sofa::component::linearsystem::CompositeLinearSystem< RotationMatrix< SReal >, FullVector< SReal > >

◆ CompositeLinearSystem< SparseMatrix< SReal >, FullVector< SReal > >

template class SOFA_COMPONENT_LINEARSYSTEM_API sofa::component::linearsystem::CompositeLinearSystem< SparseMatrix< SReal >, FullVector< SReal > >

◆ CompositeLinearSystemClass

int sofa::component::linearsystem::CompositeLinearSystemClass
Initial value:
= sofa::core::RegisterObject("Component acting like a linear system, but delegates the linear system functionalities to a list of real linear systems")
.add<CompositeLinearSystem< FullMatrix<SReal>, FullVector<SReal> > >()
.add<CompositeLinearSystem< SparseMatrix<SReal>, FullVector<SReal> > >()
.add<CompositeLinearSystem< CompressedRowSparseMatrix<SReal>, FullVector<SReal> > >()
.add<CompositeLinearSystem< CompressedRowSparseMatrix<type::Mat<2,2,SReal> >, FullVector<SReal> > >()
.add<CompositeLinearSystem< CompressedRowSparseMatrix<type::Mat<3,3,SReal> >, FullVector<SReal> > >()
.add<CompositeLinearSystem< CompressedRowSparseMatrix<type::Mat<4,4,SReal> >, FullVector<SReal> > >()
.add<CompositeLinearSystem< CompressedRowSparseMatrix<type::Mat<6,6,SReal> >, FullVector<SReal> > >()
.add<CompositeLinearSystem< CompressedRowSparseMatrix<type::Mat<8,8,SReal> >, FullVector<SReal> > >()
.add<CompositeLinearSystem< DiagonalMatrix<SReal>, FullVector<SReal> > >()
.add<CompositeLinearSystem< BlockDiagonalMatrix<3,SReal>, FullVector<SReal> > >()
.add<CompositeLinearSystem< RotationMatrix<SReal>, FullVector<SReal> > >()
Helper class used to register a class in the ObjectFactory.
Definition: ObjectFactory.h:295
RegisterObject & add(bool defaultTemplate=false)
Definition: ObjectFactory.h:329

◆ ConstantSparsityPatternSystemClass

int sofa::component::linearsystem::ConstantSparsityPatternSystemClass
Initial value:
= core::RegisterObject("Linear system taking advantage of the constant sparsity pattern of the global matrix to speed up the matrix assembly. Do not use if sparsity pattern is not constant (topological changes, ...).")
.add<ConstantSparsityPatternSystem<linearalgebra::CompressedRowSparseMatrix<SReal>, linearalgebra::FullVector<SReal>>>()

◆ ConstantSparsityProjectionMethodClass

int sofa::component::linearsystem::ConstantSparsityProjectionMethodClass
Initial value:
= core::RegisterObject("Matrix mapping computing the matrix projection taking advantage of the constant sparsity pattern")
.add< ConstantSparsityProjectionMethod<sofa::linearalgebra::CompressedRowSparseMatrix<SReal> > >(true)

◆ EigenMatrixMappingClass

int sofa::component::linearsystem::EigenMatrixMappingClass
Initial value:
= core::RegisterObject("Matrix mapping computing the matrix projection using the Eigen library")
.add< MatrixProjectionMethod<sofa::linearalgebra::CompressedRowSparseMatrix<SReal> > >(true)

◆ LinearSystemData< GraphScatteredMatrix, GraphScatteredVector >

template struct SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API sofa::component::linearsystem::LinearSystemData< GraphScatteredMatrix, GraphScatteredVector >

◆ MappedMassMatrixObserver< SReal >

template struct SOFA_COMPONENT_LINEARSYSTEM_API sofa::component::linearsystem::MappedMassMatrixObserver< SReal >

◆ MatrixFreeSystem< GraphScatteredMatrix, GraphScatteredVector >

template class SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API sofa::component::linearsystem::MatrixFreeSystem< GraphScatteredMatrix, GraphScatteredVector >
extern

◆ MatrixFreeSystemClass

int sofa::component::linearsystem::MatrixFreeSystemClass
Initial value:
= core::RegisterObject("Matrix-free linear system")
.add< MatrixFreeSystem<GraphScatteredMatrix, GraphScatteredVector> >()

◆ MatrixLinearSystem< BlockDiagonalMatrix< 3, SReal >, FullVector< SReal > >

template class SOFA_COMPONENT_LINEARSYSTEM_API sofa::component::linearsystem::MatrixLinearSystem< BlockDiagonalMatrix< 3, SReal >, FullVector< SReal > >

◆ MatrixLinearSystem< CompressedRowSparseMatrix< SReal >, FullVector< SReal > >

template class SOFA_COMPONENT_LINEARSYSTEM_API sofa::component::linearsystem::MatrixLinearSystem< CompressedRowSparseMatrix< SReal >, FullVector< SReal > >

◆ MatrixLinearSystem< DiagonalMatrix< SReal >, FullVector< SReal > >

template class SOFA_COMPONENT_LINEARSYSTEM_API sofa::component::linearsystem::MatrixLinearSystem< DiagonalMatrix< SReal >, FullVector< SReal > >

◆ MatrixLinearSystem< FullMatrix< SReal >, FullVector< SReal > >

template class SOFA_COMPONENT_LINEARSYSTEM_API sofa::component::linearsystem::MatrixLinearSystem< FullMatrix< SReal >, FullVector< SReal > >

◆ MatrixLinearSystem< RotationMatrix< SReal >, FullVector< SReal > >

template class SOFA_COMPONENT_LINEARSYSTEM_API sofa::component::linearsystem::MatrixLinearSystem< RotationMatrix< SReal >, FullVector< SReal > >

◆ MatrixLinearSystem< SparseMatrix< SReal >, FullVector< SReal > >

template class SOFA_COMPONENT_LINEARSYSTEM_API sofa::component::linearsystem::MatrixLinearSystem< SparseMatrix< SReal >, FullVector< SReal > >

◆ TypedMatrixLinearSystem< BlockDiagonalMatrix< 3, double >, FullVector< double > >

template class SOFA_COMPONENT_LINEARSYSTEM_API sofa::component::linearsystem::TypedMatrixLinearSystem< BlockDiagonalMatrix< 3, double >, FullVector< double > >

◆ TypedMatrixLinearSystem< BlockDiagonalMatrix< 3, float >, FullVector< float > >

template class SOFA_COMPONENT_LINEARSYSTEM_API sofa::component::linearsystem::TypedMatrixLinearSystem< BlockDiagonalMatrix< 3, float >, FullVector< float > >

◆ TypedMatrixLinearSystem< CompressedRowSparseMatrix< double >, FullVector< double > >

template class SOFA_COMPONENT_LINEARSYSTEM_API sofa::component::linearsystem::TypedMatrixLinearSystem< CompressedRowSparseMatrix< double >, FullVector< double > >

◆ TypedMatrixLinearSystem< CompressedRowSparseMatrix< float >, FullVector< float > >

◆ TypedMatrixLinearSystem< DiagonalMatrix< double >, FullVector< double > >

template class SOFA_COMPONENT_LINEARSYSTEM_API sofa::component::linearsystem::TypedMatrixLinearSystem< DiagonalMatrix< double >, FullVector< double > >

◆ TypedMatrixLinearSystem< DiagonalMatrix< float >, FullVector< float > >

template class SOFA_COMPONENT_LINEARSYSTEM_API sofa::component::linearsystem::TypedMatrixLinearSystem< DiagonalMatrix< float >, FullVector< float > >

◆ TypedMatrixLinearSystem< FullMatrix< double >, FullVector< double > >

template class SOFA_COMPONENT_LINEARSYSTEM_API sofa::component::linearsystem::TypedMatrixLinearSystem< FullMatrix< double >, FullVector< double > >

◆ TypedMatrixLinearSystem< FullMatrix< float >, FullVector< float > >

template class SOFA_COMPONENT_LINEARSYSTEM_API sofa::component::linearsystem::TypedMatrixLinearSystem< FullMatrix< float >, FullVector< float > >

◆ TypedMatrixLinearSystem< GraphScatteredMatrix, GraphScatteredVector >

template class SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API sofa::component::linearsystem::TypedMatrixLinearSystem< GraphScatteredMatrix, GraphScatteredVector >

◆ TypedMatrixLinearSystem< RotationMatrix< double >, FullVector< double > >

template class SOFA_COMPONENT_LINEARSYSTEM_API sofa::component::linearsystem::TypedMatrixLinearSystem< RotationMatrix< double >, FullVector< double > >

◆ TypedMatrixLinearSystem< RotationMatrix< float >, FullVector< float > >

template class SOFA_COMPONENT_LINEARSYSTEM_API sofa::component::linearsystem::TypedMatrixLinearSystem< RotationMatrix< float >, FullVector< float > >

◆ TypedMatrixLinearSystem< SparseMatrix< double >, FullVector< double > >

template class SOFA_COMPONENT_LINEARSYSTEM_API sofa::component::linearsystem::TypedMatrixLinearSystem< SparseMatrix< double >, FullVector< double > >

◆ TypedMatrixLinearSystem< SparseMatrix< float >, FullVector< float > >

template class SOFA_COMPONENT_LINEARSYSTEM_API sofa::component::linearsystem::TypedMatrixLinearSystem< SparseMatrix< float >, FullVector< float > >