25{
26 PetscErrorCode ierr;
28
29
30 ierr = PetscInitialize(&argc, &argv, (char *)0, "PIC-Solver"); CHKERRQ(ierr);
31
32
33
35
37
38
39
40
41
43
44
46
47
49
50
52
53
56 }
57
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
75
77
78
79
83 }
84 }else{
85
86
88 }
89
92 }else{
94 }
95
96 }else{
98 }
99
100
101
102
104
105 ierr = PetscFinalize();
106
107 return ierr;
108}
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 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(void)
Prints the final, cumulative performance summary and cleans up resources.
@ LOG_INFO
Informational messages about program execution.
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 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 PerformInitialSetup(SimCtx *simCtx)
Finalizes the simulation setup at t=0, ensuring a consistent state before time marching.
PetscErrorCode AdvanceSimulation(SimCtx *simCtx)
Executes the main time-marching loop for the particle simulation.
The master context for the entire simulation.