28template <
class T,
bool paramCoef = false>
61 basis.active_into(md.points.col(0), actives);
62 numActive = actives.rows();
65 basis.evalAllDers_into(md.points, 0, basisData,
true);
73 rhs_ptr->eval_into((paramCoef ? md.points : md.values[0]), rhsVals);
76 localRhs.setZero(numActive, rhsVals.rows());
88 for (
index_t k = 0; k < quWeights.rows(); ++k)
91 const T weight = quWeights[k] * md.measure(k);
93 localRhs.noalias() += weight * (bVals.col(k) * rhsVals.col(k).transpose());
124 for (
index_t i=0; i < numActive; ++i)
129 rhsMatrix.row(ii) += localRhs.row(i);
140 std::vector<gsMatrix<T> > basisData;
A basis represents a family of scalar basis functions defined over a common parameter domain.
Definition gsBasis.h:79
Maintains a mapping from patch-local dofs to global dof indices and allows the elimination of individ...
Definition gsDofMapper.h:69
void localToGlobal(const gsMatrix< index_t > &locals, index_t patchIndex, gsMatrix< index_t > &globals, index_t comp=0) const
Computes the global indices of the input local indices.
Definition gsDofMapper.cpp:25
bool is_free_index(index_t gl) const
Returns true if global dof gl is not eliminated.
Definition gsDofMapper.h:376
Class which enables iteration over all elements of a parameter domain.
Definition gsDomainIterator.h:68
A function from a n-dimensional domain to an m-dimensional image.
Definition gsFunction.h:60
virtual void computeMap(gsMapData< T > &InOut) const
Computes map function data.
Definition gsFunction.hpp:817
Abstract base class representing a geometry map.
Definition gsGeometry.h:93
the gsMapData is a cache of pre-computed function (map) values.
Definition gsFuncData.h:349
A matrix with arbitrary coefficient type and fixed or dynamic size.
Definition gsMatrix.h:41
Class which holds a list of parameters/options, and provides easy access to them.
Definition gsOptionList.h:33
Class representing a reference quadrature rule.
Definition gsQuadRule.h:29
Sparse matrix class, based on gsEigen::SparseMatrix.
Definition gsSparseMatrix.h:139
A sparse linear system indexed by sets of degrees of freedom.
Definition gsSparseSystem.h:30
void pushToRhs(const gsMatrix< T > &localRhs, const gsMatrix< index_t > &actives, const size_t r=0)
pushToRhs pushes the local rhs for an element to the global system
Definition gsSparseSystem.h:884
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
A vector with arbitrary coefficient type and fixed or dynamic size.
Definition gsVector.h:37
Visitor for the moment vector of a function.
Definition gsVisitorMoments.h:30
void initialize(const gsBasis< T > &basis, const index_t, const gsOptionList &options, gsQuadRule< T > &rule)
Initialize.
Definition gsVisitorMoments.h:41
void localToGlobal(const index_t patchIndex, const std::vector< gsMatrix< T > > &, gsSparseSystem< T > &system)
Adds the contributions to the sparse system.
Definition gsVisitorMoments.h:100
void assemble(gsDomainIterator< T > &, gsVector< T > const &quWeights)
Assemble on element.
Definition gsVisitorMoments.h:80
gsVisitorMoments(const gsFunction< T > &rhs)
Constructor for gsVisitorMoments.
Definition gsVisitorMoments.h:36
void localToGlobal(const gsDofMapper &mapper, const gsMatrix< T > &eliminatedDofs, const index_t patchIndex, gsSparseMatrix< T > &sysMatrix, gsMatrix< T > &rhsMatrix)
Adds the contributions to the sparse system.
Definition gsVisitorMoments.h:112
void evaluate(const gsBasis< T > &basis, const gsGeometry< T > &geo, const gsMatrix< T > &quNodes)
Evaluate on element.
Definition gsVisitorMoments.h:54
#define index_t
Definition gsConfig.h:32
The G+Smo namespace, containing all definitions for the library.
@ NEED_VALUE
Value of the object.
Definition gsForwardDeclarations.h:72
@ NEED_MEASURE
The density of the measure pull back.
Definition gsForwardDeclarations.h:76
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:51