66 const index_t numActive = actives.rows();
75 localMat.setZero(numActive, numActive);
83 basisData * quWeights.asDiagonal() *
84 md.measures.asDiagonal() * basisData.transpose();
96 system.
pushToMatrix(localMat, actives, eliminatedDofs.front(), 0, 0);
105 for (
short_t i = 0; i < basis.dim(); ++i)
106 numQuadNodes[i] = basis.
degree(i) + 1;
117 const gsMatrix<T> & eliminatedDofs,
119 gsSparseMatrix<T> & sysMatrix,
120 gsMatrix<T> & rhsMatrix )
122 mapper.localToGlobal(actives, patchIndex, actives);
124 const index_t numActive = actives.rows();
126 for (
index_t i = 0; i < numActive; ++i)
128 const int ii = actives(i,0);
130 if ( mapper.is_free_index(ii) )
132 for (
index_t j = 0; j < numActive; ++j)
134 const int jj = actives(j,0);
135 if ( mapper.is_free_index(jj) )
137 sysMatrix.coeffRef(ii, jj) += localMat(i, j);
147 gsMatrix<T> basisData;
148 gsMatrix<index_t> actives;
151 gsMatrix<T> localMat;
Abstract base class representing a geometry map.
Definition: gsGeometry.h:92
Class representing a reference quadrature rule.
Definition: gsQuadRule.h:28
void mapColIndices(const gsMatrix< index_t > &actives, const index_t patchIndex, gsMatrix< index_t > &result, const index_t c=0) const
mapColIndices Maps a set of basis indices by the corresponding dofMapper.
Definition: gsSparseSystem.h:584
void pushToMatrix(const gsMatrix< T > &localMat, const gsMatrix< index_t > &actives, const gsMatrix< T > &eliminatedDofs, const size_t r=0, const size_t c=0)
pushToMatrix pushes the local matrix for an element to the global system,
Definition: gsSparseSystem.h:638
void assemble(gsDomainIterator< T > &, gsVector< T > const &quWeights)
Assemble on element.
Definition: gsVisitorMass.h:79
virtual void computeMap(gsMapData< T > &InOut) const
Computes map function data.
Definition: gsFunction.hpp:822
#define short_t
Definition: gsConfig.h:35
void evaluate(const gsBasis< T > &basis, const gsGeometry< T > &geo, gsMatrix< T > &quNodes)
Evaluate on element.
Definition: gsVisitorMass.h:57
virtual short_t degree(short_t i) const
Degree with respect to the i-th variable. If the basis is a tensor product of (piecewise) polynomial ...
Definition: gsBasis.hpp:650
void initialize(const gsBasis< T > &basis, const index_t, const gsOptionList &options, gsQuadRule< T > &rule)
Initialize.
Definition: gsVisitorMass.h:44
Abstract class representing a PDE (partial differential equation).
Definition: gsPde.h:43
#define index_t
Definition: gsConfig.h:32
The visitor computes element mass integrals.
Definition: gsVisitorMass.h:29
static gsQuadRule< T > get(const gsBasis< T > &basis, const gsOptionList &options, short_t fixDir=-1)
Constructs a quadrature rule based on input options.
Definition: gsQuadrature.h:48
Class which enables iteration over all elements of a parameter domain.
Definition: gsDomainIterator.h:67
The density of the measure pull back.
Definition: gsForwardDeclarations.h:76
virtual void eval_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluates nonzero basis functions at point u into result.
Definition: gsBasis.hpp:443
gsVisitorMass(const gsPde< T > &pde)
Constructor.
Definition: gsVisitorMass.h:40
#define GISMO_UNUSED(x)
Definition: gsDebug.h:112
Class which holds a list of parameters/options, and provides easy access to them. ...
Definition: gsOptionList.h:32
void localToGlobal(const index_t patchIndex, const std::vector< gsMatrix< T > > &eliminatedDofs, gsSparseSystem< T > &system)
Adds the contributions to the sparse system.
Definition: gsVisitorMass.h:88
Class that represents the (tensor) Gauss-Legendre quadrature rule.
Definition: gsGaussRule.h:27
A basis represents a family of scalar basis functions defined over a common parameter domain...
Definition: gsBasis.h:78
virtual void active_into(const gsMatrix< T > &u, gsMatrix< index_t > &result) const
Returns the indices of active basis functions at points u, as a list of indices, in result...
Definition: gsBasis.hpp:293
gsVisitorMass()
Constructor.
Definition: gsVisitorMass.h:34