G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
gsNsAssembler.h
Go to the documentation of this file.
1
16#pragma once
17
20
21namespace gismo
22{
23
26template <class T>
28{
29public:
31
34 const gsMultiBasis<T> & basisVel,
35 const gsMultiBasis<T> & basisPres,
36 const gsBoundaryConditions<T> & bconditions,
37 const gsFunction<T> & body_force);
38
41
43 virtual void refresh();
44
45 //--------------------- SYSTEM ASSEMBLY ----------------------------------//
46
47 using Base::assemble;
48
51 virtual void assemble(bool saveEliminationMatrix);
52
53 virtual void assemble() { assemble(false); };
55
59 virtual bool assemble(const gsMatrix<T> & solutionVector,
60 const std::vector<gsMatrix<T> > & fixedDoFs);
61
64 virtual void assemble(const gsMultiPatch<T> & velocity, const gsMultiPatch<T> & pressure);
65
66 //--------------------- SOLUTION CONSTRUCTION ----------------------------------//
67
69
71 virtual void constructSolution(const gsMatrix<T> & solVector,
72 const std::vector<gsMatrix<T> > & fixedDoFs,
73 gsMultiPatch<T> & velocity) const;
74
76 virtual void constructSolution(const gsMatrix<T> & solVector,
77 const std::vector<gsMatrix<T> > & fixedDoFs,
78 gsMultiPatch<T> & velocity, gsMultiPatch<T> & pressure) const;
79
81 virtual void constructPressure(const gsMatrix<T> & solVector,
82 const std::vector<gsMatrix<T> > & fixedDoFs,
83 gsMultiPatch<T> & pressure) const;
84
85 //--------------------- SPECIALS ----------------------------------//
86
89 virtual gsMatrix<T> computeForce(const gsMultiPatch<T> & velocity, const gsMultiPatch<T> & pressure,
90 const std::vector<std::pair<index_t,boxSide> > & bdrySides, bool split = false) const;
91
92protected:
94 virtual void reserve();
95
96protected:
97
101
102 using Base::m_pde_ptr;
103 using Base::m_bases;
104 using Base::m_ddof;
105 using Base::m_options;
106 using Base::m_system;
107};
108
109} // namespace gismo ends
110
111#ifndef GISMO_BUILD_LIB
112#include GISMO_HPP_HEADER(gsNsAssembler.hpp)
113#endif
gsSparseSystem< T > m_system
Global sparse linear system.
Definition gsAssembler.h:290
std::vector< gsMultiBasis< T > > m_bases
Definition gsAssembler.h:282
gsOptionList m_options
Options.
Definition gsAssembler.h:285
memory::shared_ptr< gsPde< T > > m_pde_ptr
Definition gsAssembler.h:276
std::vector< gsMatrix< T > > m_ddof
Definition gsAssembler.h:295
const gsMultiPatch< T > & patches() const
Return the multipatch.
Definition gsAssembler.h:601
Extends the gsAssembler class by adding functionality necessary for a general nonlinear solver....
Definition gsBaseAssembler.h:27
virtual void assemble()
Main assemble routine, to be implemented in derived classes.
Definition gsBaseAssembler.h:40
virtual void constructSolution(const gsMatrix< T > &solVector, const std::vector< gsMatrix< T > > &fixedDDofs, gsMultiPatch< T > &result, const gsVector< index_t > &unknowns) const
Constructs solution as a gsMultiPatch object from the solution vector and fixed DoFs.
Definition gsBaseAssembler.hpp:23
Class containing a set of boundary conditions.
Definition gsBoundaryConditions.h:342
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
TODO: write.
Definition gsNsAssembler.h:28
virtual gsMatrix< T > computeForce(const gsMultiPatch< T > &velocity, const gsMultiPatch< T > &pressure, const std::vector< std::pair< index_t, boxSide > > &bdrySides, bool split=false) const
Definition gsNsAssembler.hpp:176
virtual void reserve()
a custom reserve function to allocate memory for the sparse matrix
Definition gsNsAssembler.hpp:61
short_t m_dim
Definition gsNsAssembler.h:100
virtual void assemble()
Main assemble routine, to be implemented in derived classes.
Definition gsNsAssembler.h:53
virtual void constructSolution(const gsMatrix< T > &solVector, const std::vector< gsMatrix< T > > &fixedDoFs, gsMultiPatch< T > &velocity) const
Construct velocity from computed solution vector and fixed degrees of freedom.
Definition gsNsAssembler.hpp:141
virtual void refresh()
Refresh routine to set dof-mappers.
Definition gsNsAssembler.hpp:80
virtual void constructPressure(const gsMatrix< T > &solVector, const std::vector< gsMatrix< T > > &fixedDoFs, gsMultiPatch< T > &pressure) const
@ brief Construct pressure from computed solution vector
Definition gsNsAssembler.hpp:163
static gsOptionList defaultOptions()
Returns the list of default options for assembly.
Definition gsNsAssembler.hpp:50
Class which holds a list of parameters/options, and provides easy access to them.
Definition gsOptionList.h:33
Base class for assemblers of gsElasticity.
Provides several simple utility and naming classes.
#define short_t
Definition gsConfig.h:35
The G+Smo namespace, containing all definitions for the library.