|
| CoupledParticleSolver (std::string solverId, std::shared_ptr< domain::Region >, std::shared_ptr< parameters::Parameters > options, std::vector< FieldDescription > fields, std::vector< std::shared_ptr< processes::Process >> processes, std::shared_ptr< initializers::Initializer > initializer, std::vector< std::shared_ptr< mathFunctions::FieldFunction >> fieldInitialization, std::vector< std::shared_ptr< mathFunctions::FieldFunction >> exactSolutions={}, const std::vector< std::string > &coupledFields={}) |
|
| CoupledParticleSolver (std::string solverId, std::shared_ptr< domain::Region >, std::shared_ptr< parameters::Parameters > options, const std::vector< std::shared_ptr< FieldDescription >> &fields, std::vector< std::shared_ptr< processes::Process >> processes, std::shared_ptr< initializers::Initializer > initializer, std::vector< std::shared_ptr< mathFunctions::FieldFunction >> fieldInitialization, std::vector< std::shared_ptr< mathFunctions::FieldFunction >> exactSolutions={}, const std::vector< std::string > &={}) |
|
| ~CoupledParticleSolver () override |
| cleanup any petsc objects
|
|
void | Setup () override |
|
void | Initialize () override |
|
PetscErrorCode | PreRHSFunction (TS ts, PetscReal time, bool initialStage, Vec locX) override |
|
PetscErrorCode | ComputeRHSFunction (PetscReal time, Vec locX, Vec locF) override |
|
Public Member Functions inherited from ablate::particles::ParticleSolver |
| ParticleSolver (std::string solverId, std::shared_ptr< domain::Region >, std::shared_ptr< parameters::Parameters > options, std::vector< FieldDescription > fields, std::vector< std::shared_ptr< processes::Process >> processes, std::shared_ptr< initializers::Initializer > initializer, std::vector< std::shared_ptr< mathFunctions::FieldFunction >> fieldInitialization, std::vector< std::shared_ptr< mathFunctions::FieldFunction >> exactSolutions={}) |
|
| ParticleSolver (std::string solverId, std::shared_ptr< domain::Region >, std::shared_ptr< parameters::Parameters > options, const std::vector< std::shared_ptr< FieldDescription >> &fields, std::vector< std::shared_ptr< processes::Process >> processes, std::shared_ptr< initializers::Initializer > initializer, std::vector< std::shared_ptr< mathFunctions::FieldFunction >> fieldInitialization, std::vector< std::shared_ptr< mathFunctions::FieldFunction >> exactSolutions={}) |
|
void | Setup () override |
|
void | Initialize () override |
|
DM | GetParticleDM () |
|
TS | GetParticleTS () |
|
const std::string & | GetId () const override |
|
PetscErrorCode | Save (PetscViewer viewer, PetscInt steps, PetscReal time) override |
|
PetscErrorCode | Restore (PetscViewer viewer, PetscInt steps, PetscReal time) override |
|
virtual void | Register (std::shared_ptr< ablate::domain::SubDomain > subDomain) |
|
const std::string & | GetSolverId () const |
|
ablate::domain::SubDomain & | GetSubDomain () noexcept |
|
const ablate::domain::SubDomain & | GetSubDomain () const noexcept |
|
std::shared_ptr< domain::Region > | GetRegion () 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 |
|
virtual SerializerType | Serialize () const |
|
|
enum class | SerializerType { none
, collective
, serial
} |
|
Static Public Member Functions inherited from ablate::particles::ParticleSolver |
static PetscErrorCode | ComputeParticleExactSolution (TS particleTS, Vec) |
|
Static Public Attributes inherited from ablate::particles::ParticleSolver |
static const char | ParticleVelocity [] = "ParticleVelocity" |
|
static const char | ParticleDiameter [] = "ParticleDiameter" |
|
static const char | ParticleDensity [] = "ParticleDensity" |
|
static const char | PackedSolution [] = "PackedSolution" |
|
static const char | ParticleInitialLocation [] = "InitialLocation" |
|
static const char | ParticleCoordinates [] = "coordinates" |
| These coordinates are part of the solution vector.
|
|
Static Protected Member Functions inherited from ablate::particles::ParticleSolver |
static PetscErrorCode | ComputeParticleError (TS particleTS, Vec u, Vec e) |
|
static PetscErrorCode | ComputeParticleRHS (TS ts, PetscReal t, Vec X, Vec F, void *ctx) |
|
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 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::particles::ParticleSolver |
DM | swarmDm = nullptr |
| particle dm, this is a swarm
|
|
TS | particleTs = nullptr |
| time integration data
|
|
PetscReal | timeInitial = 0.0 |
| The time for ui, at the beginning of the advection solve.
|
|
PetscReal | timeFinal = 0.0 |
| The time for uf, at the end of the advection solve.
|
|
PetscInt | ndims = 0 |
| the dims from the subdomain
|
|
bool | dmChanged = false |
| store a boolean to state if a dmChanged (number of particles local/global changed)
|
|
std::vector< FieldDescription > | fieldsDescriptions |
| the fields specific to be created to create in the particle solver
|
|
std::vector< Field > | fields |
| all fields in the particle solver
|
|
std::map< std::string, Field > | fieldsMap |
| a map of fields for easy field lookup
|
|
std::vector< std::shared_ptr< processes::Process > > | processes |
| the processes that add source terms to the particle and domain ts
|
|
std::shared_ptr< particles::initializers::Initializer > | initializer = nullptr |
| Store the particle location and field initialization.
|
|
const std::vector< std::shared_ptr< mathFunctions::FieldFunction > > | fieldInitialization |
| initialize other particle variables
|
|
const std::vector< std::shared_ptr< mathFunctions::FieldFunction > > | exactSolutions |
| store the exact solution if provided
|
|
PetscOptions | petscOptions |
|
std::shared_ptr< ablate::domain::SubDomain > | subDomain |
|
This is an extension of the particle solver that allows for fully coupled simulations. The class implements the RHSFunction to allow inserting source terms back to main TS/flowfield