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

Detailed Description

template<class T>
class gismo::gsVisitorDg< T >

Visitor for adding the interface conditions for the interior penalty methods of the Poisson problem.

This visitor adds the following term to the left-hand side (bilinear form):

\[ s_{k,\ell}(u,v) := - \alpha \int_{\Gamma^{(k,\ell)}} \{\nabla u\} \cdot \mathbf{n} [ v ] - \beta \int_{\Gamma^{(k,\ell)}} \{\nabla v\} \cdot \mathbf{n} [ u ] + \delta ( h_k^{-1} + h_\ell^{-1}) \int_{\Gamma^{(k,\ell)}} [ u ][ v ], \]

where \( v \) is the test function and \( u \) is trial function, \( [u] = u^{(k)} - u^{(\ell)} \) denotes the jump accross the interface and \( \{ u \} = (u^{(k)} + u^{(\ell)})/2\) denotes the average between the two patches.

The default values for DG.Alpha and DG.Beta are \(\alpha=\beta=1\), which corresponds to the Symmetric Interior Penalty discontinuous Galerkin (SIPG) method. The default value for DG.Penalty is -1, which yields \(\delta=4(p+d)(p+1)\). If a positive value for DG.Penalty is chosen, that value is taken for \(\delta\).

The (normal) grid sizes are estimated based on the geometry function. Use the option DG.ParameterGridSize to just use the grid size on the parameter domain.

An analogous visitor for handling the Dirichlet boundary conditions weakly, is the gsVisitorNitsche.

+ Collaboration diagram for gsVisitorDg< T >:

Public Member Functions

void assemble (gsDomainIterator< T > &element1, gsDomainIterator< T > &element2, gsVector< T > &quWeights)
 Assemble on element.
 
void evaluate (const gsBasis< T > &B1, const gsGeometry< T > &geo1, const gsBasis< T > &B2, const gsGeometry< T > &geo2, const gsMatrix< T > &quNodes1, const gsMatrix< T > &quNodes2)
 Evaluate on element.
 
 gsVisitorDg ()
 Constructor.
 
 gsVisitorDg (const gsPde< T > &pde)
 Constructor. More...
 
void initialize (const gsBasis< T > &basis1, const gsBasis< T > &basis2, const boundaryInterface &bi, const gsOptionList &options, gsQuadRule< T > &rule)
 Initialize.
 
void localToGlobal (const index_t patch1, const index_t patch2, const std::vector< gsMatrix< T > > &eliminatedDofs, gsSparseSystem< T > &system)
 Adds the contributions to the sparse system.
 

Static Public Member Functions

static gsOptionList defaultOptions ()
 Default options.
 
static T estimateSmallestPerpendicularCellSize (const gsBasis< T > &basis, const gsGeometry< T > &geo, patchSide side)
 Estimates the gird size perpendicular to the given side on the physical domain, as required for SIPG and Nitsche.
 

Private Attributes

m_alpha
 Parameter \(\alpha\) for the bilinear form.
 
m_beta
 Parameter \(\beta\) for the bilinear form.
 
const gsPde< T > * m_pde
 The underlying PDE.
 
m_penalty
 Parameter \(\delta\) for the bilinear form.
 
patchSide m_side1
 Side on first patch that corresponds to interface.
 
patchSide m_side2
 Side on second patch that corresponds to interface.
 

Constructor & Destructor Documentation

gsVisitorDg ( const gsPde< T > &  pde)
inline

Constructor.

Parameters
pdeReference to gsPde object