Sets the Eulerian state the run starts from: a fresh start from the initial-condition source or staged field, a restart from checkpoints, or the analytical field, and the solver history vectors that follow from it. More...
Go to the source code of this file.
Functions | |
| static PetscErrorCode | UcontFromInteriorUcat (UserCtx *user) |
| Derive Ucont from a Ucat whose interior cells are set: sync the periodic and ghost cells, then interpolate to the faces. | |
| static PetscErrorCode | ReadStagedInitialField (UserCtx *user, const char *name, Vec target) |
Read one staged initial field (ufield00000_0 or vfield00000_0) from the initial-condition directory into target. | |
| PetscErrorCode | PopulateInitialUcont (UserCtx *user) |
| Implementation of PopulateInitialUcont(). | |
| static PetscErrorCode | FinalizeBlockState (UserCtx *user) |
| Complete one initial-condition block after its interior values are assigned. | |
| static PetscErrorCode | ProjectInitialVelocity (SimCtx *simCtx) |
| Make the fresh-start velocity divergence-free with the time step's own projection: solve the pressure Poisson equation for the initial Ucont, whose boundary fluxes are already set, and correct the interior faces. | |
| static PetscErrorCode | SetInitialFluidState_FreshStart (SimCtx *simCtx) |
| Initialize Eulerian fields for a new simulation without restart data. | |
| static PetscErrorCode | SetInitialFluidState_Load (SimCtx *simCtx) |
| Restore Eulerian fields from checkpoint files for a restart simulation. | |
| PetscErrorCode | InitializeEulerianState (SimCtx *simCtx) |
| Implementation of InitializeEulerianState(). | |
Sets the Eulerian state the run starts from: a fresh start from the initial-condition source or staged field, a restart from checkpoints, or the analytical field, and the solver history vectors that follow from it.
Definition in file initialcondition.c.
|
static |
Derive Ucont from a Ucat whose interior cells are set: sync the periodic and ghost cells, then interpolate to the faces.
Definition at line 17 of file initialcondition.c.
|
static |
Read one staged initial field (ufield00000_0 or vfield00000_0) from the initial-condition directory into target.
Definition at line 34 of file initialcondition.c.
| PetscErrorCode PopulateInitialUcont | ( | UserCtx * | user | ) |
Implementation of PopulateInitialUcont().
Populate Ucont for one fresh-start block from the initial source (-ic_source_*).
Definition at line 53 of file initialcondition.c.
|
static |
Complete one initial-condition block after its interior values are assigned.
Definition at line 94 of file initialcondition.c.
|
static |
Make the fresh-start velocity divergence-free with the time step's own projection: solve the pressure Poisson equation for the initial Ucont, whose boundary fluxes are already set, and correct the interior faces.
As after a step's projection, the boundary handlers are not reapplied, so the field stays divergence-free. The potential is discarded, so pressure keeps its initial value. Collective.
Definition at line 134 of file initialcondition.c.
|
static |
Initialize Eulerian fields for a new simulation without restart data.
Definition at line 159 of file initialcondition.c.
|
static |
Restore Eulerian fields from checkpoint files for a restart simulation.
Definition at line 209 of file initialcondition.c.
| PetscErrorCode InitializeEulerianState | ( | SimCtx * | simCtx | ) |
Implementation of InitializeEulerianState().
High-level orchestrator to set the complete initial state of the Eulerian solver.
Definition at line 242 of file initialcondition.c.