#include <petscpf.h>#include <petscdmswarm.h>#include <stdlib.h>#include <time.h>#include <math.h>#include <petsctime.h>#include <petscsys.h>#include <petscdmcomposite.h>#include <petscsystypes.h>#include "variables.h"#include "ParticleSwarm.h"#include "walkingsearch.h"#include "grid.h"#include "logging.h"#include "io.h"#include "interpolation.h"#include "AnalyticalSolutions.h"#include "ParticleMotion.h"#include "Boundaries.h"#include "runloop.h"Go to the source code of this file.
Functions | |
| PetscErrorCode | PopulateInitialUcont (UserCtx *user) |
Populate Ucont for one fresh-start block from the initial source (-ic_source_*). | |
| PetscErrorCode | InitializeEulerianState (SimCtx *simCtx) |
| High-level orchestrator to set the complete initial state of the Eulerian solver. | |
| PetscErrorCode PopulateInitialUcont | ( | UserCtx * | user | ) |
Populate Ucont for one fresh-start block from the initial source (-ic_source_*).
A staged field, when there is one, is read first: Ucat, or Ucont. The source's expressions then add their flux at every owned face. With -ic_source_field_weight w the staged field is scaled by w, and with a bulk velocity the expressions are scaled by PicurvSourceCellBulkFactor(). Collective.
| [in,out] | user | Block context whose velocity field is populated. |
Populate Ucont for one fresh-start block from the initial source (-ic_source_*).
Definition at line 53 of file initialcondition.c.
| PetscErrorCode InitializeEulerianState | ( | SimCtx * | simCtx | ) |
High-level orchestrator to set the complete initial state of the Eulerian solver.
This function is called once from main() before the time loop begins. It inspects the simulation context to determine whether to perform a fresh start (t=0) or restart from saved files. It then delegates to the appropriate helper function. Finally, it initializes the solver's history vectors (Ucont_o, P_o, etc.) to ensure the first time step has the necessary data.
| simCtx | Simulation context controlling the operation. |
High-level orchestrator to set the complete initial state of the Eulerian solver.
Definition at line 242 of file initialcondition.c.