43 m_system.reserve(m_bases[0], m_options, 1);
44 Base::computeDirichletDofs();
50 this->
template push<gsVisitorMass<T> >();
55 this->apply(visitor, patchIndex);
61 return m_system.matrix();
71 m_system.reserve(m_bases[0], m_options, 1);
72 Base::computeDirichletDofs();
78 this->
template push<gsVisitorGradGrad<T> >();
83 this->apply(visitor, patchIndex);
89 return m_system.matrix();
99 m_system.rhs().setZero(m_system.cols(), 1);
107 this->apply(mom,patchIndex);
112 return m_system.rhs();
118 GISMO_ENSURE( m_options.getInt(
"InterfaceStrategy")==iFace::dg,
119 "Assembling DG terms only makes sense in corresponding setting." );
125 m_system.reserve(m_bases[0], m_options, 1);
126 Base::computeDirichletDofs();
130 this->apply(visitor, iFace);
135 return m_system.matrix();
141 GISMO_ASSERT( bc.
ctype() ==
"Neumann",
"gsGenericAssembler::assembleNeumann: Got " << bc.
ctype() <<
"bc.");
147 m_system.rhs().setZero(m_system.cols(), 1);
151 this->apply(visitor, bc.
patch(), bc.
side());
156 return m_system.matrix();
162 GISMO_ASSERT( bc.
ctype() ==
"Dirichlet",
"gsGenericAssembler::assembleNitsche: Got " << bc.
ctype() <<
"bc.");
168 m_system.reserve(m_bases[0], m_options, 1);
169 Base::computeDirichletDofs();
174 this->apply(visitor, bc.
patch(), bc.
side());
179 return m_system.matrix();
static gsOptionList defaultOptions()
Returns the list of default options for assembly.
Definition gsAssembler.hpp:30
A function from a n-dimensional domain to an m-dimensional image.
Definition gsFunction.h:60
const gsMatrix< T > & assembleMoments(const gsFunction< T > &func, index_t patchIndex=-1, bool refresh=true)
Moments assembly routine.
Definition gsGenericAssembler.hpp:93
const gsSparseMatrix< T > & assembleDG(const boundaryInterface &iFace, bool refresh=true)
Assemble dG interface terms.
Definition gsGenericAssembler.hpp:116
const gsSparseMatrix< T > & assembleNitsche(const boundary_condition< T > &bc, bool refresh=true)
Assemble Nitsche terms for weakly imposing Dirichlet conditions.
Definition gsGenericAssembler.hpp:160
void refresh()
Refreshes the sparse system (deletes assembled matrices and vectors)
Definition gsGenericAssembler.h:79
const gsSparseMatrix< T > & assembleStiffness(const index_t patchIndex=-1, const bool refresh=true)
Stiffness assembly routine.
Definition gsGenericAssembler.hpp:65
const gsSparseMatrix< T > & assembleNeumann(const boundary_condition< T > &bc, bool refresh=true)
Assemble Neumann boundary terms.
Definition gsGenericAssembler.hpp:139
static gsOptionList defaultOptions()
Returns the list of default options for assembly.
Definition gsGenericAssembler.hpp:28
const gsSparseMatrix< T > & assembleMass(const index_t patchIndex=-1, bool refresh=true)
Mass assembly routine.
Definition gsGenericAssembler.hpp:37
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
void update(const gsOptionList &other, updateType type=ignoreIfUnknown)
Updates the object using the data from other.
Definition gsOptionList.cpp:253
Sparse matrix class, based on gsEigen::SparseMatrix.
Definition gsSparseMatrix.h:139
Visitor for adding the interface conditions for the interior penalty methods of the Poisson problem.
Definition gsVisitorDg.h:52
The visitor computes element grad-grad integrals.
Definition gsVisitorGradGrad.h:34
The visitor computes element mass integrals.
Definition gsVisitorMass.h:30
Visitor for the moment vector of a function.
Definition gsVisitorMoments.h:30
Implementation of a Neumann BC for elliptic assemblers.
Definition gsVisitorNeumann.h:34
Visitor for adding the terms associated to weak (Nitsche-type) imposition of the Dirichlet boundary c...
Definition gsVisitorNitsche.h:55
Provides generic assembler routines.
#define index_t
Definition gsConfig.h:32
#define GISMO_ENSURE(cond, message)
Definition gsDebug.h:102
#define GISMO_ASSERT(cond, message)
Definition gsDebug.h:89
Visitor for adding the interface conditions for the interior penalty methods of the Poisson problem.
Stiffness (grad-grad) Visitor.
Element visitor for moment vector.
Neumann conditions visitor for elliptic problems.
Weak (Nitsche-type) imposition of the Dirichlet boundary conditions.
The G+Smo namespace, containing all definitions for the library.
Mass visitor for assembling element mass matrix.
Struct which represents an interface between two patches.
Definition gsBoundary.h:650
Class that defines a boundary condition for a side of a patch for some unknown variable of a PDE.
Definition gsBoundaryConditions.h:107
const std::string & ctype() const
Returns the type of the boundary condition.
Definition gsBoundaryConditions.h:263
boxSide side() const
Returns the side to which this boundary condition refers to.
Definition gsBoundaryConditions.h:269
index_t patch() const
Returns the patch to which this boundary condition refers to.
Definition gsBoundaryConditions.h:266