LifeV
OseenAssembler< meshType, matrixType, vectorType > Class Template Reference

OseenAssembler - Assembly class for the Oseen problem. More...

#include <OseenAssembler.hpp>

+ Collaboration diagram for OseenAssembler< meshType, matrixType, vectorType >:

Private Types

typedef CurrentFE currentFE_Type
 
typedef std::unique_ptr< currentFE_TypecurrentFEPtr_Type
 
typedef MatrixElemental localMatrix_Type
 
typedef std::unique_ptr< localMatrix_TypelocalMatrixPtr_Type
 
typedef VectorElemental localVector_Type
 
typedef std::unique_ptr< localVector_TypelocalVectorPtr_Type
 

Private Attributes

fespacePtr_Type M_uFESpace
 
fespacePtr_Type M_pFESpace
 
fespacePtr_Type M_betaFESpace
 
currentFEPtr_Type M_viscousCFE
 
currentFEPtr_Type M_gradPressureUCFE
 
currentFEPtr_Type M_gradPressurePCFE
 
currentFEPtr_Type M_divergenceUCFE
 
currentFEPtr_Type M_divergencePCFE
 
currentFEPtr_Type M_massCFE
 
currentFEPtr_Type M_massBetaCFE
 
currentFEPtr_Type M_massPressureCFE
 
currentFEPtr_Type M_convectionUCFE
 
currentFEPtr_Type M_convectionBetaCFE
 
currentFEPtr_Type M_convectionRhsUCFE
 
currentFEPtr_Type M_massRhsCFE
 
localMatrixPtr_Type M_localViscous
 
localMatrixPtr_Type M_localGradPressure
 
localMatrixPtr_Type M_localDivergence
 
localMatrixPtr_Type M_localMass
 
localMatrixPtr_Type M_localMassPressure
 
localMatrixPtr_Type M_localConvection
 
localVectorPtr_Type M_localConvectionRhs
 
localVectorPtr_Type M_localMassRhs
 

Public Types

typedef MapEpetra map_Type
 
typedef FESpace< meshType, map_Typefespace_Type
 
typedef std::shared_ptr< fespace_TypefespacePtr_Type
 
typedef AssemblyElemental::function_Type function_Type
 
typedef std::shared_ptr< matrixType > matrixPtr_Type
 
typedef LifeChrono chrono_Type
 

Constructor & Destructor

 OseenAssembler ()
 Empty Constructor. More...
 
virtual ~OseenAssembler ()
 Destructor. More...
 

Methods

void setup (const fespacePtr_Type &uFESpace, const fespacePtr_Type &pFESpace)
 Setup method for the FESpaces. More...
 
void setup (const fespacePtr_Type &uFESpace, const fespacePtr_Type &pFESpace, const fespacePtr_Type &betaFESpace)
 Setup method for the FESpace with a different space for the convective field. More...
 

Assembly procedures

void addViscousStress (matrixType &matrix, const Real &viscosity)
 Add the viscous stress in the standard block. More...
 
void addViscousStress (matrixType &matrix, const Real &viscosity, const UInt &offsetLeft, const UInt &offsetUp)
 Add the viscous stress using the given offsets. More...
 
void addStiffStrain (matrixType &matrix, const Real &viscosity)
 Add the stiff strain in the standard block. More...
 
void addStiffStrain (matrixType &matrix, const Real &viscosity, const UInt &offsetLeft, const UInt &offsetUp)
 Add the stiff strain using the given offsets. More...
 
void addGradPressure (matrixType &matrix)
 Add the term involved in the gradient of the pressure term. More...
 
void addGradPressure (matrixType &matrix, const UInt &offsetLeft, const UInt &offsetUp)
 Add the term involved in the gradient of the pressure term using the given offsets. More...
 
void addGradientTranspose (matrixType &matrix, const Real &coefficient=1.0)
 Add the term corresponding to the divergence free constraint. More...
 
void addGradientTranspose (matrixType &matrix, const UInt &offsetLeft, const UInt &offsetUp, const Real &coefficient=1.0)
 Add the divergence free constraint in a given position of the matrix using the grad calls. More...
 
void addDivergence (matrixType &matrix, const Real &coefficient=1.0)
 Add the term corresponding to the divergence free constraint. More...
 
void addDivergence (matrixType &matrix, const UInt &offsetLeft, const UInt &offsetUp, const Real &coefficient=1.0)
 Add the divergence free constraint in a given position of the matrix. More...
 
void addMass (matrixType &matrix, const Real &coefficient)
 Add the mass. More...
 
void addMass (matrixType &matrix, const Real &coefficient, const UInt &offsetLeft, const UInt offsetUp)
 Add the mass using offsets. More...
 
void addPressureMass (matrixType &matrix, const Real &coefficient)
 Add the Pressure mass. More...
 
void addPressureMass (matrixType &matrix, const Real &coefficient, const UInt &offsetLeft, const UInt offsetUp)
 Add the mass using offsets. More...
 
void addMassDivW (matrixType &matrix, const Real &coefficient, const vectorType &beta)
 Add a consistent stabilizing term. More...
 
void addMassDivW (matrixType &matrix, const Real &coefficient, const vectorType &beta, const UInt &offsetLeft, const UInt offsetUp)
 Add a consistent stabilizing term with the given offsets. More...
 
void addConvection (matrixType &matrix, const Real &coefficient, const vectorType &beta)
 Add the convective term. More...
 
void addConvection (matrixType &matrix, const Real &coefficient, const vectorType &beta, const UInt &offsetLeft, const UInt offsetUp)
 Add the convective term with the given offsets. More...
 
void addNewtonConvection (matrixType &matrix, const vectorType &beta, const UInt &offsetLeft, const UInt offsetUp)
 Add the convective term necessary to build the Newton method. More...
 
void addNewtonConvection (matrixType &matrix, const vectorType &beta)
 Add the convective term necessary to build the Newton method. More...
 
void addSymmetricConvection (matrixType &matrix, const Real &coefficient, const vectorType &beta)
 Add the convective term. More...
 
void addSymmetricConvection (matrixType &matrix, const Real &coefficient, const vectorType &beta, const UInt &offsetLeft, const UInt offsetUp)
 Add the symmetric convective term with the given offset. More...
 
void addConvectionRhs (vectorType &rhs, const Real &coefficient, const vectorType &velocity)
 Add an explicit convection term to the right hand side. More...
 
void addMassRhs (vectorType &rhs, const function_Type &fun, const Real &t)
 
void addFluxTerms (vectorType &vector, BCHandler const &bcHandler)
 

Set Methods

void setQuadRuleForMassRhs (const QuadratureRule &qr)
 Setter for the quadrature used for the right hand side. More...
 

Private Methods

 OseenAssembler (const OseenAssembler &)
 

Detailed Description

template<typename meshType, typename matrixType, typename vectorType>
class LifeV::OseenAssembler< meshType, matrixType, vectorType >

OseenAssembler - Assembly class for the Oseen problem.

Signes!! Coefficients

Author
Samuel Quinodoz

Definition at line 66 of file OseenAssembler.hpp.

Member Typedef Documentation

◆ map_Type

Definition at line 73 of file OseenAssembler.hpp.

◆ fespace_Type

typedef FESpace<meshType, map_Type> fespace_Type

Definition at line 75 of file OseenAssembler.hpp.

◆ fespacePtr_Type

typedef std::shared_ptr<fespace_Type> fespacePtr_Type

Definition at line 76 of file OseenAssembler.hpp.

◆ function_Type

◆ matrixPtr_Type

typedef std::shared_ptr<matrixType> matrixPtr_Type

Definition at line 80 of file OseenAssembler.hpp.

◆ chrono_Type

Definition at line 82 of file OseenAssembler.hpp.

◆ currentFE_Type

typedef CurrentFE currentFE_Type
private

Definition at line 264 of file OseenAssembler.hpp.

◆ currentFEPtr_Type

typedef std::unique_ptr<currentFE_Type> currentFEPtr_Type
private

Definition at line 265 of file OseenAssembler.hpp.

◆ localMatrix_Type

Definition at line 267 of file OseenAssembler.hpp.

◆ localMatrixPtr_Type

typedef std::unique_ptr<localMatrix_Type> localMatrixPtr_Type
private

Definition at line 268 of file OseenAssembler.hpp.

◆ localVector_Type

Definition at line 270 of file OseenAssembler.hpp.

◆ localVectorPtr_Type

typedef std::unique_ptr<localVector_Type> localVectorPtr_Type
private

Definition at line 271 of file OseenAssembler.hpp.

Constructor & Destructor Documentation

◆ OseenAssembler() [1/2]

Empty Constructor.

Definition at line 334 of file OseenAssembler.hpp.

◆ ~OseenAssembler()

virtual ~OseenAssembler ( )
inlinevirtual

Destructor.

Definition at line 94 of file OseenAssembler.hpp.

◆ OseenAssembler() [2/2]

OseenAssembler ( const OseenAssembler< meshType, matrixType, vectorType > &  )
private

Member Function Documentation

◆ setup() [1/2]

void setup ( const fespacePtr_Type uFESpace,
const fespacePtr_Type pFESpace 
)
inline

Setup method for the FESpaces.

This method sets the FESpace for the assembly. With this method, the convective field is assumed to be the same as the velocity field. If they differ, use another setup method.

Definition at line 108 of file OseenAssembler.hpp.

◆ setup() [2/2]

void setup ( const fespacePtr_Type uFESpace,
const fespacePtr_Type pFESpace,
const fespacePtr_Type betaFESpace 
)

Setup method for the FESpace with a different space for the convective field.

Definition at line 368 of file OseenAssembler.hpp.

◆ addViscousStress() [1/2]

void addViscousStress ( matrixType &  matrix,
const Real viscosity 
)
inline

Add the viscous stress in the standard block.

Definition at line 123 of file OseenAssembler.hpp.

◆ addViscousStress() [2/2]

void addViscousStress ( matrixType &  matrix,
const Real viscosity,
const UInt offsetLeft,
const UInt offsetUp 
)

Add the viscous stress using the given offsets.

Definition at line 466 of file OseenAssembler.hpp.

◆ addStiffStrain() [1/2]

void addStiffStrain ( matrixType &  matrix,
const Real viscosity 
)
inline

Add the stiff strain in the standard block.

Definition at line 132 of file OseenAssembler.hpp.

◆ addStiffStrain() [2/2]

void addStiffStrain ( matrixType &  matrix,
const Real viscosity,
const UInt offsetLeft,
const UInt offsetUp 
)

Add the stiff strain using the given offsets.

Definition at line 511 of file OseenAssembler.hpp.

◆ addGradPressure() [1/2]

void addGradPressure ( matrixType &  matrix)
inline

Add the term involved in the gradient of the pressure term.

Definition at line 141 of file OseenAssembler.hpp.

◆ addGradPressure() [2/2]

void addGradPressure ( matrixType &  matrix,
const UInt offsetLeft,
const UInt offsetUp 
)

Add the term involved in the gradient of the pressure term using the given offsets.

Definition at line 559 of file OseenAssembler.hpp.

◆ addGradientTranspose() [1/2]

void addGradientTranspose ( matrixType &  matrix,
const Real coefficient = 1.0 
)
inline

Add the term corresponding to the divergence free constraint.

The default choice coefficient=1.0 leads to a divergence matrix which is the transpose of the pressure gradient matrix.

Definition at line 154 of file OseenAssembler.hpp.

◆ addGradientTranspose() [2/2]

void addGradientTranspose ( matrixType &  matrix,
const UInt offsetLeft,
const UInt offsetUp,
const Real coefficient = 1.0 
)

Add the divergence free constraint in a given position of the matrix using the grad calls.

Definition at line 606 of file OseenAssembler.hpp.

◆ addDivergence() [1/2]

void addDivergence ( matrixType &  matrix,
const Real coefficient = 1.0 
)
inline

Add the term corresponding to the divergence free constraint.

The default choice coefficient=1.0 leads to a divergence matrix which is the transpose of the pressure gradient matrix.

Definition at line 167 of file OseenAssembler.hpp.

◆ addDivergence() [2/2]

void addDivergence ( matrixType &  matrix,
const UInt offsetLeft,
const UInt offsetUp,
const Real coefficient = 1.0 
)

Add the divergence free constraint in a given position of the matrix.

Definition at line 653 of file OseenAssembler.hpp.

◆ addMass() [1/2]

void addMass ( matrixType &  matrix,
const Real coefficient 
)
inline

Add the mass.

Definition at line 176 of file OseenAssembler.hpp.

◆ addMass() [2/2]

void addMass ( matrixType &  matrix,
const Real coefficient,
const UInt offsetLeft,
const UInt  offsetUp 
)

Add the mass using offsets.

Definition at line 959 of file OseenAssembler.hpp.

◆ addPressureMass() [1/2]

void addPressureMass ( matrixType &  matrix,
const Real coefficient 
)
inline

Add the Pressure mass.

Definition at line 185 of file OseenAssembler.hpp.

◆ addPressureMass() [2/2]

void addPressureMass ( matrixType &  matrix,
const Real coefficient,
const UInt offsetLeft,
const UInt  offsetUp 
)

Add the mass using offsets.

Definition at line 1003 of file OseenAssembler.hpp.

◆ addMassDivW() [1/2]

void addMassDivW ( matrixType &  matrix,
const Real coefficient,
const vectorType &  beta 
)
inline

Add a consistent stabilizing term.

Definition at line 195 of file OseenAssembler.hpp.

◆ addMassDivW() [2/2]

void addMassDivW ( matrixType &  matrix,
const Real coefficient,
const vectorType &  beta,
const UInt offsetLeft,
const UInt  offsetUp 
)

Add a consistent stabilizing term with the given offsets.

Definition at line 1047 of file OseenAssembler.hpp.

◆ addConvection() [1/2]

void addConvection ( matrixType &  matrix,
const Real coefficient,
const vectorType &  beta 
)
inline

Add the convective term.

Definition at line 204 of file OseenAssembler.hpp.

◆ addConvection() [2/2]

void addConvection ( matrixType &  matrix,
const Real coefficient,
const vectorType &  beta,
const UInt offsetLeft,
const UInt  offsetUp 
)

Add the convective term with the given offsets.

Definition at line 701 of file OseenAssembler.hpp.

◆ addNewtonConvection() [1/2]

void addNewtonConvection ( matrixType &  matrix,
const vectorType &  beta,
const UInt offsetLeft,
const UInt  offsetUp 
)

Add the convective term necessary to build the Newton method.

Definition at line 758 of file OseenAssembler.hpp.

◆ addNewtonConvection() [2/2]

void addNewtonConvection ( matrixType &  matrix,
const vectorType &  beta 
)
inline

Add the convective term necessary to build the Newton method.

Definition at line 216 of file OseenAssembler.hpp.

◆ addSymmetricConvection() [1/2]

void addSymmetricConvection ( matrixType &  matrix,
const Real coefficient,
const vectorType &  beta 
)
inline

Add the convective term.

Definition at line 222 of file OseenAssembler.hpp.

◆ addSymmetricConvection() [2/2]

void addSymmetricConvection ( matrixType &  matrix,
const Real coefficient,
const vectorType &  beta,
const UInt offsetLeft,
const UInt  offsetUp 
)

Add the symmetric convective term with the given offset.

Definition at line 827 of file OseenAssembler.hpp.

◆ addConvectionRhs()

void addConvectionRhs ( vectorType &  rhs,
const Real coefficient,
const vectorType &  velocity 
)

Add an explicit convection term to the right hand side.

Definition at line 897 of file OseenAssembler.hpp.

+ Here is the caller graph for this function:

◆ addMassRhs()

void addMassRhs ( vectorType &  rhs,
const function_Type fun,
const Real t 
)

Definition at line 1105 of file OseenAssembler.hpp.

◆ addFluxTerms()

void addFluxTerms ( vectorType &  vector,
BCHandler const &  bcHandler 
)

Definition at line 1147 of file OseenAssembler.hpp.

◆ setQuadRuleForMassRhs()

void setQuadRuleForMassRhs ( const QuadratureRule qr)
inline

Setter for the quadrature used for the right hand side.

Beware that calling this function might be quite heavy, so avoid using it when it is not necessary.

Definition at line 247 of file OseenAssembler.hpp.

Field Documentation

◆ M_uFESpace

fespacePtr_Type M_uFESpace
private

Definition at line 283 of file OseenAssembler.hpp.

◆ M_pFESpace

fespacePtr_Type M_pFESpace
private

Definition at line 286 of file OseenAssembler.hpp.

◆ M_betaFESpace

fespacePtr_Type M_betaFESpace
private

Definition at line 289 of file OseenAssembler.hpp.

◆ M_viscousCFE

currentFEPtr_Type M_viscousCFE
private

Definition at line 292 of file OseenAssembler.hpp.

◆ M_gradPressureUCFE

currentFEPtr_Type M_gradPressureUCFE
private

Definition at line 294 of file OseenAssembler.hpp.

◆ M_gradPressurePCFE

currentFEPtr_Type M_gradPressurePCFE
private

Definition at line 295 of file OseenAssembler.hpp.

◆ M_divergenceUCFE

currentFEPtr_Type M_divergenceUCFE
private

Definition at line 297 of file OseenAssembler.hpp.

◆ M_divergencePCFE

currentFEPtr_Type M_divergencePCFE
private

Definition at line 298 of file OseenAssembler.hpp.

◆ M_massCFE

currentFEPtr_Type M_massCFE
private

Definition at line 300 of file OseenAssembler.hpp.

◆ M_massBetaCFE

currentFEPtr_Type M_massBetaCFE
private

Definition at line 301 of file OseenAssembler.hpp.

◆ M_massPressureCFE

currentFEPtr_Type M_massPressureCFE
private

Definition at line 302 of file OseenAssembler.hpp.

◆ M_convectionUCFE

currentFEPtr_Type M_convectionUCFE
private

Definition at line 304 of file OseenAssembler.hpp.

◆ M_convectionBetaCFE

currentFEPtr_Type M_convectionBetaCFE
private

Definition at line 305 of file OseenAssembler.hpp.

◆ M_convectionRhsUCFE

currentFEPtr_Type M_convectionRhsUCFE
private

Definition at line 307 of file OseenAssembler.hpp.

◆ M_massRhsCFE

currentFEPtr_Type M_massRhsCFE
private

Definition at line 310 of file OseenAssembler.hpp.

◆ M_localViscous

localMatrixPtr_Type M_localViscous
private

Definition at line 314 of file OseenAssembler.hpp.

◆ M_localGradPressure

localMatrixPtr_Type M_localGradPressure
private

Definition at line 316 of file OseenAssembler.hpp.

◆ M_localDivergence

localMatrixPtr_Type M_localDivergence
private

Definition at line 318 of file OseenAssembler.hpp.

◆ M_localMass

localMatrixPtr_Type M_localMass
private

Definition at line 320 of file OseenAssembler.hpp.

◆ M_localMassPressure

localMatrixPtr_Type M_localMassPressure
private

Definition at line 322 of file OseenAssembler.hpp.

◆ M_localConvection

localMatrixPtr_Type M_localConvection
private

Definition at line 324 of file OseenAssembler.hpp.

◆ M_localConvectionRhs

localVectorPtr_Type M_localConvectionRhs
private

Definition at line 326 of file OseenAssembler.hpp.

◆ M_localMassRhs

localVectorPtr_Type M_localMassRhs
private

Definition at line 328 of file OseenAssembler.hpp.


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