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

Detailed Description

template<class T>
class gismo::gsVisitorNitsche< T >

Visitor for adding the terms associated to weak (Nitsche-type) imposition of the Dirichlet boundary conditions.

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

\[ \alpha \int_{\Gamma_D} \nabla u \cdot \mathbf{n} v + \beta \int_{\Gamma_D} \nabla v \cdot \mathbf{n} u + \delta h^{-1} \int_{\Gamma_D} u v \]

and the following terms to the right-hand side (linear form):

\[ \beta \int_{\Gamma_D} g_D \nabla v \cdot \mathbf{n} u + \delta h^{-1} \int_{\Gamma_D} g_D v \cdot \mathbf{n} u, \]

where \(g_D\) is the Dirichlet value.

The default values for Nitsche.Alpha and Nitsche.Beta are \(\alpha=\beta=1\), which corresponds to the standard Nitsche method. The default value for Nitsche.Penalty is -1, which yields \(\delta=2.5(p+d)(p+1)\). If a positive value for Nitsche.Penalty is chosen, that value is taken for \(\delta\).

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

An analogous visitor for handling the internal smoothness weakly, is the gsVisitorDg.

+ Collaboration diagram for gsVisitorNitsche< T >:

Public Member Functions

void assemble (gsDomainIterator< T > &element, const gsVector< T > &quWeights)
 Assemble on element.
 
void evaluate (const gsBasis< T > &basis, const gsGeometry< T > &geo, const gsMatrix< T > &quNodes)
 Evaluate on element.
 
 gsVisitorNitsche (const gsPde< T > &pde, const boundary_condition< T > &bc)
 Constructor. More...
 
void initialize (const gsBasis< T > &basis, const index_t, const gsOptionList &options, gsQuadRule< T > &rule)
 Initialize.
 
void localToGlobal (const index_t patchIndex, const std::vector< gsMatrix< T > > &, gsSparseSystem< T > &system)
 Adds the contributions to the sparse system.
 
void localToGlobal (const gsDofMapper &mapper, const gsMatrix< T > &eliminatedDofs, const index_t patchIndex, gsSparseMatrix< T > &sysMatrix, gsMatrix< T > &rhsMatrix)
 Adds the contributions to the sparse system.
 

Static Public Member Functions

static gsOptionList defaultOptions ()
 Default options.
 

Private Attributes

m_alpha
 Parameter \(\alpha\) for the linear form.
 
m_beta
 Parameter \(\beta\) for the linear form.
 
const gsFunctionSet< T > * m_dirdata_ptr
 Dirichlet function.
 
const gsPde< T > * m_pde
 The underlying PDE.
 
m_penalty
 Parameter \(\delta\) for the linear form.
 
patchSide m_side
 Patch side.
 

Constructor & Destructor Documentation

gsVisitorNitsche ( const gsPde< T > &  pde,
const boundary_condition< T > &  bc 
)
inline

Constructor.

Parameters
pdeReference to gsPde object
bcThe boundary condition to be realized