23template<
class T,
int MatOrder>
35 std::vector<gsDofMapper> m_dofMappers;
36 std::vector<gsMatrix<T> > m_ddof;
144 GISMO_ASSERT(m_dofs > 0,
"Something went wrong, number of DOFs is zero!");
159 const std::vector<gsDofMapper>&
getMappers()
const {
return m_dofMappers; }
182 const std::vector< gsMultiBasis<T> >&
getBases()
const {
return m_params.
getBases(); }
226#ifndef GISMO_BUILD_LIB
227#include GISMO_HPP_HEADER(gsFlowAssemblerBase.hpp)
Class containing a set of boundary conditions.
Definition gsBoundaryConditions.h:342
Maintains a mapping from patch-local dofs to global dof indices and allows the elimination of individ...
Definition gsDofMapper.h:69
A scalar of vector field defined on a m_parametric geometry.
Definition gsField.h:55
A base class for all assemblers in gsIncompressibleFlow.
Definition gsFlowAssemblerBase.h:25
bool isInitialized()
Returns true if the assembler has been initialized.
Definition gsFlowAssemblerBase.h:152
void assembleBlock(gsFlowVisitor< T, MatOrder > &visitor, index_t testBasisID, gsSparseMatrix< T, MatOrder > &block, gsMatrix< T > &blockRhs)
Assemble a matrix block.
Definition gsFlowAssemblerBase.hpp:270
index_t numDofs() const
Returns the number of degrees of freedom (DOFs).
Definition gsFlowAssemblerBase.h:142
virtual void assembleNonlinearPart()
Assemble the nonlinear part of the problem.
Definition gsFlowAssemblerBase.h:101
virtual void initialize()
Initialize the assembler.
Definition gsFlowAssemblerBase.hpp:352
virtual void updateSizes()
Update sizes of members (when DOF numbers change, e.g. after markDofsAsEliminatedZeros()).
Definition gsFlowAssemblerBase.h:56
virtual const gsMatrix< T > & rhs(index_t unk) const
Returns the assembled right-hand side for unknown with index unk (e.g. from two-equation turbulence m...
Definition gsFlowAssemblerBase.h:219
virtual void updateCurrentSolField(const gsMatrix< T > &solVector, bool updateSol)
Update current solution field stored in the assembler.
Definition gsFlowAssemblerBase.h:111
const gsFunction< T > * getRhsFcn() const
Returns a pointer to the right-hand-side function.
Definition gsFlowAssemblerBase.h:188
virtual const gsMatrix< T > & rhs() const
Returns the assembled right-hand side.
Definition gsFlowAssemblerBase.h:214
const std::vector< gsDofMapper > & getMappers() const
Returns a const reference to the DOF mappers.
Definition gsFlowAssemblerBase.h:159
virtual const gsSparseMatrix< T, MatOrder > & matrix() const
Returns the assembled matrix.
Definition gsFlowAssemblerBase.h:197
void computeDirichletDofs(const index_t unk, const index_t basisID, gsMatrix< T > &ddofVector)
Compute the coefficients of the basis functions at the Dirichlet boundaries.
Definition gsFlowAssemblerBase.hpp:30
void computeDirichletDofsIntpl(const index_t unk, const gsDofMapper &mapper, const gsMultiBasis< T > &mbasis, gsMatrix< T > &ddofVector)
Compute the coefficients of the basis functions at the Dirichlet boundaries using interpolation.
Definition gsFlowAssemblerBase.hpp:70
const std::vector< gsMatrix< T > > & getDirichletDofs() const
Returns a const reference to the vectors of coefficients at the Dirichlet boundaries.
Definition gsFlowAssemblerBase.h:166
void computeDirichletDofsL2Proj(const index_t unk, const gsDofMapper &mapper, const gsMultiBasis< T > &mbasis, gsMatrix< T > &ddofVector)
Compute the coefficients of the basis functions at the Dirichlet boundaries using L2-projection.
Definition gsFlowAssemblerBase.hpp:154
virtual void assembleLinearPart()
Assemble the linear part of the problem.
Definition gsFlowAssemblerBase.h:97
virtual void updateDofMappers()
Update the DOF mappers in all visitors (when DOF numbers change, e.g. after markDofsAsEliminatedZeros...
Definition gsFlowAssemblerBase.h:60
short_t getTarDim() const
Returns the target dimension.
Definition gsFlowAssemblerBase.h:149
const gsBoundaryConditions< T > & getBCs() const
Returns a const reference to the boundary conditions.
Definition gsFlowAssemblerBase.h:185
std::vector< gsMultiBasis< T > > & getBases()
Returns a reference to the discretization bases.
Definition gsFlowAssemblerBase.h:181
virtual gsField< T > constructSolution(const gsMatrix< T > &solVector, index_t unk) const
Construct solution from computed solution vector for unknown unk.
Definition gsFlowAssemblerBase.h:135
gsAssemblerOptions getAssemblerOptions() const
Returns the assembler options.
Definition gsFlowAssemblerBase.h:191
void assembleRhs(gsFlowVisitor< T, MatOrder > &visitor, index_t testBasisID, gsMatrix< T > &rhs)
Assemble the right-hand side.
Definition gsFlowAssemblerBase.hpp:310
void initMembers()
Initialize the class members.
Definition gsFlowAssemblerBase.hpp:19
virtual void update(const gsMatrix< T > &solVector, bool updateSol=true)
Update the assembler in new nonlinear iteration.
Definition gsFlowAssemblerBase.hpp:360
gsOptionList options() const
Returns the flow solver option list.
Definition gsFlowAssemblerBase.h:194
virtual const gsSparseMatrix< T, MatOrder > & matrix(index_t unk) const
Returns the assembled matrix for unknown with index unk (e.g. from two-equation turbulence models).
Definition gsFlowAssemblerBase.h:202
const gsMultiPatch< T > & getPatches() const
Returns a const reference to the multipatch representing the computational domain.
Definition gsFlowAssemblerBase.h:172
virtual void markDofsAsEliminatedZeros(const std::vector< gsMatrix< index_t > > &boundaryDofs, const index_t unk)
Eliminate given DOFs as homogeneous Dirichlet boundary.
Definition gsFlowAssemblerBase.h:128
virtual gsSparseMatrix< T, MatOrder > & getMassMatrix(index_t unkID)
Returns the mass matrix for unknown with index unk. There is also a const version.
Definition gsFlowAssemblerBase.h:207
const gsMatrix< T > & getSolution() const
Returns a const reference to the current computed solution.
Definition gsFlowAssemblerBase.h:169
virtual void updateAssembly()
Assemble all that needs to be updated in each nonlinear iteration.
Definition gsFlowAssemblerBase.hpp:345
A class that holds all parameters needed by the incompressible flow solver.
Definition gsFlowSolverParams.h:34
const gsNavStokesPde< T > & getPde() const
Returns a const reference to the PDE.
Definition gsFlowSolverParams.h:145
const gsBoundaryConditions< T > & getBCs() const
Returns a const reference to the boundary conditions.
Definition gsFlowSolverParams.h:148
std::vector< gsMultiBasis< T > > & getBases()
Returns a reference to the discretization bases.
Definition gsFlowSolverParams.h:155
gsAssemblerOptions & assemblerOptions()
Returns a reference to the assembler option list.
Definition gsFlowSolverParams.h:163
gsOptionList & options()
Returns a reference to the INS solver option list.
Definition gsFlowSolverParams.h:185
Base class for incompressible flow visitors.
Definition gsFlowVisitors.h:29
A function from a n-dimensional domain to an m-dimensional image.
Definition gsFunction.h:60
A matrix with arbitrary coefficient type and fixed or dynamic size.
Definition gsMatrix.h:41
Holds a set of patch-wise bases and their topology information.
Definition gsMultiBasis.h:37
Container class for a set of geometry patches and their topology, that is, the interface connections ...
Definition gsMultiPatch.h:100
Class which holds a list of parameters/options, and provides easy access to them.
Definition gsOptionList.h:33
Sparse matrix class, based on gsEigen::SparseMatrix.
Definition gsSparseMatrix.h:139
#define short_t
Definition gsConfig.h:35
#define index_t
Definition gsConfig.h:32
#define GISMO_NO_IMPLEMENTATION
Definition gsDebug.h:129
#define GISMO_ASSERT(cond, message)
Definition gsDebug.h:89
A class that holds all parameters needed by the incompressible flow solver.
The G+Smo namespace, containing all definitions for the library.
Definition gsAssemblerOptions.h:243