ABLATE Source Documentation  0.12.34
ablate::boundarySolver::DebugBoundarySolver Class Reference

#include <debugBoundarySolver.hpp>

+ Inheritance diagram for ablate::boundarySolver::DebugBoundarySolver:

Public Member Functions

 DebugBoundarySolver (std::string solverId, std::shared_ptr< domain::Region > region, std::shared_ptr< domain::Region > fieldBoundary, std::vector< std::shared_ptr< BoundaryProcess >> boundaryProcesses, std::shared_ptr< parameters::Parameters > options, bool mergeFaces=false)
 
void Setup () override
 
PetscErrorCode ComputeRHSFunction (PetscReal time, Vec locXVec, Vec locFVec) override
 
- Public Member Functions inherited from ablate::boundarySolver::BoundarySolver
PetscErrorCode ComputeBoundaryPreRHSPointFunction (PetscReal time, PetscReal dt, Vec locXVec, const BoundaryPreRHSPointFunctionDefinition &boundaryPreRhsPointFunction)
 
 BoundarySolver (std::string solverId, std::shared_ptr< domain::Region > region, std::shared_ptr< domain::Region > fieldBoundary, std::vector< std::shared_ptr< BoundaryProcess >> boundaryProcesses, std::shared_ptr< parameters::Parameters > options, bool mergeFaces=false)
 
void Initialize () override
 
void RegisterFunction (BoundarySourceFunction function, void *context, const std::vector< std::string > &sourceFields, const std::vector< std::string > &inputFields, const std::vector< std::string > &auxFields, BoundarySourceType type=BoundarySourceType::Point)
 
void RegisterFunction (BoundaryUpdateFunction function, void *context, const std::vector< std::string > &inputFields, const std::vector< std::string > &auxFields)
 
void RegisterPreRHSFunction (BoundaryPreRHSFunctionDefinition function, void *context)
 
PetscErrorCode ComputeRHSFunction (PetscReal time, Vec locXVec, Vec locFVec, const std::vector< BoundarySourceFunctionDescription > &boundarySourceFunctions)
 
void InsertFieldFunctions (const std::vector< std::shared_ptr< mathFunctions::FieldFunction >> &initialization, PetscReal time=0.0)
 
std::vector< GradientStencil > GetBoundaryGeometry (PetscInt cell) const
 
const std::vector< GradientStencil > & GetBoundaryGeometry () const
 
const std::vector< std::string > & GetOutputComponents ()
 
const std::vector< BoundarySourceFunctionDescription > & GetOutputFunctions ()
 
PetscErrorCode PreRHSFunction (TS ts, PetscReal time, bool initialStage, Vec locX) override
 
SerializerType Serialize () const override
 
const std::string & GetId () const override
 
PetscErrorCode Save (PetscViewer viewer, PetscInt sequenceNumber, PetscReal time) override
 
PetscErrorCode Restore (PetscViewer viewer, PetscInt sequenceNumber, PetscReal time) override
 
- Public Member Functions inherited from ablate::solver::CellSolver
 CellSolver (std::string solverId, std::shared_ptr< domain::Region >={}, std::shared_ptr< parameters::Parameters > options=nullptr)
 
void RegisterAuxFieldUpdate (AuxFieldUpdateFunction function, void *context, const std::vector< std::string > &auxField, const std::vector< std::string > &inputFields)
 
void RegisterSolutionFieldUpdate (SolutionFieldUpdateFunction function, void *context, const std::vector< std::string > &inputFields)
 
void UpdateAuxFields (PetscReal time, Vec locXVec, Vec locAuxField)
 
void UpdateSolutionFields (PetscReal time, Vec globXVec)
 
void Setup () override
 
void Initialize () override
 
- Public Member Functions inherited from ablate::solver::Solver
virtual void Register (std::shared_ptr< ablate::domain::SubDomain > subDomain)
 
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
 

Additional Inherited Members

- Public Types inherited from ablate::boundarySolver::BoundarySolver
enum class  BoundarySourceType { Point , Distributed , Flux , Face }
 
using BoundarySourceFunction = PetscErrorCode(*)(PetscInt dim, const BoundaryFVFaceGeom *fg, const PetscFVCellGeom *boundaryCell, const PetscInt uOff[], const PetscScalar *boundaryValues, const PetscScalar *stencilValues[], const PetscInt aOff[], const PetscScalar *auxValues, const PetscScalar *stencilAuxValues[], PetscInt stencilSize, const PetscInt stencil[], const PetscScalar stencilWeights[], const PetscInt sOff[], PetscScalar source[], void *ctx)
 
using BoundaryUpdateFunction = PetscErrorCode(*)(PetscInt dim, const BoundaryFVFaceGeom *fg, const PetscFVCellGeom *boundaryCell, const PetscInt uOff[], PetscScalar *boundaryValues, const PetscScalar *stencilValues, const PetscInt aOff[], PetscScalar *auxValues, const PetscScalar *stencilAuxValues, void *ctx)
 
using BoundaryPreRHSFunctionDefinition = PetscErrorCode(*)(BoundarySolver &, TS ts, PetscReal time, bool initialStage, Vec locX, void *ctx)
 
using BoundaryPreRHSPointFunction = PetscErrorCode(*)(PetscReal time, PetscReal dt, PetscInt dim, const BoundaryFVFaceGeom *fg, const PetscFVCellGeom *boundaryCell, const PetscInt uOff[], PetscScalar *boundaryValues, const PetscScalar *stencilValues[], const PetscInt aOff[], PetscScalar *auxValues, const PetscScalar *stencilAuxValues[], PetscInt stencilSize, const PetscInt stencil[], const PetscScalar stencilWeights[], void *ctx)
 
- Public Types inherited from ablate::solver::CellSolver
using AuxFieldUpdateFunction = PetscErrorCode(*)(PetscReal time, PetscInt dim, const PetscFVCellGeom *cellGeom, const PetscInt uOff[], const PetscScalar *u, const PetscInt aOff[], PetscScalar *auxField, void *ctx)
 function template for updating the aux field
 
using SolutionFieldUpdateFunction = PetscErrorCode(*)(PetscReal time, PetscInt dim, const PetscFVCellGeom *cellGeom, const PetscInt uOff[], PetscScalar *u, void *ctx)
 function template for updating the solution field
 
- Public Types inherited from ablate::io::Serializable
enum class  SerializerType { none , collective , serial }
 
- Static Public Member Functions inherited from ablate::boundarySolver::BoundarySolver
static void ComputeGradient (PetscInt dim, PetscScalar boundaryValue, PetscInt stencilSize, const PetscScalar *stencilValues, const PetscScalar *stencilWeights, PetscScalar *grad)
 
static void ComputeGradientAlongNormal (PetscInt dim, const BoundaryFVFaceGeom *fg, PetscScalar boundaryValue, PetscInt stencilSize, const PetscScalar *stencilValues, const PetscScalar *stencilWeights, PetscScalar &dPhiDNorm)
 
- Protected Member Functions inherited from ablate::solver::Solver
 Solver (std::string solverId, std::shared_ptr< domain::Region >={}, std::shared_ptr< parameters::Parameters > options=nullptr)
 
- Static Protected Member Functions inherited from ablate::solver::Solver
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)
 
- Static Protected Member Functions inherited from ablate::io::Serializable
static PetscErrorCode SaveKeyValue (PetscViewer viewer, const char *name, PetscScalar value)
 
static PetscErrorCode RestoreKeyValue (PetscViewer viewer, const char *name, PetscScalar &value)
 
template<class T >
static PetscErrorCode SaveKeyValue (PetscViewer viewer, const char *name, T value)
 
template<class T >
static PetscErrorCode RestoreKeyValue (PetscViewer viewer, const char *name, T &value)
 
template<class T >
static SerializerType DetermineSerializerType (const T &types)
 
- Protected Attributes inherited from ablate::boundarySolver::BoundarySolver
std::vector< GradientStencil > gradientStencils
 
- Protected Attributes inherited from ablate::solver::CellSolver
Vec cellGeomVec = nullptr
 Vector used to describe the entire cell geom of the dm. This is constant and does not depend upon region.
 
Vec faceGeomVec = nullptr
 Vector used to describe the entire face geom of the dm. This is constant and does not depend upon region.
 
- Protected Attributes inherited from ablate::solver::Solver
PetscOptions petscOptions
 
std::shared_ptr< ablate::domain::SubDomainsubDomain
 

Detailed Description

this is a debug extension of the boundary solver that outputs useful information for debugging problems with the boundary solver

Constructor & Destructor Documentation

◆ DebugBoundarySolver()

ablate::boundarySolver::DebugBoundarySolver::DebugBoundarySolver ( std::string  solverId,
std::shared_ptr< domain::Region region,
std::shared_ptr< domain::Region fieldBoundary,
std::vector< std::shared_ptr< BoundaryProcess >>  boundaryProcesses,
std::shared_ptr< parameters::Parameters options,
bool  mergeFaces = false 
)
Parameters
solverIdthe id for this solver
regionthe boundary cell region
fieldBoundarythe region describing the faces between the boundary and field
boundaryProcessesa list of boundary processes
optionsother options

Member Function Documentation

◆ ComputeRHSFunction()

PetscErrorCode ablate::boundarySolver::DebugBoundarySolver::ComputeRHSFunction ( PetscReal  time,
Vec  locXVec,
Vec  locFVec 
)
overridevirtual

Override the ComputeRHSFunction to output the locFVec at every boundary point

Parameters
dm
time
locXVec
globFVec
ctx
Returns

Reimplemented from ablate::boundarySolver::BoundarySolver.

◆ Setup()

void ablate::boundarySolver::DebugBoundarySolver::Setup ( )
overridevirtual

override setup to allow outputting of the stencil per rank

Reimplemented from ablate::boundarySolver::BoundarySolver.


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