Chaste Commit::f2ff7ee04e70ac9d06c57344df8d017dbb12b97b
StokesFlowSolver< DIM > Class Template Reference

#include <StokesFlowSolver.hpp>

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

Public Member Functions

 StokesFlowSolver (AbstractTetrahedralMesh< DIM, DIM > &rQuadMesh, StokesFlowProblemDefinition< DIM > &rProblemDefinition, std::string outputDirectory)
 
virtual ~StokesFlowSolver ()
 
void Solve ()
 
void SetKspAbsoluteTolerance (double kspAbsoluteTolerance)
 
std::vector< c_vector< double, DIM > > & rGetSpatialSolution ()
 
std::vector< c_vector< double, DIM > > & rGetVelocities ()
 
- Public Member Functions inherited from AbstractContinuumMechanicsSolver< DIM >
 AbstractContinuumMechanicsSolver (AbstractTetrahedralMesh< DIM, DIM > &rQuadMesh, ContinuumMechanicsProblemDefinition< DIM > &rProblemDefinition, std::string outputDirectory, CompressibilityType compressibilityType)
 
virtual ~AbstractContinuumMechanicsSolver ()
 
void WriteCurrentSpatialSolution (std::string fileName, std::string fileExtension, int counterToAppend=-1)
 
void WriteCurrentPressureSolution (int counterToAppend=-1)
 
void SetWriteOutput (bool writeOutput=true)
 
void CreateVtkOutput (std::string spatialSolutionName="Spatial solution")
 
std::vector< double > & rGetCurrentSolution ()
 
std::vector< double > & rGetPressures ()
 

Private Member Functions

void AssembleSystem ()
 

Private Attributes

StokesFlowProblemDefinition< DIM > & mrProblemDefinition
 
StokesFlowAssembler< DIM > * mpStokesFlowAssembler
 
StokesFlowPreconditionerAssembler< DIM > * mpStokesFlowPreconditionerAssembler
 
ContinuumMechanicsNeumannBcsAssembler< DIM > * mpNeumannBcsAssembler
 
double mKspAbsoluteTol
 

Friends

class TestStokesFlowSolver
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractContinuumMechanicsSolver< DIM >
void AllocateMatrixMemory ()
 
void ApplyDirichletBoundaryConditions (ApplyDirichletBcsType type, bool symmetricProblem)
 
void AddIdentityBlockForDummyPressureVariables (ApplyDirichletBcsType type)
 
void RemovePressureDummyValuesThroughLinearInterpolation ()
 
- Protected Attributes inherited from AbstractContinuumMechanicsSolver< DIM >
AbstractTetrahedralMesh< DIM, DIM > & mrQuadMesh
 
ContinuumMechanicsProblemDefinition< DIM > & mrProblemDefinition
 
bool mWriteOutput
 
std::string mOutputDirectory
 
OutputFileHandlermpOutputFileHandler
 
std::vector< c_vector< double, DIM > > mSpatialSolution
 
std::vector< doublemPressureSolution
 
std::vector< doublemCurrentSolution
 
GaussianQuadratureRule< DIM > * mpQuadratureRule
 
GaussianQuadratureRule< DIM-1 > * mpBoundaryQuadratureRule
 
CompressibilityType mCompressibilityType
 
unsigned mProblemDimension
 
unsigned mNumDofs
 
bool mVerbose
 
Vec mResidualVector
 
Vec mLinearSystemRhsVector
 
Mat mSystemLhsMatrix
 
Vec mDirichletBoundaryConditionsVector
 
Mat mPreconditionMatrix
 

Detailed Description

template<unsigned DIM>
class StokesFlowSolver< DIM >

Finite element solver for Stokes flow problems

Definition at line 55 of file StokesFlowSolver.hpp.

Constructor & Destructor Documentation

◆ StokesFlowSolver()

template<unsigned DIM>
StokesFlowSolver< DIM >::StokesFlowSolver ( AbstractTetrahedralMesh< DIM, DIM > &  rQuadMesh,
StokesFlowProblemDefinition< DIM > &  rProblemDefinition,
std::string  outputDirectory 
)

Constructor.

Parameters
rQuadMeshQuadratic mesh
rProblemDefinitionProblem definition
outputDirectorythe output directory to use

Definition at line 141 of file StokesFlowSolver.hpp.

References StokesFlowSolver< DIM >::mpNeumannBcsAssembler, StokesFlowSolver< DIM >::mpStokesFlowAssembler, StokesFlowSolver< DIM >::mpStokesFlowPreconditionerAssembler, StokesFlowSolver< DIM >::mrProblemDefinition, and AbstractContinuumMechanicsSolver< DIM >::mrQuadMesh.

◆ ~StokesFlowSolver()

template<unsigned DIM>
StokesFlowSolver< DIM >::~StokesFlowSolver ( )
virtual

Destructor.

Definition at line 157 of file StokesFlowSolver.hpp.

Member Function Documentation

◆ AssembleSystem()

template<unsigned DIM>
void StokesFlowSolver< DIM >::AssembleSystem ( )
private

Assemble the linear system and preconditioner matrix.

Definition at line 285 of file StokesFlowSolver.hpp.

References PetscMatTools::Finalise(), PetscVecTools::Finalise(), and PetscMatTools::SwitchWriteMode().

◆ rGetSpatialSolution()

template<unsigned DIM>
std::vector< c_vector< double, DIM > > & StokesFlowSolver< DIM >::rGetSpatialSolution ( )
virtual
Returns
the flow. Note: return_value[i](j) = u_j for node i.

Implements AbstractContinuumMechanicsSolver< DIM >.

Definition at line 325 of file StokesFlowSolver.hpp.

◆ rGetVelocities()

template<unsigned DIM>
std::vector< c_vector< double, DIM > > & StokesFlowSolver< DIM >::rGetVelocities ( )
Returns
the flow. Note: return_value[i](j) = u_j for node i. Just calls rGetSpatialSolution().

Definition at line 340 of file StokesFlowSolver.hpp.

◆ SetKspAbsoluteTolerance()

template<unsigned DIM>
void StokesFlowSolver< DIM >::SetKspAbsoluteTolerance ( double  kspAbsoluteTolerance)

Set the absolute tolerance to be used when solving the linear system. If this is not called a relative tolerance is used.

Parameters
kspAbsoluteTolerancethe tolerance

Definition at line 318 of file StokesFlowSolver.hpp.

◆ Solve()

Friends And Related Symbol Documentation

◆ TestStokesFlowSolver

template<unsigned DIM>
friend class TestStokesFlowSolver
friend

Definition at line 57 of file StokesFlowSolver.hpp.

Member Data Documentation

◆ mKspAbsoluteTol

template<unsigned DIM>
double StokesFlowSolver< DIM >::mKspAbsoluteTol
private

Absolute tolerance for linear systems. Can be set by calling SetKspAbsoluteTolerances(), but default to -1, in which case a relative tolerance is used.

Definition at line 83 of file StokesFlowSolver.hpp.

◆ mpNeumannBcsAssembler

template<unsigned DIM>
ContinuumMechanicsNeumannBcsAssembler<DIM>* StokesFlowSolver< DIM >::mpNeumannBcsAssembler
private

Assembler for adding the surface integral arising from natural Neumman boundary conditions to the RHS vector

Definition at line 76 of file StokesFlowSolver.hpp.

Referenced by StokesFlowSolver< DIM >::StokesFlowSolver().

◆ mpStokesFlowAssembler

template<unsigned DIM>
StokesFlowAssembler<DIM>* StokesFlowSolver< DIM >::mpStokesFlowAssembler
private

Assembler for computing volume integral part of matrix and RHS vector

Definition at line 64 of file StokesFlowSolver.hpp.

Referenced by StokesFlowSolver< DIM >::StokesFlowSolver().

◆ mpStokesFlowPreconditionerAssembler

template<unsigned DIM>
StokesFlowPreconditionerAssembler<DIM>* StokesFlowSolver< DIM >::mpStokesFlowPreconditionerAssembler
private

Assembler for computing volume integral part of preconditioner matrix (which is the same as the system matrix except has a mass matrix in the pressure-pressure block

Definition at line 70 of file StokesFlowSolver.hpp.

Referenced by StokesFlowSolver< DIM >::StokesFlowSolver().

◆ mrProblemDefinition

template<unsigned DIM>
StokesFlowProblemDefinition<DIM>& StokesFlowSolver< DIM >::mrProblemDefinition
private

Object containing all the information about the problem to solve

Definition at line 61 of file StokesFlowSolver.hpp.

Referenced by StokesFlowSolver< DIM >::StokesFlowSolver().


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