G+Smo
24.08.0
Geometry + Simulation Modules
|
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.
Public Member Functions | |
void | assemble (gsDomainIterator< T > &, gsDomainIterator< T > &, 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 | |
T | m_alpha |
Parameter \(\alpha\) for the bilinear form. | |
T | m_beta |
Parameter \(\beta\) for the bilinear form. | |
const gsPde< T > * | m_pde |
The underlying PDE. | |
T | 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. | |
|
inline |
Constructor.
pde | Reference to gsPde object |