![]() |
Chaste
Release::2017.1
|
#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 |
Finite element solver for Stokes flow problems
Definition at line 55 of file StokesFlowSolver.hpp.
| StokesFlowSolver< DIM >::StokesFlowSolver | ( | AbstractTetrahedralMesh< DIM, DIM > & | rQuadMesh, |
| StokesFlowProblemDefinition< DIM > & | rProblemDefinition, | ||
| std::string | outputDirectory | ||
| ) |
Constructor.
| rQuadMesh | Quadratic mesh |
| rProblemDefinition | Problem definition |
| outputDirectory | the 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.
|
virtual |
Destructor.
Definition at line 157 of file StokesFlowSolver.hpp.
References StokesFlowSolver< DIM >::mpNeumannBcsAssembler, StokesFlowSolver< DIM >::mpStokesFlowAssembler, and StokesFlowSolver< DIM >::mpStokesFlowPreconditionerAssembler.
|
private |
Assemble the linear system and preconditioner matrix.
Definition at line 285 of file StokesFlowSolver.hpp.
References AbstractContinuumMechanicsSolver< DIM >::AddIdentityBlockForDummyPressureVariables(), AbstractContinuumMechanicsSolver< DIM >::ApplyDirichletBoundaryConditions(), PetscVecTools::Finalise(), PetscMatTools::Finalise(), AbstractContinuumMechanicsSolver< DIM >::mLinearSystemRhsVector, StokesFlowSolver< DIM >::mpNeumannBcsAssembler, AbstractContinuumMechanicsSolver< DIM >::mPreconditionMatrix, StokesFlowSolver< DIM >::mpStokesFlowAssembler, StokesFlowSolver< DIM >::mpStokesFlowPreconditionerAssembler, AbstractContinuumMechanicsSolver< DIM >::mSystemLhsMatrix, and PetscMatTools::SwitchWriteMode().
Referenced by StokesFlowSolver< DIM >::Solve().
|
virtual |
Implements AbstractContinuumMechanicsSolver< DIM >.
Definition at line 325 of file StokesFlowSolver.hpp.
References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), AbstractContinuumMechanicsSolver< DIM >::mCurrentSolution, AbstractContinuumMechanicsSolver< DIM >::mrQuadMesh, and AbstractContinuumMechanicsSolver< DIM >::mSpatialSolution.
Referenced by StokesFlowSolver< DIM >::rGetVelocities().
| std::vector< c_vector< double, DIM > > & StokesFlowSolver< DIM >::rGetVelocities | ( | ) |
Definition at line 340 of file StokesFlowSolver.hpp.
References StokesFlowSolver< DIM >::rGetSpatialSolution().
| 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.
| kspAbsoluteTolerance | the tolerance |
Definition at line 318 of file StokesFlowSolver.hpp.
References StokesFlowSolver< DIM >::mKspAbsoluteTol.
| void StokesFlowSolver< DIM >::Solve | ( | ) |
Solve the system.
Definition at line 165 of file StokesFlowSolver.hpp.
References StokesFlowSolver< DIM >::AssembleSystem(), GenericEventHandler< 7, MechanicsEventHandler >::BeginEvent(), PetscTools::Destroy(), GenericEventHandler< 7, MechanicsEventHandler >::EndEvent(), PetscTools::GetMyRank(), AbstractContinuumMechanicsSolver< DIM >::mCurrentSolution, StokesFlowSolver< DIM >::mKspAbsoluteTol, AbstractContinuumMechanicsSolver< DIM >::mLinearSystemRhsVector, AbstractContinuumMechanicsSolver< DIM >::mNumDofs, AbstractContinuumMechanicsSolver< DIM >::mPreconditionMatrix, StokesFlowSolver< DIM >::mrProblemDefinition, AbstractContinuumMechanicsSolver< DIM >::mSystemLhsMatrix, AbstractContinuumMechanicsSolver< DIM >::mVerbose, PETSC_DESTROY_PARAM, Timer::PrintAndReset(), AbstractContinuumMechanicsSolver< DIM >::RemovePressureDummyValuesThroughLinearInterpolation(), Timer::Reset(), AbstractContinuumMechanicsSolver< DIM >::WriteCurrentPressureSolution(), AbstractContinuumMechanicsSolver< DIM >::WriteCurrentSpatialSolution(), and PetscVecTools::Zero().
|
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.
Referenced by StokesFlowSolver< DIM >::SetKspAbsoluteTolerance(), and StokesFlowSolver< DIM >::Solve().
|
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 >::AssembleSystem(), StokesFlowSolver< DIM >::StokesFlowSolver(), and StokesFlowSolver< DIM >::~StokesFlowSolver().
|
private |
Assembler for computing volume integral part of matrix and RHS vector
Definition at line 64 of file StokesFlowSolver.hpp.
Referenced by StokesFlowSolver< DIM >::AssembleSystem(), StokesFlowSolver< DIM >::StokesFlowSolver(), and StokesFlowSolver< DIM >::~StokesFlowSolver().
|
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 >::AssembleSystem(), StokesFlowSolver< DIM >::StokesFlowSolver(), and StokesFlowSolver< DIM >::~StokesFlowSolver().
|
private |
Object containing all the information about the problem to solve
Definition at line 61 of file StokesFlowSolver.hpp.
Referenced by StokesFlowSolver< DIM >::Solve(), and StokesFlowSolver< DIM >::StokesFlowSolver().