Initialize the physical model for a simulation: Depending on the physical model specified, this function calls the initialization function for that physical model. The latter is responsible for setting all the physics-specific functions that are required by the model.
46 if (nsims == 0)
return 0;
48 if (!sim[0].mpi.rank) {
49 printf(
"Initializing physics. Model = \"%s\"\n",sim[0].solver.model);
52 for (ns = 0; ns < nsims; ns++) {
161 fprintf(stderr,
"Error (domain %d): %s is not a supported physical model.\n",
171 fprintf(stderr,
"Error (domain %d): Interpolation type is defined as characteristic ", ns);
172 fprintf(stderr,
"but physics initializations returned NULL pointers for ");
173 fprintf(stderr,
"Get(Left,Right)Eigenvectors needed for characteristic-based ");
174 fprintf(stderr,
"reconstruction.\n");
182 fprintf(stderr,
"Error (domain %d): Splitting of hyperbolic flux requires a dFFunction ", ns);
183 fprintf(stderr,
"and its upwinding function UpwinddF.\n");
184 fprintf(stderr,
"Error: f(u) = [f(u) - df(u)] + df(u).\n");
185 fprintf(stderr,
"Error: dFFunction or UpwinddF (or both) is (are) NULL.\n");
195 fprintf(stderr,
"Error in InitializePhysics() (domain %d): Physical model %s does not yet have an immersed boundary treatment.\n",
int(* JFunction)(double *, double *, void *, int, int, int)
int(* PreStage)(int, double **, void *, void *, double)
int NavierStokes2DInitialize(void *, void *)
int(* dFFunction)(double *, double *, int, void *, double)
double(* ComputeCFL)(void *, void *, double, double)
int VlasovInitialize(void *, void *)
Structure containing variables and parameters specific to the 1D Shallow Water equations. This structure contains the physical parameters, variables, and function pointers specific to the 1D ShallowWater equations.
int NavierStokes3DInitialize(void *, void *)
int FPPowerSystem3BusInitialize(void *, void *)
int(* HFunction)(double *, double *, int, int, void *, double)
int Numa2DInitialize(void *, void *)
int(* Upwind)(double *, double *, double *, double *, double *, double *, int, void *, double)
char model[_MAX_STRING_SIZE_]
int(* GetRightEigenvectors)(double *, double *, void *, int)
#define _LINEAR_ADVECTION_DIFFUSION_REACTION_
int(* UpwinddF)(double *, double *, double *, double *, double *, double *, int, void *, double)
Structure containing variables and parameters specific to the linear advection-diffusion-reaction mod...
int(* UpwindFdF)(double *, double *, double *, double *, double *, double *, int, void *, double)
int(* PhysicsOutput)(void *, void *, double)
int(* FdFFunction)(double *, double *, int, void *, double)
int(* FFunction)(double *, double *, int, void *, double)
int(* PhysicsInput)(void *, void *, int, int, int *)
int LinearADRInitialize(void *, void *)
#define _FP_POWER_SYSTEM_1BUS_
#define _NAVIER_STOKES_3D_
int(* PostStage)(double *, void *, void *, double)
#define _FP_POWER_SYSTEM_3BUS_
int(* AveragingFunction)(double *, double *, double *, void *)
double(* ComputeDiffNumber)(void *, void *, double, double)
int BurgersInitialize(void *, void *)
int(* GetLeftEigenvectors)(double *, double *, void *, int)
int FPPowerSystem1BusInitialize(void *, void *)
int ShallowWater1DInitialize(void *, void *)
int(* SFunction)(double *, double *, void *, void *, double)
int(* KFunction)(double *, double *, void *, int, int)
#define _FP_POWER_SYSTEM_
Structure containing variable and parameters specific to the 3-bus power system model. This structure contains the physical parameters and variables for the Fokker-Planck model for a 3-bus power system.
char interp_type[_MAX_STRING_SIZE_]
int Numa3DInitialize(void *, void *)
int(* UFunction)(double *, double *, int, void *, void *, double)
int ShallowWater2DInitialize(void *, void *)
#define _SHALLOW_WATER_2D_
Structure containing variables and parameters specific to the 3D Navier Stokes equations. This structure contains the physical parameters, variables, and function pointers specific to the 3D Navier-Stokes equations.
Structure defining a simulation.
int FPPowerSystemInitialize(void *, void *)
char SplitHyperbolicFlux[_MAX_STRING_SIZE_]
int(* PrintStep)(void *, void *, double)
Structure containing variables and parameters specific to the 2D Navier Stokes equations. This structure contains the physical parameters, variables, and function pointers specific to the 2D Navier-Stokes equations.
int Euler2DInitialize(void *, void *)
int(* IBFunction)(void *, void *, double *, double)
int FPDoubleWellInitialize(void *, void *)
int(* PreStep)(double *, void *, void *, double)
int Euler1DInitialize(void *, void *)
Structure of MPI-related variables.
Structure containing variables and parameters specific to the 2D Shallow Water equations. This structure contains the physical parameters, variables, and function pointers specific to the 2D ShallowWater equations.
Structure containing all solver-specific variables and functions.
Structure containing variables and parameters specific to the 1D Euler equations. This structure cont...
int(* GFunction)(double *, double *, int, void *, double)
#define _NAVIER_STOKES_2D_
int(* PostStep)(double *, void *, void *, double, int)
#define _SHALLOW_WATER_1D_