#include <StokesFlowSolver.hpp>
Inherits AbstractContinuumMechanicsSolver< 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 () |
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 | |||
) | [inline] |
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.
StokesFlowSolver< DIM >::~StokesFlowSolver | ( | ) | [inline, virtual] |
Destructor.
Definition at line 157 of file StokesFlowSolver.hpp.
References StokesFlowSolver< DIM >::mpNeumannBcsAssembler, StokesFlowSolver< DIM >::mpStokesFlowAssembler, and StokesFlowSolver< DIM >::mpStokesFlowPreconditionerAssembler.
void StokesFlowSolver< DIM >::AssembleSystem | ( | ) | [inline, private] |
Assemble the linear system and preconditioner matrix.
Definition at line 287 of file StokesFlowSolver.hpp.
References AbstractContinuumMechanicsSolver< DIM >::AddIdentityBlockForDummyPressureVariables(), AbstractContinuumMechanicsSolver< DIM >::ApplyDirichletBoundaryConditions(), PetscMatTools::Finalise(), PetscVecTools::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().
std::vector< c_vector< double, DIM > > & StokesFlowSolver< DIM >::rGetSpatialSolution | ( | ) | [inline, virtual] |
Implements AbstractContinuumMechanicsSolver< DIM >.
Definition at line 327 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 | ( | ) | [inline] |
Definition at line 342 of file StokesFlowSolver.hpp.
References StokesFlowSolver< DIM >::rGetSpatialSolution().
void StokesFlowSolver< DIM >::SetKspAbsoluteTolerance | ( | double | kspAbsoluteTolerance | ) | [inline] |
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 320 of file StokesFlowSolver.hpp.
References StokesFlowSolver< DIM >::mKspAbsoluteTol.
void StokesFlowSolver< DIM >::Solve | ( | ) | [inline] |
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().
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 77 of file StokesFlowSolver.hpp.
Referenced by StokesFlowSolver< DIM >::SetKspAbsoluteTolerance(), and StokesFlowSolver< DIM >::Solve().
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 70 of file StokesFlowSolver.hpp.
Referenced by StokesFlowSolver< DIM >::AssembleSystem(), StokesFlowSolver< DIM >::StokesFlowSolver(), and StokesFlowSolver< DIM >::~StokesFlowSolver().
StokesFlowAssembler<DIM>* StokesFlowSolver< DIM >::mpStokesFlowAssembler [private] |
Assembler for computing volume integral part of matrix and RHS vector
Definition at line 58 of file StokesFlowSolver.hpp.
Referenced by StokesFlowSolver< DIM >::AssembleSystem(), StokesFlowSolver< DIM >::StokesFlowSolver(), and StokesFlowSolver< DIM >::~StokesFlowSolver().
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 64 of file StokesFlowSolver.hpp.
Referenced by StokesFlowSolver< DIM >::AssembleSystem(), StokesFlowSolver< DIM >::StokesFlowSolver(), and StokesFlowSolver< DIM >::~StokesFlowSolver().
StokesFlowProblemDefinition<DIM>& StokesFlowSolver< DIM >::mrProblemDefinition [private] |
Object containing all the information about the problem to solve
Reimplemented from AbstractContinuumMechanicsSolver< DIM >.
Definition at line 55 of file StokesFlowSolver.hpp.
Referenced by StokesFlowSolver< DIM >::Solve(), and StokesFlowSolver< DIM >::StokesFlowSolver().