14#include <unordered_map>
27template <
class T,
int MatOrder>
46 index_t m_testUnkID, m_shapeUnkID;
47 unsigned m_geoFlags, m_testFunFlags, m_shapeFunFlags;
50 std::vector< gsDofMapper > m_dofMappers;
51 std::vector< gsFlowTerm<T>* > m_terms;
62 std::vector< gsMatrix<T> > m_testFunData;
63 std::vector< gsMatrix<T> > m_shapeFunData;
83 for(
size_t i = 0; i < m_terms.size(); i++)
103 m_testBasisPtr = &(m_params.
getBases()[m_testUnkID].piece(m_patchID));
104 m_shapeBasisPtr = &(m_params.
getBases()[m_shapeUnkID].piece(m_patchID));
149 void evaluate(index_t testFunID);
174template <
class T,
int MatOrder>
175class gsFlowVisitorVectorValued :
public gsFlowVisitor<T, MatOrder>
184 std::vector< gsMatrix<T> > m_locMatVec;
189 using Base::m_params;
190 using Base::m_mapData;
191 using Base::m_testFunActives;
192 using Base::m_shapeFunActives;
193 using Base::m_quWeights;
194 using Base::m_testFunData;
195 using Base::m_shapeFunData;
200 gsFlowVisitorVectorValued() {}
208 virtual void assemble();
280#ifndef GISMO_BUILD_LIB
281#include GISMO_HPP_HEADER(gsFlowVisitors.hpp)
A basis represents a family of scalar basis functions defined over a common parameter domain.
Definition gsBasis.h:79
Class which enables iteration over all elements of a parameter domain.
Definition gsDomainIterator.h:68
A scalar of vector field defined on a m_parametric geometry.
Definition gsField.h:55
A class that holds all parameters needed by the incompressible flow solver.
Definition gsFlowSolverParams.h:34
std::vector< gsMultiBasis< T > > & getBases()
Returns a reference to the discretization bases.
Definition gsFlowSolverParams.h:155
A class for integrals of the form: test function value * shape function value.
Definition gsFlowTerms.h:166
Base class for incompressible flow visitors.
Definition gsFlowVisitors.h:29
void setCurrentSolution(std::vector< gsField< T > > &solutions)
Set all needed current solution fields.
Definition gsFlowVisitors.hpp:164
virtual void defineTestShapeBases()
Set pointers to test and shape basis.
Definition gsFlowVisitors.h:101
virtual void defineTestShapeUnknowns()
Set test and shape basis unknown IDs according to visitor type.
Definition gsFlowVisitors.h:94
void initialize()
Initialize the visitor.
Definition gsFlowVisitors.hpp:137
void evalBasisData(const unsigned &basisFlags, const gsBasis< T > *basisPtr, gsMatrix< index_t > &activesUnique, std::vector< gsMatrix< T > > &basisData)
Evaluate required data for the given basis.
Definition gsFlowVisitors.hpp:46
virtual void setupQuadrature()
Setup the quadrature rule.
Definition gsFlowVisitors.hpp:217
virtual void defineTerms()
Define terms to be evaluated according to visitor type and given parameters.
Definition gsFlowVisitors.h:90
void gatherEvalFlags()
Gather evaluation flags from all terms.
Definition gsFlowVisitors.hpp:19
void initOnPatch(index_t patchID)
Initialize the visitor on the given patch.
Definition gsFlowVisitors.hpp:150
virtual void localToGlobal(gsMatrix< T > &globalRhs)
Map local rhs vector to the global rhs vector.
Definition gsFlowVisitors.h:167
virtual void localToGlobal(const std::vector< gsMatrix< T > > &eliminatedDofs, gsSparseMatrix< T, MatOrder > &globalMat, gsMatrix< T > &globalRhs)
Map local matrix to the global matrix.
Definition gsFlowVisitors.h:162
void updateDofMappers(const std::vector< gsDofMapper > &mappers)
Update DoF mappers.
Definition gsFlowVisitors.h:133
virtual void assemble()
Assemble the local matrix.
Definition gsFlowVisitors.hpp:190
void evalSingleFunData(const unsigned &basisFlags, const gsBasis< T > *basisPtr, const index_t funID, std::vector< gsMatrix< T > > &basisData)
Evaluate required data for the given basis function.
Definition gsFlowVisitors.hpp:31
A class for integrals of the form: pressure shape function value * velocity test function divergence.
Definition gsINSTerms.h:23
A class for integrals of the form: velocity solution * shape function gradient * test function value.
Definition gsINSTerms.h:77
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 representing a reference quadrature rule.
Definition gsQuadRule.h:29
Sparse matrix class, based on gsEigen::SparseMatrix.
Definition gsSparseMatrix.h:139
A vector with arbitrary coefficient type and fixed or dynamic size.
Definition gsVector.h:37
#define index_t
Definition gsConfig.h:32
#define GISMO_NO_IMPLEMENTATION
Definition gsDebug.h:129
A class that holds all parameters needed by the incompressible flow solver.
The G+Smo namespace, containing all definitions for the library.