23#define __FUNCT__ "main"
24int main(
int argc,
char **argv)
30 ierr = PetscInitialize(&argc, &argv, (
char *)0,
"PIC-Solver"); CHKERRQ(ierr);
119 ierr = PetscFinalize();
PetscErrorCode InitializeParticleSwarm(SimCtx *simCtx)
Perform particle swarm initialization, particle-grid interaction, and related operations.
PetscErrorCode InitializeEulerianState(SimCtx *simCtx)
High-level orchestrator to set the complete initial state of the Eulerian solver.
PetscErrorCode WriteSimulationFields(UserCtx *user)
Writes simulation fields to files.
PetscErrorCode DisplayBanner(SimCtx *simCtx)
Displays a structured banner summarizing the simulation configuration.
#define GLOBAL
Scope for global logging across all processes.
#define LOG_ALLOW(scope, level, fmt,...)
Logging macro that checks both the log level and whether the calling function is in the allowed-funct...
PetscErrorCode ProfilingFinalize(SimCtx *simCtx)
the profiling excercise and build a profiling summary which is then printed to a log file.
@ LOG_INFO
Informational messages about program execution.
PetscErrorCode ProfilingResetTimestepCounters(void)
PetscErrorCode ProfilingLogTimestepSummary(PetscInt step)
Logs the performance summary for the current timestep and resets timers.
int main(int argc, char **argv)
PetscErrorCode SetupDomainRankInfo(SimCtx *simCtx)
Sets up the full rank communication infrastructure, including neighbor ranks and bounding box exchang...
PetscErrorCode SetupGridAndSolvers(SimCtx *simCtx)
The main orchestrator for setting up all grid-related components.
PetscErrorCode SetupSimulationEnvironment(SimCtx *simCtx)
Verifies and prepares the complete I/O environment for a simulation run.
PetscErrorCode CreateSimulationContext(int argc, char **argv, SimCtx **p_simCtx)
Allocates and populates the master SimulationContext object.
PetscErrorCode SetupBoundaryConditions(SimCtx *simCtx)
(Orchestrator) Sets up all boundary conditions for the simulation.
PetscErrorCode AdvanceSimulation(SimCtx *simCtx)
Executes the main time-marching loop for the particle simulation.
PetscErrorCode FinalizeRestartState(SimCtx *simCtx)
Performs post-load/post-init consistency checks for a restarted simulation.
PetscErrorCode PerformInitializedParticleSetup(SimCtx *simCtx)
Finalizes the simulation setup at t=0, ensuring a consistent state before time marching.
The master context for the entire simulation.
User-defined context containing data specific to a single computational grid level.