G+Smo  24.08.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsVisitorCDR< T > Class Template Reference

Detailed Description

template<class T>
class gismo::gsVisitorCDR< T >

Visitor for the convection-diffusion-reaction equation.

Visitor for PDEs of the form
Find \( u: \mathbb R^d \rightarrow \mathbb R^d\)

\[ -\mathrm{div}( A \nabla u ) + b\cdot \nabla u + c u = f \]

(+ boundary conditions), where
\( A \) (diffusion coefficient) is a \(d\times d\)-matrix,
\( b \) (convection velocity) is a \(d\times 1\)-vector,
\( c \) (reaction coefficient) is a scalar

The coefficients are given as gsFunction with vector-valued return.
See the constructor gsVisitorCDR() for details on their format!

Obviously, setting \( A = I\), \( b = 0\), and \(c = 0\) results in the special case of the Poisson equation.

+ Collaboration diagram for gsVisitorCDR< T >:

Public Member Functions

void assemble (gsDomainIterator< T > &element, const gsVector< T > &quWeights)
 Assemble.
 
void evaluate (const gsBasis< T > &basis, const gsGeometry< T > &geo, const gsMatrix< T > &quNodes)
 Evaluate on element.
 
getSUPGParameter (const gsVector< T > &lo, const gsVector< T > &up)
 Returns the parameter required for SUPG.
 
 gsVisitorCDR (const gsPde< T > &pde)
 Constructor. More...
 
 gsVisitorCDR (const gsFunction< T > &rhs, const gsFunction< T > &coeff_A, const gsFunction< T > &coeff_b, const gsFunction< T > &coeff_c, stabilizerCDR::method flagStabilization=stabilizerCDR::SUPG)
 Constructor for gsVisitorCDR, convection-diffusion-reaction. More...
 
void initialize (const gsBasis< T > &basis, const index_t, const gsOptionList &options, gsQuadRule< T > &rule)
 Initialize.
 

Constructor & Destructor Documentation

gsVisitorCDR ( const gsPde< T > &  pde)
inline

Constructor.

Parameters
pdeReference to gsConvDiffRePde object
gsVisitorCDR ( const gsFunction< T > &  rhs,
const gsFunction< T > &  coeff_A,
const gsFunction< T > &  coeff_b,
const gsFunction< T > &  coeff_c,
stabilizerCDR::method  flagStabilization = stabilizerCDR::SUPG 
)
inline

Constructor for gsVisitorCDR, convection-diffusion-reaction.

Parameters
[in]rhsGiven right-hand-side function/source term that, for each evaluation point, returns a scalar.
[in]coeff_AgsFunction that, for each evaluation point, returns a vector of size \(d^2\). The entries of \(A\) should appear in the order (for \(d=3\)) \( (A_{11},A_{21},A_{31},A_{12},A_{22},A_{32},A_{13},A_{23},A_{33})^T\), such that A.resize(d,d) returns the correct matrix.
[in]coeff_bgsFunction that, for each evaluation point, returns a vector of size \(d\).
[in]coeff_cgsFunction that, for each evaluation point, returns a scalar.
[in]flagStabilizationSpecifies stabilization for the convection term.
0: no stabilization
1: SUPG-stabilization