|
PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
|
Test program for DMSwarm interpolation using the fdf-curvIB method. More...
Go to the source code of this file.
Macros | |
| #define | __FUNCT__ "PerformInitialSetup" |
| #define | __FUNCT__ "PerformLoadedParticleSetup" |
| #define | __FUNCT__ "FinalizeRestartState" |
| #define | __FUNCT__ "AdvanceSimulation" |
Functions | |
| static void | RuntimeShutdownSignalHandler (int signum) |
Internal helper implementation: RuntimeShutdownSignalHandler(). | |
| static void | RuntimeRequestAutoWalltimeGuard (void) |
Internal helper implementation: RuntimeRequestAutoWalltimeGuard(). | |
| static PetscBool | RuntimeShutdownRequested (void) |
Internal helper implementation: RuntimeShutdownRequested(). | |
| static PetscErrorCode | RefreshVerificationScalarScatterState (UserCtx *user) |
| Applies verification-only scalar truth and refreshes the scattered Eulerian scalar state. | |
| static const char * | RuntimeShutdownSignalName (PetscInt signum) |
Internal helper implementation: RuntimeShutdownSignalName(). | |
| static const char * | RuntimeShutdownReasonName (void) |
Internal helper implementation: RuntimeShutdownReasonName(). | |
| static PetscErrorCode | RegisterRuntimeSignalHandler (int signum) |
Internal helper implementation: RegisterRuntimeSignalHandler(). | |
| PetscErrorCode | InitializeRuntimeSignalHandlers (void) |
| Implementation of InitializeRuntimeSignalHandlers(). | |
| PetscReal | RuntimeWalltimeGuardUpdateEWMA (PetscBool has_previous, PetscReal previous_ewma_seconds, PetscReal latest_step_seconds, PetscReal alpha) |
| Implementation of RuntimeWalltimeGuardUpdateEWMA(). | |
| PetscReal | RuntimeWalltimeGuardConservativeEstimate (PetscReal warmup_average_seconds, PetscReal ewma_seconds, PetscReal latest_step_seconds) |
| Implementation of RuntimeWalltimeGuardConservativeEstimate(). | |
| PetscReal | RuntimeWalltimeGuardRequiredHeadroom (PetscReal min_seconds, PetscReal multiplier, PetscReal conservative_estimate_seconds) |
| Implementation of RuntimeWalltimeGuardRequiredHeadroom(). | |
| PetscBool | RuntimeWalltimeGuardShouldTrigger (PetscInt completed_steps, PetscInt warmup_steps, PetscReal remaining_seconds, PetscReal min_seconds, PetscReal multiplier, PetscReal warmup_average_seconds, PetscReal ewma_seconds, PetscReal latest_step_seconds, PetscReal *required_headroom_seconds_out) |
| Implementation of RuntimeWalltimeGuardShouldTrigger(). | |
| static PetscReal | RuntimeWalltimeGuardRemainingSeconds (const SimCtx *simCtx) |
Internal helper implementation: RuntimeWalltimeGuardRemainingSeconds(). | |
| static void | UpdateRuntimeWalltimeGuardEstimator (SimCtx *simCtx, PetscReal completed_step_seconds) |
Internal helper implementation: UpdateRuntimeWalltimeGuardEstimator(). | |
| static PetscErrorCode | MaybeRequestRuntimeWalltimeGuardShutdown (SimCtx *simCtx, const char *checkpoint_name) |
Internal helper implementation: MaybeRequestRuntimeWalltimeGuardShutdown(). | |
| static PetscErrorCode | WriteForcedTerminationOutput (SimCtx *simCtx, UserCtx *user, const char *phase) |
Internal helper implementation: WriteForcedTerminationOutput(). | |
| PetscErrorCode | UpdateSolverHistoryVectors (UserCtx *user) |
Internal helper implementation: UpdateSolverHistoryVectors(). | |
| PetscErrorCode | PerformInitializedParticleSetup (SimCtx *simCtx) |
Internal helper implementation: PerformInitializedParticleSetup(). | |
| PetscErrorCode | PerformLoadedParticleSetup (SimCtx *simCtx) |
Internal helper implementation: PerformLoadedParticleSetup(). | |
| PetscErrorCode | FinalizeRestartState (SimCtx *simCtx) |
Internal helper implementation: FinalizeRestartState(). | |
| PetscErrorCode | AdvanceSimulation (SimCtx *simCtx) |
Internal helper implementation: AdvanceSimulation(). | |
Variables | |
| static volatile sig_atomic_t | g_runtime_shutdown_signal = 0 |
| static PetscBool | g_runtime_shutdown_auto_requested = PETSC_FALSE |
Test program for DMSwarm interpolation using the fdf-curvIB method.
Provides the setup to start any simulation with DMSwarm and DMDAs.
Definition in file runloop.c.
|
static |
Internal helper implementation: RuntimeShutdownSignalHandler().
Local to this translation unit.
Definition at line 19 of file runloop.c.
|
static |
Internal helper implementation: RuntimeRequestAutoWalltimeGuard().
Local to this translation unit.
Definition at line 30 of file runloop.c.
|
static |
Internal helper implementation: RuntimeShutdownRequested().
Local to this translation unit.
Definition at line 41 of file runloop.c.
|
static |
Applies verification-only scalar truth and refreshes the scattered Eulerian scalar state.
Local to this translation unit.
Definition at line 50 of file runloop.c.
|
static |
Internal helper implementation: RuntimeShutdownSignalName().
Local to this translation unit.
Definition at line 63 of file runloop.c.
|
static |
Internal helper implementation: RuntimeShutdownReasonName().
Local to this translation unit.
Definition at line 83 of file runloop.c.
|
static |
Internal helper implementation: RegisterRuntimeSignalHandler().
Local to this translation unit.
Definition at line 98 of file runloop.c.
| PetscErrorCode InitializeRuntimeSignalHandlers | ( | void | ) |
Implementation of InitializeRuntimeSignalHandlers().
Installs lightweight signal handlers for graceful shutdown requests.
Full API contract (arguments, ownership, side effects) is documented with the matching public header declaration.
Definition at line 123 of file runloop.c.
| PetscReal RuntimeWalltimeGuardUpdateEWMA | ( | PetscBool | has_previous, |
| PetscReal | previous_ewma_seconds, | ||
| PetscReal | latest_step_seconds, | ||
| PetscReal | alpha | ||
| ) |
Implementation of RuntimeWalltimeGuardUpdateEWMA().
Update an EWMA estimate for timestep wall-clock duration.
Full API contract (arguments, ownership, side effects) is documented with the matching public header declaration.
Definition at line 150 of file runloop.c.
| PetscReal RuntimeWalltimeGuardConservativeEstimate | ( | PetscReal | warmup_average_seconds, |
| PetscReal | ewma_seconds, | ||
| PetscReal | latest_step_seconds | ||
| ) |
Implementation of RuntimeWalltimeGuardConservativeEstimate().
Return the conservative timestep estimate used by the walltime guard.
Full API contract (arguments, ownership, side effects) is documented with the matching public header declaration.
Definition at line 162 of file runloop.c.
| PetscReal RuntimeWalltimeGuardRequiredHeadroom | ( | PetscReal | min_seconds, |
| PetscReal | multiplier, | ||
| PetscReal | conservative_estimate_seconds | ||
| ) |
Implementation of RuntimeWalltimeGuardRequiredHeadroom().
Compute the required shutdown headroom from timestep estimate and floor.
Full API contract (arguments, ownership, side effects) is documented with the matching public header declaration.
Definition at line 173 of file runloop.c.
| PetscBool RuntimeWalltimeGuardShouldTrigger | ( | PetscInt | completed_steps, |
| PetscInt | warmup_steps, | ||
| PetscReal | remaining_seconds, | ||
| PetscReal | min_seconds, | ||
| PetscReal | multiplier, | ||
| PetscReal | warmup_average_seconds, | ||
| PetscReal | ewma_seconds, | ||
| PetscReal | latest_step_seconds, | ||
| PetscReal * | required_headroom_seconds_out | ||
| ) |
Implementation of RuntimeWalltimeGuardShouldTrigger().
Decide whether the runtime walltime guard should stop before another step.
Full API contract (arguments, ownership, side effects) is documented with the matching public header declaration.
Definition at line 184 of file runloop.c.
|
static |
Internal helper implementation: RuntimeWalltimeGuardRemainingSeconds().
Local to this translation unit.
Definition at line 202 of file runloop.c.
|
static |
Internal helper implementation: UpdateRuntimeWalltimeGuardEstimator().
Local to this translation unit.
Definition at line 214 of file runloop.c.
|
static |
Internal helper implementation: MaybeRequestRuntimeWalltimeGuardShutdown().
Local to this translation unit.
Definition at line 242 of file runloop.c.
|
static |
Internal helper implementation: WriteForcedTerminationOutput().
Local to this translation unit.
Definition at line 287 of file runloop.c.
| PetscErrorCode UpdateSolverHistoryVectors | ( | UserCtx * | user | ) |
Internal helper implementation: UpdateSolverHistoryVectors().
Copies the current time step's solution fields into history vectors (e.g., U(t_n) -> U_o, U_o -> U_rm1) for the next time step's calculations.
Local to this translation unit.
Definition at line 319 of file runloop.c.
| PetscErrorCode PerformInitializedParticleSetup | ( | SimCtx * | simCtx | ) |
Internal helper implementation: PerformInitializedParticleSetup().
Finalizes the simulation setup at t=0, ensuring a consistent state before time marching.
Local to this translation unit.
Definition at line 380 of file runloop.c.
| PetscErrorCode PerformLoadedParticleSetup | ( | SimCtx * | simCtx | ) |
Internal helper implementation: PerformLoadedParticleSetup().
Finalizes the simulation state after particle and fluid data have been loaded from a restart.
Local to this translation unit.
Definition at line 456 of file runloop.c.
| PetscErrorCode FinalizeRestartState | ( | SimCtx * | simCtx | ) |
Internal helper implementation: FinalizeRestartState().
Performs post-load/post-init consistency checks for a restarted simulation.
Local to this translation unit.
Definition at line 526 of file runloop.c.
| PetscErrorCode AdvanceSimulation | ( | SimCtx * | simCtx | ) |
Internal helper implementation: AdvanceSimulation().
Executes the main time-marching loop for the particle simulation.
Local to this translation unit.
Definition at line 572 of file runloop.c.