85 template<
typename T >
90 typedef memory::shared_ptr<Op>
OpPtr;
169 const std::vector<SparseVector>& primalConstraints,
195 OpPtr localSaddlePointSolver,
197 const Matrix& rhsForBasis,
198 const std::vector<index_t>& primalDofIndices,
251 const std::vector<SparseVector>& primalConstraints,
252 const std::vector<index_t>& primalDofIndices,
300 #ifndef GISMO_BUILD_LIB
301 #include GISMO_HPP_HEADER(gsPrimalSystem.hpp)
JumpMatrix m_jumpMatrix
The jump matrix for the primal problem.
Definition: gsPrimalSystem.h:290
memory::shared_ptr< Op > OpPtr
Shared pointer to linear operator.
Definition: gsPrimalSystem.h:90
std::vector< SparseMatrix > m_primalBases
The bases for the primal dofs on the patches.
Definition: gsPrimalSystem.h:293
Provides declaration of Vector class.
gsMatrix< T > Matrix
Matrix type.
Definition: gsPrimalSystem.h:94
gsLinearOperator< T > Op
Linear operator.
Definition: gsPrimalSystem.h:89
void addContribution(const JumpMatrix &jumpMatrix, const SparseMatrix &localMatrix, const Matrix &localRhs, SparseMatrix primalBasis, OpPtr embedding=OpPtr())
Adds contributions for a patch to the data hold in the class.
Definition: gsPrimalSystem.hpp:179
Matrix & localRhs()
Returns the right-hand-side for the primal problem.
Definition: gsPrimalSystem.h:277
index_t nPrimalDofs() const
Returns the size of the primal problem (number of primal dofs)
Definition: gsPrimalSystem.h:281
#define index_t
Definition: gsConfig.h:32
gsSparseMatrix< T, RowMajor > JumpMatrix
Sparse matrix type for jumps.
Definition: gsPrimalSystem.h:92
void setEliminatePointwiseConstraints(bool v)
Iff true, handleConstraints will eliminate pointwise constraints (typically vertex values) ...
Definition: gsPrimalSystem.h:287
void handleConstraints(const std::vector< SparseVector > &primalConstraints, const std::vector< index_t > &primalDofIndices, JumpMatrix &jumpMatrix, SparseMatrix &localMatrix, Matrix &localRhs)
Convenience function for handling the primal constraints.
Definition: gsPrimalSystem.hpp:202
JumpMatrix & jumpMatrix()
Returns the jump matrix for the primal problem.
Definition: gsPrimalSystem.h:269
index_t eliminatePointwiseConstraints() const
Returns true iff handleConstraints will eliminate pointwise constraints (typically vertex values) ...
Definition: gsPrimalSystem.h:284
static gsSparseMatrix< T > primalBasis(OpPtr localSaddlePointSolver, const SparseMatrix &embeddingForBasis, const Matrix &rhsForBasis, const std::vector< index_t > &primalDofIndices, index_t nPrimalDofs)
Returns the matrix representation of the energy minimizing primal basis.
Definition: gsPrimalSystem.hpp:141
static void incorporateConstraints(const std::vector< SparseVector > &primalConstraints, bool eliminatePointwiseConstraints, const SparseMatrix &localMatrix, SparseMatrix &modifiedLocalMatrix, SparseMatrix &localEmbedding, SparseMatrix &embeddingForBasis, Matrix &rhsForBasis)
Incorporates the given constraints in the local system.
Definition: gsPrimalSystem.hpp:27
gsSparseVector< T > SparseVector
Sparse vector type.
Definition: gsPrimalSystem.h:93
gsPrimalSystem(index_t nPrimalDofs)
Constructor.
Definition: gsPrimalSystem.hpp:20
Simple abstract class for discrete operators.
Definition: gsLinearOperator.h:28
SparseMatrix & localMatrix()
Returns the local stiffness matrix for the primal problem.
Definition: gsPrimalSystem.h:273
bool m_eliminatePointwiseConstraints
handleConstraints will eliminate pointwise constraints
Definition: gsPrimalSystem.h:295
std::vector< OpPtr > m_embeddings
For each patch, the map to .
Definition: gsPrimalSystem.h:294
gsSparseMatrix< T > SparseMatrix
Sparse matrix type.
Definition: gsPrimalSystem.h:91
This class represents the primal system for a IETI-DP algorithm.
Definition: gsPrimalSystem.h:86
Sparse vector class, based on gsEigen::SparseVector.
Definition: gsSparseVector.h:34
SparseMatrix m_localMatrix
The overall matrix for the primal problem.
Definition: gsPrimalSystem.h:291
Simple adapter classes to use matrices or linear solvers as gsLinearOperators.
Matrix m_localRhs
The right-hand side for the primal problem.
Definition: gsPrimalSystem.h:292
std::vector< Matrix > distributePrimalSolution(std::vector< Matrix > sol)
Distributes the given solution for K+1 subdomains to the K patches.
Definition: gsPrimalSystem.hpp:232