G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
gsCDRAssembler.h
Go to the documentation of this file.
1
14#pragma once
15
17#include <gsPde/gsConvDiffRePde.h>
18
19namespace gismo
20{
21
22
27{
28 enum method
29 {
30 SUPG = 1,
31 none = 0
32 };
33};
34
35
48template<class T>
50{
51public:
53
54public:
55
58
65 const gsMultiBasis<T> & bases,
67 {
68 // enrich options in constructor, refresh to apply options
69
70 // 0: no stabilization
71 // 1: SUPG
73 m_options.addInt("Stabilization", "Choice of stabilization method; 0 := no; 1 := SUPG;", flagStabilization);
75 }
76
85 const gsMultiBasis<T> & bases,
86 dirichlet::strategy dirStrategy,
87 iFace::strategy intStrategy = iFace::glue,
89 {
91 m_options.setInt("DirichletStrategy", dirStrategy);
92 m_options.setInt("InterfaceStrategy", intStrategy);
93
94 // 0: no stabilization
95 // 1: SUPG
96 m_options.addInt("Stabilization", "Choice of stabilization method; 0 := no; 1 := SUPG;", flagStabilization);
97
99 }
100
114 gsMultiBasis<T> const & bases,
115 gsBoundaryConditions<T> const & bconditions,
116 const gsFunction<T> & rhs,
117 const gsFunction<T> & coeff_A,
118 const gsFunction<T> & coeff_b,
119 const gsFunction<T> & coeff_c,
120 dirichlet::strategy dirStrategy = dirichlet::elimination,
121 iFace::strategy intStrategy = iFace::glue,
122 stabilizerCDR::method flagStabilization = stabilizerCDR::none)
123 {
125 m_options.setInt("DirichletStrategy", dirStrategy);
126 m_options.setInt("InterfaceStrategy", intStrategy);
127
128 // 0: no stabilization
129 // 1: SUPG
130 m_options.addInt("Stabilization", "Choice of stabilization method; 0 := no; 1 := SUPG;", flagStabilization);
131
132 typename gsPde<T>::Ptr pde(new gsConvDiffRePde<T>
133 (patches, bconditions, &coeff_A, &coeff_b, &coeff_c, &rhs));
135 }
136
138 using Base::assemble;
139 void assemble();
140
141protected:
142
143 // Members from gsAssembler
144 using Base::m_pde_ptr;
145 using Base::m_bases;
146 using Base::m_ddof;
147 using Base::m_options;
148 using Base::m_system;
149};
150
151} // namespace gismo
152
153#ifndef GISMO_BUILD_LIB
154#include GISMO_HPP_HEADER(gsCDRAssembler.hpp)
155#endif
void initialize(const gsPde< T > &pde, const gsStdVectorRef< gsMultiBasis< T > > &bases, const gsOptionList &opt=defaultOptions())
Intitialize function for, sets data fields using the pde, a vector of multi-basis and assembler optio...
Definition gsAssembler.h:317
const gsMatrix< T > & rhs() const
Returns the left-hand side vector(s) ( multiple right hand sides possible )
Definition gsAssembler.h:618
const gsPde< T > & pde() const
Return the Pde.
Definition gsAssembler.h:598
const gsMultiPatch< T > & patches() const
Return the multipatch.
Definition gsAssembler.h:601
Class containing a set of boundary conditions.
Definition gsBoundaryConditions.h:342
Implementation of an (multiple righ-hand side) Poisson solver.
Definition gsCDRAssembler.h:50
gsCDRAssembler(const gsConvDiffRePde< T > &pde, const gsMultiBasis< T > &bases, dirichlet::strategy dirStrategy, iFace::strategy intStrategy=iFace::glue, stabilizerCDR::method flagStabilization=stabilizerCDR::none)
Constructor of the assembler object.
Definition gsCDRAssembler.h:84
gsCDRAssembler(gsMultiPatch< T > const &patches, gsMultiBasis< T > const &bases, gsBoundaryConditions< T > const &bconditions, const gsFunction< T > &rhs, const gsFunction< T > &coeff_A, const gsFunction< T > &coeff_b, const gsFunction< T > &coeff_c, dirichlet::strategy dirStrategy=dirichlet::elimination, iFace::strategy intStrategy=iFace::glue, stabilizerCDR::method flagStabilization=stabilizerCDR::none)
Constructor of the assembler object.
Definition gsCDRAssembler.h:113
void assemble()
Main assemble routine, to be implemented in derived classes.
Definition gsCDRAssembler.hpp:37
static gsOptionList defaultOptions()
Returns the list of default options for assembly.
Definition gsCDRAssembler.hpp:29
gsCDRAssembler(const gsConvDiffRePde< T > &pde, const gsMultiBasis< T > &bases, stabilizerCDR::method flagStabilization=stabilizerCDR::none)
Main Constructor of the assembler object.
Definition gsCDRAssembler.h:64
A convection-diffusion-reaction PDE, including source term on the right-hand side.
Definition gsConvDiffRePde.h:36
A function from a n-dimensional domain to an m-dimensional image.
Definition gsFunction.h:60
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
void addInt(const std::string &label, const std::string &desc, const index_t &value)
Adds a option named label, with description desc and value value.
Definition gsOptionList.cpp:201
void setInt(const std::string &label, const index_t &value)
Sets an existing option label to be equal to value.
Definition gsOptionList.cpp:158
Implementation of an (multiple right-hand side) Poisson assembler.
Definition gsPoissonAssembler.h:37
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
virtual void assemble()
Main assemble routine, to be implemented in derived classes.
Definition gsPoissonAssembler.hpp:41
memory::shared_ptr< gsPde< T > > m_pde_ptr
Definition gsAssembler.h:276
std::vector< gsMatrix< T > > m_ddof
Definition gsAssembler.h:295
Provides assembler for the Poisson equation.
The G+Smo namespace, containing all definitions for the library.
Stabililzer for the CDR discretization.
Definition gsCDRAssembler.h:27
method
Definition gsCDRAssembler.h:29
@ SUPG
Use SUPG.
Definition gsCDRAssembler.h:30
@ none
Do not use a stabilizer.
Definition gsCDRAssembler.h:31