Chaste Commit::1fd4e48e3990e67db148bc1bc4cf6991a0049d0c
|
#include <StokesFlowSolver.hpp>
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.
|
private |
Assemble the linear system and preconditioner matrix.
Definition at line 285 of file StokesFlowSolver.hpp.
References PetscMatTools::Finalise(), PetscVecTools::Finalise(), and PetscMatTools::SwitchWriteMode().
|
virtual |
Implements AbstractContinuumMechanicsSolver< DIM >.
Definition at line 325 of file StokesFlowSolver.hpp.
std::vector< c_vector< double, DIM > > & StokesFlowSolver< DIM >::rGetVelocities | ( | ) |
Definition at line 340 of file StokesFlowSolver.hpp.
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.
void StokesFlowSolver< DIM >::Solve | ( | ) |
Solve the system.
Definition at line 165 of file StokesFlowSolver.hpp.
References GenericEventHandler< 7, MechanicsEventHandler >::BeginEvent(), PetscTools::Destroy(), GenericEventHandler< 7, MechanicsEventHandler >::EndEvent(), PetscTools::GetMyRank(), PETSC_DESTROY_PARAM, Timer::PrintAndReset(), Timer::Reset(), and PetscVecTools::Zero().
|
friend |
Definition at line 57 of file StokesFlowSolver.hpp.
|
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.
|
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().
|
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().
|
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().
|
private |
Object containing all the information about the problem to solve
Definition at line 61 of file StokesFlowSolver.hpp.
Referenced by StokesFlowSolver< DIM >::StokesFlowSolver().