Chaste Release::3.1
|
#include <StokesFlowSolver.hpp>
Public Member Functions | |
StokesFlowSolver (QuadraticMesh< 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 | ( | QuadraticMesh< 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.
StokesFlowSolver< DIM >::~StokesFlowSolver | ( | ) | [virtual] |
Destructor.
Definition at line 157 of file StokesFlowSolver.hpp.
void StokesFlowSolver< DIM >::AssembleSystem | ( | ) | [private] |
Assemble the linear system and preconditioner matrix.
Definition at line 283 of file StokesFlowSolver.hpp.
References PetscMatTools::Finalise(), PetscVecTools::Finalise(), and PetscMatTools::SwitchWriteMode().
std::vector< c_vector< double, DIM > > & StokesFlowSolver< DIM >::rGetSpatialSolution | ( | ) | [virtual] |
Implemented method, returns the flow. Note: return_value[i](j) = u_j for node i.
Implements AbstractContinuumMechanicsSolver< DIM >.
Definition at line 323 of file StokesFlowSolver.hpp.
std::vector< c_vector< double, DIM > > & StokesFlowSolver< DIM >::rGetVelocities | ( | ) |
Get the flow. Note: return_value[i](j) = u_j for node i. Just calls rGetSpatialSolution().
Definition at line 338 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 316 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().
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.
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().
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().
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().
StokesFlowProblemDefinition<DIM>& StokesFlowSolver< DIM >::mrProblemDefinition [private] |
Object containing all the information about the problem to solve
Reimplemented from AbstractContinuumMechanicsSolver< DIM >.
Definition at line 61 of file StokesFlowSolver.hpp.
Referenced by StokesFlowSolver< DIM >::StokesFlowSolver().