LifeV
StabilizationIP< MeshType, DofType > Class Template Reference

StabilizationIP Class. More...

#include <StabilizationIP.hpp>

+ Collaboration diagram for StabilizationIP< MeshType, DofType >:

Public Types

typedef std::shared_ptr< MeshTypemesh_type
 
typedef MeshType mesh_Type
 
typedef DofType dof_Type
 
typedef std::shared_ptr< mesh_TypemeshPtr_Type
 
typedef std::shared_ptr< dof_TypedofPtr_Type
 

Constructor and Destructor

 StabilizationIP ()
 Default Constructor. More...
 
virtual ~StabilizationIP ()
 

Methods

template<typename MatrixType , typename VectorType >
void apply (MatrixType &matrix, const VectorType &state, bool verbose=true)
 compute IP stabilization terms and add them into matrix More...
 
void showMe (std::ostream &output=std::cout) const
 Display class informations. More...
 

Set Methods

void setGammaBeta (const Real &gammaBeta)
 Set the stabilization parameter $\gamma_\beta$ for $\Sigma_{f\in\mathcal{F}}\int_{f} [\beta \cdot \nabla \mathbf{u}] [\beta \cdot \nabla \mathbf{v}]$. More...
 
void setGammaDiv (const Real &gammaDiv)
 Set the stabilization parameter $\gamma_d$ for $\Sigma_{f\in\mathcal{F}}\int_{f} [div \mathbf{u}] [div \mathbf{v}]$. More...
 
void setGammaPress (const Real &gammaPress)
 Set the stabilization parameter $\gamma_p$ for $\Sigma_{f\in\mathcal{F}}\int_{f} [\nabla p] \cdot [\nabla q]$. More...
 
void setViscosity (const Real &viscosity)
 Set the fluid viscosity $\nu$. More...
 
void setMesh (const meshPtr_Type mesh)
 Set the mesh file. More...
 
void setDiscretization (const dofPtr_Type &dof, const ReferenceFE &refFE, CurrentFEManifold &feBd, const QuadratureRule &quadRule)
 Set Discretization. More...
 
template<typename MapType >
void setFeSpaceVelocity (FESpace< mesh_Type, MapType > &feSpaceVelocity)
 Set the fespace. More...
 

Private Types

typedef ID(* FTOP) (ID const &localFacet, ID const &point)
 facetToPoint(i,j) = localId of jth point on ith local facet More...
 

Private Constructor

 StabilizationIP (const StabilizationIP< mesh_Type, dof_Type > &original)
 Copy Constructor. More...
 

Private Attributes

meshPtr_Type M_mesh
 Pointer to the mesh object. More...
 
dofPtr_Type M_dof
 reference to the DofType data structure More...
 
std::shared_ptr< CurrentFEM_feOnSide1
 current Fe on side 1 of the current facet More...
 
std::shared_ptr< CurrentFEM_feOnSide2
 current Fe on side 2 of the current facet More...
 
CurrentFEManifoldM_feBd
 current boundary FE More...
 
Real M_gammaBeta
 Stabilization parameter $\gamma_\beta$ for $\int_{facet} [\beta \cdot \nabla \mathbf{u}] [\beta \cdot \nabla \mathbf{v}]$. More...
 
Real M_gammaDiv
 Stabilization parameter $\gamma_d$ for $\int_{facet} [div \mathbf{u}] [div \mathbf{v}]$. More...
 
Real M_gammaPress
 Stabilization parameter $\gamma_p$ for $\int_{facet} [\nabla p] \cdot [\nabla q]$. More...
 
Real M_viscosity
 Fluid viscosity $\nu$. More...
 
FTOP M_facetToPoint
 facetToPoint(i,j) = localId of jth point on ith local facet More...
 

Detailed Description

template<typename MeshType, typename DofType>
class LifeV::details::StabilizationIP< MeshType, DofType >

StabilizationIP Class.

Interior Penality Stabilization

Author
C. Winkelmann chris.nosp@m.toph.nosp@m..wink.nosp@m.elma.nosp@m.nn@ep.nosp@m.fl.c.nosp@m.h

Implementation of I.P. stabilization for inf-sup incompatible finite elements for the Navier-Stokes equations.

This function adds the following stabilization terms to the Navier-Stokes monolithic matrix:

  1. Block(1,1): $\Sigma_{f\in\mathcal{F}}\int_{f} c_\beta [\beta \cdot \nabla \mathbf{u}] [\beta \cdot \nabla \mathbf{v}] + \Sigma_{f\in\mathcal{F}}\int_{f} c_d [div \mathbf{u}] [div \mathbf{v}]$
  2. Block(1,2): 0
  3. Block(2,1): 0
  4. Block(2,2): $\Sigma_{f\in\mathcal{F}}\int_{f} c_p [\nabla p] \cdot [\nabla q]$

where

  1. $\mathcal{F}$ is the set of all the internal facets in the mesh;
  2. $[\cdot]$ is the jump operator: $[x] = x^+ - x^-$.

and the parameter $ c_\beta$, $c_d$, $c_p$, are defined as follows:

  1. $\displaystyle c_\beta = \frac{\gamma_\beta h} {\|\beta\|_\infty} $, being $h$ the facet measure;
  2. $\displaystyle c_d = \gamma_d h \|\beta\|_\infty $;
  3. $\displaystyle c_p = \frac{\gamma_p h}{\max(\|\beta\|_\infty, \nu/h^2)}$.

Both high Pechlet numbers and inf-sup incompatible FEM are stabilized.

Definition at line 91 of file StabilizationIP.hpp.

Member Typedef Documentation

◆ mesh_type

typedef std::shared_ptr<MeshType> mesh_type

Definition at line 97 of file StabilizationIP.hpp.

◆ mesh_Type

Definition at line 98 of file StabilizationIP.hpp.

◆ dof_Type

typedef DofType dof_Type

Definition at line 99 of file StabilizationIP.hpp.

◆ meshPtr_Type

typedef std::shared_ptr<mesh_Type> meshPtr_Type

Definition at line 100 of file StabilizationIP.hpp.

◆ dofPtr_Type

typedef std::shared_ptr<dof_Type> dofPtr_Type

Definition at line 101 of file StabilizationIP.hpp.

◆ FTOP

typedef ID( * FTOP) (ID const &localFacet, ID const &point)
private

facetToPoint(i,j) = localId of jth point on ith local facet

Definition at line 189 of file StabilizationIP.hpp.

Constructor & Destructor Documentation

◆ StabilizationIP() [1/2]

Default Constructor.

Definition at line 229 of file StabilizationIP.hpp.

◆ ~StabilizationIP()

virtual ~StabilizationIP ( )
inlinevirtual

Definition at line 110 of file StabilizationIP.hpp.

◆ StabilizationIP() [2/2]

StabilizationIP ( const StabilizationIP< mesh_Type, dof_Type > &  original)
private

Copy Constructor.

Member Function Documentation

◆ apply()

void apply ( MatrixType &  matrix,
const VectorType &  state,
bool  verbose = true 
)

compute IP stabilization terms and add them into matrix

This function adds the following stabilization terms to the Navier-Stokes monolithic matrix:

  1. Block(1,1): $\Sigma_{f\in\mathcal{F}}\int_{f} c_\beta [\beta \cdot \nabla \mathbf{u}] [\beta \cdot \nabla \mathbf{v}] + \Sigma_{f\in\mathcal{F}}\int_{f} c_d [div \mathbf{u}] [div \mathbf{v}]$
  2. Block(1,2): 0
  3. Block(2,1): 0
  4. Block(2,2): $\Sigma_{f\in\mathcal{F}}\int_{f} c_p [\nabla p] \cdot [\nabla q]$

where

  1. $\displaystyle c_\beta = \frac{\gamma_\beta h} {\|\beta\|_\infty} $, being $h$ the facet measure;
  2. $\displaystyle c_d = \gamma_\beta h \|\beta\|_\infty $;
  3. $\displaystyle c_p = \frac{\gamma_p h}{\max(\|\beta\|_\infty, \nu/h^2)}$.

Both high Pechlet numbers and inf-sup incompatible FEM are stabilized.

PREREQUISITE: The velocity and the pressure field should belong to the same finite element space

Parameters are the followings:

Parameters
dtReal timestep (INPUT)
matrixMatrixType where the stabilization terms are added into. (OUTPUT)
stateVectorType velocity field for the linearization of the stabilization (INPUT)
verbosebool whenever of not to print on screen

Definition at line 242 of file StabilizationIP.hpp.

◆ showMe()

void showMe ( std::ostream &  output = std::cout) const

Display class informations.

Write information relative to the class on output

Parameters
outputostream ostream were to write (Default cout)

Definition at line 572 of file StabilizationIP.hpp.

◆ setGammaBeta()

void setGammaBeta ( const Real gammaBeta)
inline

Set the stabilization parameter $\gamma_\beta$ for $\Sigma_{f\in\mathcal{F}}\int_{f} [\beta \cdot \nabla \mathbf{u}] [\beta \cdot \nabla \mathbf{v}]$.

Definition at line 154 of file StabilizationIP.hpp.

◆ setGammaDiv()

void setGammaDiv ( const Real gammaDiv)
inline

Set the stabilization parameter $\gamma_d$ for $\Sigma_{f\in\mathcal{F}}\int_{f} [div \mathbf{u}] [div \mathbf{v}]$.

Definition at line 159 of file StabilizationIP.hpp.

◆ setGammaPress()

void setGammaPress ( const Real gammaPress)
inline

Set the stabilization parameter $\gamma_p$ for $\Sigma_{f\in\mathcal{F}}\int_{f} [\nabla p] \cdot [\nabla q]$.

Definition at line 164 of file StabilizationIP.hpp.

◆ setViscosity()

void setViscosity ( const Real viscosity)
inline

Set the fluid viscosity $\nu$.

Definition at line 169 of file StabilizationIP.hpp.

◆ setMesh()

void setMesh ( const meshPtr_Type  mesh)
inline

Set the mesh file.

Definition at line 174 of file StabilizationIP.hpp.

◆ setDiscretization()

void setDiscretization ( const dofPtr_Type dof,
const ReferenceFE refFE,
CurrentFEManifold feBd,
const QuadratureRule quadRule 
)

Set Discretization.

Definition at line 587 of file StabilizationIP.hpp.

◆ setFeSpaceVelocity()

void setFeSpaceVelocity ( FESpace< mesh_Type, MapType > &  feSpaceVelocity)

Set the fespace.

Definition at line 599 of file StabilizationIP.hpp.

Field Documentation

◆ M_mesh

meshPtr_Type M_mesh
private

Pointer to the mesh object.

Definition at line 201 of file StabilizationIP.hpp.

◆ M_dof

dofPtr_Type M_dof
private

reference to the DofType data structure

Definition at line 203 of file StabilizationIP.hpp.

◆ M_feOnSide1

std::shared_ptr<CurrentFE> M_feOnSide1
private

current Fe on side 1 of the current facet

Definition at line 205 of file StabilizationIP.hpp.

◆ M_feOnSide2

std::shared_ptr<CurrentFE> M_feOnSide2
private

current Fe on side 2 of the current facet

Definition at line 207 of file StabilizationIP.hpp.

◆ M_feBd

CurrentFEManifold* M_feBd
private

current boundary FE

Definition at line 209 of file StabilizationIP.hpp.

◆ M_gammaBeta

Real M_gammaBeta
private

Stabilization parameter $\gamma_\beta$ for $\int_{facet} [\beta \cdot \nabla \mathbf{u}] [\beta \cdot \nabla \mathbf{v}]$.

Definition at line 211 of file StabilizationIP.hpp.

◆ M_gammaDiv

Real M_gammaDiv
private

Stabilization parameter $\gamma_d$ for $\int_{facet} [div \mathbf{u}] [div \mathbf{v}]$.

Definition at line 213 of file StabilizationIP.hpp.

◆ M_gammaPress

Real M_gammaPress
private

Stabilization parameter $\gamma_p$ for $\int_{facet} [\nabla p] \cdot [\nabla q]$.

Definition at line 215 of file StabilizationIP.hpp.

◆ M_viscosity

Real M_viscosity
private

Fluid viscosity $\nu$.

Definition at line 217 of file StabilizationIP.hpp.

◆ M_facetToPoint

FTOP M_facetToPoint
private

facetToPoint(i,j) = localId of jth point on ith local facet

Definition at line 219 of file StabilizationIP.hpp.


The documentation for this class was generated from the following file: