12 total +=
v(dof, dof).rows();
21 total +=
v(dof, dof).cols();
29 for (
auto dof0 : dofs)
30 for (
auto dof1 : dofs)
31 total +=
v(dof0, dof1).nonZeros();
44 return v(dofs.front(), dofs.front());
46 std::vector<Eigen::Triplet<T>> triplets;
49 for (
auto dofRow : dofs)
52 for (
auto dofCol : dofs)
54 const auto& mat =
v(dofRow, dofCol);
55 for (
int k = 0; k < mat.outerSize(); ++k)
56 for (Eigen::SparseMatrix<double>::InnerIterator it(mat, k); it; ++it)
57 triplets.emplace_back(Eigen::Triplet<T>(it.row() + startRow, it.col() + startCol, it.value()));
59 startCol += mat.cols();
61 startRow +=
v(dofRow, dofRow).rows();
64 combined.setFromTriplets(triplets.begin(), triplets.end());
65 combined.makeCompressed();
int TotalCols(const DofMatrixSparse< T > &v, std::vector< DofType > dofs)
Definition: DofMatrixSparseConvertEigen.h:17
int TotalNonZeros(const DofMatrixSparse< T > &v, std::vector< DofType > dofs)
Definition: DofMatrixSparseConvertEigen.h:26
int TotalRows(const DofMatrixSparse< T > &v, std::vector< DofType > dofs)
Definition: DofMatrixSparseConvertEigen.h:8
Eigen::SparseMatrix< T > ToEigen(const DofMatrixSparse< T > &v, std::vector< DofType > dofs)
export the dofs entries of a DofMatrixSparse to a Eigen::SparseMatrix
Definition: DofMatrixSparseConvertEigen.h:41
int v
Definition: Quad2DPatchTest.py:9
dof container that is also capable of performing calculations.
Definition: DofMatrixContainer.h:13
Definition: Exception.h:6