42 : neudata_ptr( bc.function().get() ), side(bc.side())
50 : neudata_ptr(&neudata), side(s)
59 for (
int i = 0; i < basis.dim(); ++i)
60 numQuadNodes[i] = basis.
degree(i) + 1;
61 numQuadNodes[dir] = 1;
93 const index_t numActive = actives.rows();
102 neudata_ptr->eval_into(md.values[0], neuData);
105 localRhs.setZero(numActive, neudata_ptr->targetDim() );
112 for (
index_t k = 0; k < quWeights.rows(); ++k)
115 outerNormal(md, k, side, unormal);
118 const T weight = quWeights[k] * unormal.norm();
120 localRhs.noalias() += weight * basisData.col(k) * neuData.col(k).transpose() ;
145 const index_t numActive = actives.rows();
148 for (
index_t j=0; j!=numActive; ++j)
151 const unsigned jj = actives(j);
153 rhsMatrix.row(jj) += localRhs.row(j);
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
gsVisitorNeumann(const gsPde< T > &pde, const boundary_condition< T > &bc)
Constructor.
Definition: gsVisitorNeumann.h:41
virtual void computeMap(gsMapData< T > &InOut) const
Computes map function data.
Definition: gsFunction.hpp:822
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: gsVisitorNeumann.h:137
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
the gsMapData is a cache of pre-computed function (map) values.
Definition: gsFuncData.h:324
void initialize(const gsBasis< T > &basis, gsQuadRule< T > &rule)
Initialize.
Definition: gsVisitorNeumann.h:54
Abstract class representing a PDE (partial differential equation).
Definition: gsPde.h:43
#define index_t
Definition: gsConfig.h:32
A function from a n-dimensional domain to an m-dimensional image.
Definition: gsFunction.h:59
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
Maintains a mapping from patch-local dofs to global dof indices and allows the elimination of individ...
Definition: gsDofMapper.h:68
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
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:67
void localToGlobal(const index_t patchIndex, const std::vector< gsMatrix< T > > &, gsSparseSystem< T > &system)
Adds the contributions to the sparse system.
Definition: gsVisitorNeumann.h:125
Interface for the set of functions defined on a domain (the total number of functions in the set equa...
Definition: gsFuncData.h:23
Implementation of a Neumann BC for elliptic assemblers.
Definition: gsVisitorNeumann.h:33
Struct which represents a certain side of a box.
Definition: gsBoundary.h:84
gsVisitorNeumann(const gsFunction< T > &neudata, boxSide s)
Constructor.
Definition: gsVisitorNeumann.h:49
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
Class that defines a boundary condition for a side of a patch for some unknown variable of a PDE...
Definition: gsBoundaryConditions.h:106
Jacobian of the object.
Definition: gsForwardDeclarations.h:75
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
Value of the object.
Definition: gsForwardDeclarations.h:72
#define GISMO_UNUSED(x)
Definition: gsDebug.h:112
void assemble(gsDomainIterator< T > &, const gsVector< T > &quWeights)
Assemble on element.
Definition: gsVisitorNeumann.h:109
void initialize(const gsBasis< T > &basis, const index_t, const gsOptionList &options, gsQuadRule< T > &rule)
Initialize.
Definition: gsVisitorNeumann.h:71
Gradient transformation matrix.
Definition: gsForwardDeclarations.h:77
Class which holds a list of parameters/options, and provides easy access to them. ...
Definition: gsOptionList.h:32
Class that represents the (tensor) Gauss-Legendre quadrature rule.
Definition: gsGaussRule.h:27
This object is a cache for computed values from an evaluator.
short_t direction() const
Returns the parametric direction orthogonal to this side.
Definition: gsBoundary.h:113
void evaluate(const gsBasis< T > &basis, const gsGeometry< T > &geo, const gsMatrix< T > &quNodes)
Evaluate on element.
Definition: gsVisitorNeumann.h:84
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