HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Class describing ensemble simulations. More...
#include <ensemble_simulations.h>
Public Member Functions | |
EnsembleSimulation () | |
~EnsembleSimulation () | |
int | define (int, int) |
int | ReadInputs () |
int | Initialize () |
int | InitialSolution () |
int | InitializeBoundaries () |
int | InitializeImmersedBoundaries () |
int | InitializePhysics () |
int | InitializePhysicsData () |
int | InitializeSolvers () |
int | Solve () |
void | WriteErrors (double a_wt_solver, double a_wt_total) |
bool | isDefined () const |
int | mpiCommDup () |
void | usePetscTS (PetscBool a_flag) |
int | SolvePETSc () |
Public Member Functions inherited from Simulation | |
Simulation () | |
virtual | ~Simulation () |
virtual int | InitializationWrapup () |
Protected Attributes | |
bool | m_is_defined |
int | m_nsims |
int | m_rank |
int | m_nproc |
std::vector< SimulationObject > | m_sims |
Class describing ensemble simulations.
Class describing ensemble simulations This class contains all data and functions needed to run ensemble simulations, i.e., multiple simulations of the same physics with the same numerical methods but on multiple grids.
This class contains all data and functions needed to run ensemble simulations, i.e., multiple simulations of the same physics with the same numerical methods but on multiple grids.
Definition at line 30 of file ensemble_simulations.h.
|
inline |
Constructor
Definition at line 35 of file ensemble_simulations.h.
|
inline |
Destructor
Definition at line 45 of file ensemble_simulations.h.
|
virtual |
Define this object
Define the ensemble simulation object: This function also reads sparse grids inputs from the file simulation.inp. Rank 0 reads in the inputs and broadcasts them to all the processors.
The format of solver.inp is as follows:
begin <keyword> <value> <keyword> <value> ... <keyword> <value> end
where the list of keywords and their type are:
Keyword name | Type | Variable | Default value – |
---|---|---|---|
nsims | int | EnsembleSimulation::m_nsims | -1 |
a_rank | MPI rank of this process |
a_nproc | Total number of MPI ranks |
Implements Simulation.
Definition at line 28 of file EnsembleSimulationsDefine.cpp.
|
inlinevirtual |
Read solver inputs
Implements Simulation.
Definition at line 59 of file ensemble_simulations.h.
|
inlinevirtual |
Initialize the simulations
Implements Simulation.
Definition at line 71 of file ensemble_simulations.h.
|
inlinevirtual |
Read initial solution for each simulation
Implements Simulation.
Definition at line 79 of file ensemble_simulations.h.
|
inlinevirtual |
Initialize the boundary conditions of the simulations
Implements Simulation.
Definition at line 87 of file ensemble_simulations.h.
|
inlinevirtual |
Initialize the immersed boundary conditions of the simulations
Implements Simulation.
Definition at line 95 of file ensemble_simulations.h.
|
inlinevirtual |
Initialize the physics of the simulations
Implements Simulation.
Definition at line 103 of file ensemble_simulations.h.
|
inlinevirtual |
Initialize the physics data of the simulations
Implements Simulation.
Definition at line 111 of file ensemble_simulations.h.
|
inlinevirtual |
Initialize the numerical solvers of the simulations
Implements Simulation.
Definition at line 127 of file ensemble_simulations.h.
|
inlinevirtual |
Run the simulation using native time integrators
Implements Simulation.
Definition at line 135 of file ensemble_simulations.h.
|
inlinevirtual |
Write simulation errors and wall times to file
Implements Simulation.
Definition at line 145 of file ensemble_simulations.h.
|
inlinevirtual |
Return whether object is defined or not
Implements Simulation.
Definition at line 157 of file ensemble_simulations.h.
|
inlinevirtual |
Create duplicate MPI communicators
Implements Simulation.
Definition at line 161 of file ensemble_simulations.h.
|
inlinevirtual |
Set flag whether to use PETSc time integration
Implements Simulation.
Definition at line 172 of file ensemble_simulations.h.
|
inlinevirtual |
Run the simulation using PETSc time integrators
Implements Simulation.
Definition at line 180 of file ensemble_simulations.h.
|
protected |
Boolean to show if this object is defined
Definition at line 192 of file ensemble_simulations.h.
|
protected |
Number of ensemble simulations
Definition at line 193 of file ensemble_simulations.h.
|
protected |
MPI rank of this process
Definition at line 194 of file ensemble_simulations.h.
|
protected |
Total number of MPI ranks
Definition at line 194 of file ensemble_simulations.h.
|
protected |
vector of simulation objects
Definition at line 197 of file ensemble_simulations.h.