G+Smo  24.08.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsNsAssembler.h
Go to the documentation of this file.
1 
16 #pragma once
17 
20 
21 namespace gismo
22 {
23 
26 template <class T>
27 class gsNsAssembler : public gsBaseAssembler<T>
28 {
29 public:
30  typedef gsBaseAssembler<T> Base;
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 
48  virtual void assemble(bool saveEliminationMatrix = false);
49 
53  virtual bool assemble(const gsMatrix<T> & solutionVector,
54  const std::vector<gsMatrix<T> > & fixedDoFs);
55 
58  virtual void assemble(const gsMultiPatch<T> & velocity, const gsMultiPatch<T> & pressure);
59 
60  //--------------------- SOLUTION CONSTRUCTION ----------------------------------//
61 
63  virtual void constructSolution(const gsMatrix<T> & solVector,
64  const std::vector<gsMatrix<T> > & fixedDoFs,
65  gsMultiPatch<T> & velocity) const;
66 
68  virtual void constructSolution(const gsMatrix<T> & solVector,
69  const std::vector<gsMatrix<T> > & fixedDoFs,
70  gsMultiPatch<T> & velocity, gsMultiPatch<T> & pressure) const;
71 
73  virtual void constructPressure(const gsMatrix<T> & solVector,
74  const std::vector<gsMatrix<T> > & fixedDoFs,
75  gsMultiPatch<T> & pressure) const;
76 
77  //--------------------- SPECIALS ----------------------------------//
78 
81  virtual gsMatrix<T> computeForce(const gsMultiPatch<T> & velocity, const gsMultiPatch<T> & pressure,
82  const std::vector<std::pair<index_t,boxSide> > & bdrySides, bool split = false) const;
83 
84 protected:
86  virtual void reserve();
87 
88 protected:
89 
93 
94  using Base::m_pde_ptr;
95  using Base::m_bases;
96  using Base::m_ddof;
97  using Base::m_options;
98  using Base::m_system;
99 };
100 
101 } // namespace gismo ends
102 
103 #ifndef GISMO_BUILD_LIB
104 #include GISMO_HPP_HEADER(gsNsAssembler.hpp)
105 #endif
virtual void reserve()
a custom reserve function to allocate memory for the sparse matrix
Definition: gsNsAssembler.hpp:61
memory::shared_ptr< gsPde< T > > m_pde_ptr
Definition: gsAssembler.h:276
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:174
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:140
#define short_t
Definition: gsConfig.h:35
gsOptionList m_options
Options.
Definition: gsAssembler.h:285
std::vector< gsMultiBasis< T > > m_bases
Definition: gsAssembler.h:282
gsNsAssembler(const gsMultiPatch< T > &patches, const gsMultiBasis< T > &basisVel, const gsMultiBasis< T > &basisPres, const gsBoundaryConditions< T > &bconditions, const gsFunction< T > &body_force)
Constructor.
Definition: gsNsAssembler.hpp:30
A function from a n-dimensional domain to an m-dimensional image.
Definition: gsFunction.h:59
Provides several simple utility and naming classes.
static gsOptionList defaultOptions()
Returns the list of default options for assembly.
Definition: gsNsAssembler.hpp:50
const gsMultiPatch< T > & patches() const
Return the multipatch.
Definition: gsAssembler.h:601
short_t m_dim
Definition: gsNsAssembler.h:92
Holds a set of patch-wise bases and their topology information.
Definition: gsMultiBasis.h:36
virtual void refresh()
Refresh routine to set dof-mappers.
Definition: gsNsAssembler.hpp:80
Base class for assemblers of gsElasticity.
Container class for a set of geometry patches and their topology, that is, the interface connections ...
Definition: gsMultiPatch.h:33
Extends the gsAssembler class by adding functionality necessary for a general nonlinear solver...
Definition: gsALE.h:26
gsSparseSystem< T > m_system
Global sparse linear system.
Definition: gsAssembler.h:290
std::vector< gsMatrix< T > > m_ddof
Definition: gsAssembler.h:295
Class containing a set of boundary conditions.
Definition: gsBoundaryConditions.h:341
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:162
Class which holds a list of parameters/options, and provides easy access to them. ...
Definition: gsOptionList.h:32
TODO: write.
Definition: gsNsAssembler.h:27
virtual void assemble()
Main assemble routine, to be implemented in derived classes.
Definition: gsAssembler.hpp:51