16 #ifndef SURGSIM_PHYSICS_FEMELEMENT_INL_H
17 #define SURGSIM_PHYSICS_FEMELEMENT_INL_H
30 template <
typename DerivedSub,
typename T,
int Opt,
typename Index>
32 size_t blockSize, Eigen::SparseMatrix<T, Opt, Index>* matrix,
33 bool initialize)
const
37 const Index numBlocks = static_cast<Index>(blockIds.size());
38 for (Index block0 = 0; block0 < numBlocks; block0++)
40 Index subRow = static_cast<Index>(blockSize * block0);
41 for (Index block1 = 0; block1 < numBlocks; block1++)
43 Index subCol = static_cast<Index>(blockSize * block1);
44 addSubMatrix(subMatrix.block(subRow, subCol, blockSize, blockSize),
45 static_cast<Index>(blockIds[block0]),
46 static_cast<Index>(blockIds[block1]),
56 #endif // SURGSIM_PHYSICS_FEMELEMENT_INL_H