Chaste  Release::3.4
StokesFlowPreconditionerAssembler< DIM > Class Template Reference

#include <StokesFlowPreconditionerAssembler.hpp>

+ Inheritance diagram for StokesFlowPreconditionerAssembler< DIM >:
+ Collaboration diagram for StokesFlowPreconditionerAssembler< DIM >:

Public Member Functions

 StokesFlowPreconditionerAssembler (AbstractTetrahedralMesh< DIM, DIM > *pMesh, StokesFlowProblemDefinition< DIM > *pProblemDefinition)
 
- Public Member Functions inherited from StokesFlowAssembler< DIM >
 StokesFlowAssembler (AbstractTetrahedralMesh< DIM, DIM > *pMesh, StokesFlowProblemDefinition< DIM > *pProblemDefinition)
 
- Public Member Functions inherited from AbstractContinuumMechanicsAssembler< DIM, true, true >
 AbstractContinuumMechanicsAssembler (AbstractTetrahedralMesh< DIM, DIM > *pMesh)
 
virtual ~AbstractContinuumMechanicsAssembler ()
 
- Public Member Functions inherited from AbstractFeAssemblerInterface< CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX >
 AbstractFeAssemblerInterface ()
 
void SetMatrixToAssemble (Mat &rMatToAssemble, bool zeroMatrixBeforeAssembly=true)
 
void SetVectorToAssemble (Vec &rVecToAssemble, bool zeroVectorBeforeAssembly)
 
void Assemble ()
 
void AssembleMatrix ()
 
void AssembleVector ()
 
virtual ~AbstractFeAssemblerInterface ()
 

Private Member Functions

c_matrix< double,
PRESSURE_BLOCK_SIZE_ELEMENTAL,
PRESSURE_BLOCK_SIZE_ELEMENTAL
ComputePressurePressureMatrixTerm (c_vector< double, NUM_VERTICES_PER_ELEMENT > &rLinearPhi, c_matrix< double, DIM, NUM_VERTICES_PER_ELEMENT > &rGradLinearPhi, c_vector< double, DIM > &rX, Element< DIM, DIM > *pElement)
 

Static Private Attributes

static const unsigned NUM_VERTICES_PER_ELEMENT = DIM+1
 
static const unsigned PRESSURE_BLOCK_SIZE_ELEMENTAL = NUM_VERTICES_PER_ELEMENT
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractContinuumMechanicsAssembler< DIM, true, true >
void DoAssemble ()
 
virtual c_vector< double,
PRESSURE_BLOCK_SIZE_ELEMENTAL
ComputePressureVectorTerm (c_vector< double, NUM_VERTICES_PER_ELEMENT > &rLinearPhi, c_matrix< double, DIM, NUM_VERTICES_PER_ELEMENT > &rGradLinearPhi, c_vector< double, DIM > &rX, Element< DIM, DIM > *pElement)
 
void AssembleOnElement (Element< DIM, DIM > &rElement, c_matrix< double, STENCIL_SIZE, STENCIL_SIZE > &rAElem, c_vector< double, STENCIL_SIZE > &rBElem)
 
- Protected Attributes inherited from AbstractContinuumMechanicsAssembler< DIM, true, true >
AbstractTetrahedralMesh< DIM,
DIM > * 
mpMesh
 
GaussianQuadratureRule< DIM > * mpQuadRule
 
- Protected Attributes inherited from AbstractFeAssemblerInterface< CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX >
Vec mVectorToAssemble
 
Mat mMatrixToAssemble
 
bool mAssembleMatrix
 
bool mAssembleVector
 
bool mZeroMatrixBeforeAssembly
 
bool mZeroVectorBeforeAssembly
 
PetscInt mOwnershipRangeLo
 
PetscInt mOwnershipRangeHi
 

Detailed Description

template<unsigned DIM>
class StokesFlowPreconditionerAssembler< DIM >

Assembler for setting up (volume-integral parts of) the preconditioner matrix used in the FEM solver Stokes' Flow.

The system matrix has the block form (except see comment below) [A B] [B^T 0] In contrast, the preconditioner is: [A B] [B^T M]

The class therefore just needs to inherit from StokesFlowAssembler, which will assemble the A,B,B^T terms, and it just has to overload the pressure-pressure block method.

NOTE: The elemental matrix and vector is as above. The full matrix and vector uses a completely different ordering: for parallelisation reasons the pressure variables are interleaved with the spatial variables and dummy pressure variables are used for internal nodes. For example, in 2d, the ordering is [U1 V1 P1 , .. , Un Vn, Pn] where n is the total number of nodes.

Definition at line 65 of file StokesFlowPreconditionerAssembler.hpp.

Constructor & Destructor Documentation

template<unsigned DIM>
StokesFlowPreconditionerAssembler< DIM >::StokesFlowPreconditionerAssembler ( AbstractTetrahedralMesh< DIM, DIM > *  pMesh,
StokesFlowProblemDefinition< DIM > *  pProblemDefinition 
)
inline

Constructor

Parameters
pMeshmesh
pProblemDefinitionproblem definition

Definition at line 106 of file StokesFlowPreconditionerAssembler.hpp.

Member Function Documentation

template<unsigned DIM>
c_matrix<double,PRESSURE_BLOCK_SIZE_ELEMENTAL,PRESSURE_BLOCK_SIZE_ELEMENTAL> StokesFlowPreconditionerAssembler< DIM >::ComputePressurePressureMatrixTerm ( c_vector< double, NUM_VERTICES_PER_ELEMENT > &  rLinearPhi,
c_matrix< double, DIM, NUM_VERTICES_PER_ELEMENT > &  rGradLinearPhi,
c_vector< double, DIM > &  rX,
Element< DIM, DIM > *  pElement 
)
inlineprivatevirtual

For a continuum mechanics problem in mixed form (displacement-pressure or velocity-pressure), the matrix has the form (except see comments about ordering above) [A B1] [B2^T C ] The function is related to the pressure-pressure block, i.e. C

Returns
C=M, the mass matrix.
Parameters
rLinearPhiAll the linear basis functions on this element, evaluated at the current quad point
rGradLinearPhiGradients of all the linear basis functions on this element, evaluated at the current quad point
rXCurrent location (physical position)
pElementCurrent element

Reimplemented from AbstractContinuumMechanicsAssembler< DIM, true, true >.

Definition at line 91 of file StokesFlowPreconditionerAssembler.hpp.

Member Data Documentation

template<unsigned DIM>
const unsigned StokesFlowPreconditionerAssembler< DIM >::NUM_VERTICES_PER_ELEMENT = DIM+1
staticprivate

Number of vertices per element

Definition at line 69 of file StokesFlowPreconditionerAssembler.hpp.

template<unsigned DIM>
const unsigned StokesFlowPreconditionerAssembler< DIM >::PRESSURE_BLOCK_SIZE_ELEMENTAL = NUM_VERTICES_PER_ELEMENT
staticprivate

Size of the pressure block, per element, equal num_vertices times 1 (as p solved for at each vertex.

Definition at line 75 of file StokesFlowPreconditionerAssembler.hpp.


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