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)
Simple abstract class for discrete operators.
Definition gsLinearOperator.h:29
A matrix with arbitrary coefficient type and fixed or dynamic size.
Definition gsMatrix.h:41
This class represents the primal system for a IETI-DP algorithm.
Definition gsPrimalSystem.h:87
void setEliminatePointwiseConstraints(bool v)
Iff true, handleConstraints will eliminate pointwise constraints (typically vertex values)
Definition gsPrimalSystem.h:287
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
gsMatrix< T > Matrix
Matrix type.
Definition gsPrimalSystem.h:94
SparseMatrix m_localMatrix
The overall matrix for the primal problem.
Definition gsPrimalSystem.h:291
Matrix & localRhs()
Returns the right-hand-side for the primal problem.
Definition gsPrimalSystem.h:277
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
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
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
index_t eliminatePointwiseConstraints() const
Returns true iff handleConstraints will eliminate pointwise constraints (typically vertex values)
Definition gsPrimalSystem.h:284
JumpMatrix & jumpMatrix()
Returns the jump matrix for the primal problem.
Definition gsPrimalSystem.h:269
bool m_eliminatePointwiseConstraints
handleConstraints will eliminate pointwise constraints
Definition gsPrimalSystem.h:295
gsLinearOperator< T > Op
Linear operator.
Definition gsPrimalSystem.h:89
gsSparseMatrix< T > SparseMatrix
Sparse matrix type.
Definition gsPrimalSystem.h:91
gsSparseMatrix< T, RowMajor > JumpMatrix
Sparse matrix type for jumps.
Definition gsPrimalSystem.h:92
index_t nPrimalDofs() const
Returns the size of the primal problem (number of primal dofs)
Definition gsPrimalSystem.h:281
gsSparseVector< T > SparseVector
Sparse vector type.
Definition gsPrimalSystem.h:93
SparseMatrix & localMatrix()
Returns the local stiffness matrix for the primal problem.
Definition gsPrimalSystem.h:273
std::vector< SparseMatrix > m_primalBases
The bases for the primal dofs on the patches.
Definition gsPrimalSystem.h:293
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
std::vector< Matrix > distributePrimalSolution(std::vector< Matrix > sol)
Distributes the given solution for K+1 subdomains to the K patches.
Definition gsPrimalSystem.hpp:232
Matrix m_localRhs
The right-hand side for the primal problem.
Definition gsPrimalSystem.h:292
std::vector< OpPtr > m_embeddings
For each patch, the map to .
Definition gsPrimalSystem.h:294
Sparse matrix class, based on gsEigen::SparseMatrix.
Definition gsSparseMatrix.h:139
Sparse vector class, based on gsEigen::SparseVector.
Definition gsSparseVector.h:35
#define index_t
Definition gsConfig.h:32
Simple adapter classes to use matrices or linear solvers as gsLinearOperators.
Provides declaration of Vector class.
The G+Smo namespace, containing all definitions for the library.