Skip to content

Commit eab49c2

Browse files
authored
[LinearSystem] support BTD matrix in CompositeLinearSystem (#6201)
support BTD matrix in CompositeLinearSystem
1 parent 3d38f2f commit eab49c2

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

Sofa/Component/LinearSystem/src/sofa/component/linearsystem/CompositeLinearSystem.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@
2222
#include <sofa/component/linearsystem/CompositeLinearSystem.inl>
2323
#include <sofa/core/ObjectFactory.h>
2424

25-
#include <sofa/linearalgebra/FullMatrix.h>
25+
#include <sofa/linearalgebra/BTDMatrix.h>
26+
#include <sofa/linearalgebra/BlockDiagonalMatrix.h>
27+
#include <sofa/linearalgebra/BlockVector.h>
2628
#include <sofa/linearalgebra/CompressedRowSparseMatrix.h>
27-
#include <sofa/linearalgebra/SparseMatrix.h>
2829
#include <sofa/linearalgebra/DiagonalMatrix.h>
30+
#include <sofa/linearalgebra/FullMatrix.h>
2931
#include <sofa/linearalgebra/RotationMatrix.h>
30-
#include <sofa/linearalgebra/BlockDiagonalMatrix.h>
32+
#include <sofa/linearalgebra/SparseMatrix.h>
3133

3234
namespace sofa::component::linearsystem
3335
{
@@ -45,6 +47,7 @@ template class SOFA_COMPONENT_LINEARSYSTEM_API CompositeLinearSystem< Compressed
4547
template class SOFA_COMPONENT_LINEARSYSTEM_API CompositeLinearSystem< DiagonalMatrix<SReal>, FullVector<SReal> >;
4648
template class SOFA_COMPONENT_LINEARSYSTEM_API CompositeLinearSystem< BlockDiagonalMatrix<3,SReal>, FullVector<SReal> >;
4749
template class SOFA_COMPONENT_LINEARSYSTEM_API CompositeLinearSystem< RotationMatrix<SReal>, FullVector<SReal> >;
50+
template class SOFA_COMPONENT_LINEARSYSTEM_API CompositeLinearSystem< BTDMatrix<6, SReal>, BlockVector<6, SReal> >;
4851

4952
void registerCompositeLinearSystem(sofa::core::ObjectFactory* factory)
5053
{
@@ -59,7 +62,9 @@ void registerCompositeLinearSystem(sofa::core::ObjectFactory* factory)
5962
.add<CompositeLinearSystem< CompressedRowSparseMatrix<type::Mat<8, 8, SReal> >, FullVector<SReal> > >()
6063
.add<CompositeLinearSystem< DiagonalMatrix<SReal>, FullVector<SReal> > >()
6164
.add<CompositeLinearSystem< BlockDiagonalMatrix<3, SReal>, FullVector<SReal> > >()
62-
.add<CompositeLinearSystem< RotationMatrix<SReal>, FullVector<SReal> > >());
65+
.add<CompositeLinearSystem< RotationMatrix<SReal>, FullVector<SReal> > >()
66+
.add<CompositeLinearSystem< BTDMatrix<6, SReal>, BlockVector<6, SReal> > >()
67+
);
6368
}
6469

6570
}

0 commit comments

Comments
 (0)