ABLATE Source Documentation  0.12.34
ablate::solver::Solver Class Referenceabstract
+ Inheritance diagram for ablate::solver::Solver:

Public Member Functions

virtual void Register (std::shared_ptr< ablate::domain::SubDomain > subDomain)
 
virtual void Setup ()=0
 
virtual void Initialize ()=0
 
const std::string & GetSolverId () const
 
ablate::domain::SubDomainGetSubDomain () noexcept
 
const ablate::domain::SubDomainGetSubDomain () const noexcept
 
std::shared_ptr< domain::RegionGetRegion () const noexcept
 
void PreStage (TS ts, PetscReal stagetime)
 
void PreStep (TS ts)
 
void PostStep (TS ts)
 
void PostEvaluate (TS ts)
 
void RegisterPreStep (const std::function< void(TS ts, Solver &)> &preStep)
 
void RegisterPreStage (const std::function< void(TS ts, Solver &, PetscReal)> &preStage)
 
void RegisterPostStep (const std::function< void(TS ts, Solver &)> &postStep)
 
void RegisterPostEvaluate (const std::function< void(TS ts, Solver &)> &postEval)
 
void GetCellRange (ablate::domain::Range &cellRange) const
 
void GetFaceRange (ablate::domain::Range &faceRange) const
 
void GetRange (PetscInt depth, ablate::domain::Range &range) const
 
void RestoreRange (ablate::domain::Range &range) const
 

Protected Member Functions

 Solver (std::string solverId, std::shared_ptr< domain::Region >={}, std::shared_ptr< parameters::Parameters > options=nullptr)
 

Static Protected Member Functions

static PetscErrorCode DMPlexInsertBoundaryValues_Plex (DM dm, PetscDS ds, PetscBool insertEssential, Vec locX, PetscReal time, Vec faceGeomFVM, Vec cellGeomFVM, Vec gradFVM)
 
static PetscErrorCode DMPlexInsertTimeDerivativeBoundaryValues_Plex (DM dm, PetscDS ds, PetscBool insertEssential, Vec locX, PetscReal time, Vec faceGeomFVM, Vec cellGeomFVM, Vec gradFVM)
 

Protected Attributes

PetscOptions petscOptions
 
std::shared_ptr< ablate::domain::SubDomainsubDomain
 

Member Function Documentation

◆ GetCellRange()

void ablate::solver::Solver::GetCellRange ( ablate::domain::Range cellRange) const
inline

Get the range of cells defined over the region for this solver.

Parameters
cellRange

◆ GetFaceRange()

void ablate::solver::Solver::GetFaceRange ( ablate::domain::Range faceRange) const
inline

Get the range of faces/edges defined over the region for this solver.

Parameters
faceRange

◆ GetRange()

void ablate::solver::Solver::GetRange ( PetscInt  depth,
ablate::domain::Range range 
) const
inline

Get the range of DMPlex objects at a particular depth defined over the region for this solver.

Parameters
depth
range

◆ GetRegion()

std::shared_ptr<domain::Region> ablate::solver::Solver::GetRegion ( ) const
inlinenoexcept

Get the region used to define this solver

Returns

◆ GetSolverId()

const std::string& ablate::solver::Solver::GetSolverId ( ) const
inline

string id for this solver

◆ GetSubDomain() [1/2]

const ablate::domain::SubDomain& ablate::solver::Solver::GetSubDomain ( ) const
inlinenoexcept

Get the sub domain used in this solver

Returns

◆ GetSubDomain() [2/2]

ablate::domain::SubDomain& ablate::solver::Solver::GetSubDomain ( )
inlinenoexcept

Get the sub domain used in this solver

Returns

◆ Register()

void ablate::solver::Solver::Register ( std::shared_ptr< ablate::domain::SubDomain subDomain)
virtual

Register all needed fields with the subDomain

Reimplemented in ablate::radiation::VolumeRadiation, and ablate::finiteElement::FiniteElementSolver.

◆ RegisterPostEvaluate()

void ablate::solver::Solver::RegisterPostEvaluate ( const std::function< void(TS ts, Solver &)> &  postEval)
inline

Adds function after each evaluated. This is where the solution can be modified if needed.

Parameters
postStep

◆ RegisterPostStep()

void ablate::solver::Solver::RegisterPostStep ( const std::function< void(TS ts, Solver &)> &  postStep)
inline

Adds function to be called after each flow step

Parameters
preStep

◆ RegisterPreStage()

void ablate::solver::Solver::RegisterPreStage ( const std::function< void(TS ts, Solver &, PetscReal)> &  preStage)
inline

Adds function to be called before each flow stage

Parameters
preStep

◆ RegisterPreStep()

void ablate::solver::Solver::RegisterPreStep ( const std::function< void(TS ts, Solver &)> &  preStep)
inline

Adds function to be called before each flow step

Parameters
preStep

◆ RestoreRange()

void ablate::solver::Solver::RestoreRange ( ablate::domain::Range range) const
inline

Restores the is and range - This needs to be removed and replaced with subDomain->RestoreRange

Parameters
cellIS
pStart
pEnd
points

◆ Setup()


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