34 fprintf(stderr,
"Error in Numa3DInitialize(): nvars has to be %d.\n",
_MODEL_NVARS_);
38 fprintf(stderr,
"Error in Numa3DInitialize(): ndims has to be %d.\n",
_MODEL_NDIMS_);
45 physics->
Omega = 7.2921150E-05;
48 physics->
Pref = 101327.0;
49 physics->
Tref = 288.15;
59 if (!count) printf(
"Reading physical model inputs from file \"physics.inp\".\n");
60 in = fopen(
"physics.inp",
"r");
61 if (!in) printf(
"Warning: File \"physics.inp\" not found. Using default values.\n");
64 ferr = fscanf(in,
"%s",word);
if (ferr != 1)
return(1);
65 if (!strcmp(word,
"begin")){
66 while (strcmp(word,
"end")){
67 ferr = fscanf(in,
"%s",word);
if (ferr != 1)
return(1);
68 if (!strcmp(word,
"gamma")) {
69 ferr = fscanf(in,
"%lf",&physics->
gamma);
if (ferr != 1)
return(1);
70 }
else if (!strcmp(word,
"R")) {
71 ferr = fscanf(in,
"%lf",&physics->
R);
if (ferr != 1)
return(1);
72 }
else if (!strcmp(word,
"g")) {
73 ferr = fscanf(in,
"%lf",&physics->
g);
if (ferr != 1)
return(1);
74 }
else if (!strcmp(word,
"Omega")) {
75 ferr = fscanf(in,
"%lf",&physics->
Omega);
if (ferr != 1)
return(1);
76 }
else if (!strcmp(word,
"Pref")) {
77 ferr = fscanf(in,
"%lf",&physics->
Pref);
if (ferr != 1)
return(1);
78 }
else if (!strcmp(word,
"Tref")) {
79 ferr = fscanf(in,
"%lf",&physics->
Tref);
if (ferr != 1)
return(1);
80 }
else if (!strcmp(word,
"init_atmos")) {
81 ferr = fscanf(in,
"%d",&physics->
init_atmos);
if (ferr != 1)
return(1);
82 }
else if (!strcmp(word,
"upwinding")) {
83 ferr = fscanf(in,
"%s",physics->
upwind);
if (ferr != 1)
return(1);
84 }
else if (strcmp(word,
"end")) {
86 ferr = fscanf(in,
"%s",useless);
if (ferr != 1)
return(ferr);
87 printf(
"Warning: keyword %s in file \"physics.inp\" with value %s not ",word,useless);
88 printf(
"recognized or extraneous. Ignoring.\n");
92 fprintf(stderr,
"Error: Illegal format in file \"physics.inp\".\n");
117 fprintf(stderr,
"Error in Numa3DInitialize(): invalid choice of initial atmosphere (init_atmos).\n");
136 if (!mpi->
rank) fprintf(stderr,
"Error in Numa3DInitialize(): Invalid choice of upwinding scheme.\n");
int Numa3DStiffFlux(double *, double *, int, void *, double)
char SplitHyperbolicFlux[_MAX_STRING_SIZE_]
int MPIBroadcast_integer(int *, int, int, void *)
#define _RUSANOV_UPWINDING_
int(* SFunction)(double *, double *, void *, void *, double)
int(* Upwind)(double *, double *, double *, double *, double *, double *, int, void *, double)
Structure containing the variables and function pointers defining a boundary.
int Numa3DRusanovLinearFlux(double *, double *, double *, double *, double *, double *, int, void *, double)
int MPIBroadcast_character(char *, int, int, void *)
int(* FFunction)(double *, double *, int, void *, double)
int Numa3DFlux(double *, double *, int, void *, double)
int MPIBroadcast_double(double *, int, int, void *)
double(* ComputeCFL)(void *, void *, double, double)
Structure containing all solver-specific variables and functions.
#define _MAX_STRING_SIZE_
int Numa3DSource(double *, double *, void *, void *, double)
int Numa3DRusanovFlux(double *, double *, double *, double *, double *, double *, int, void *, double)
void(* StandardAtmosphere)(void *, double, double *, double *, double *, double *)
char upwind[_MAX_STRING_SIZE_]
void Numa3DCalculateStandardAtmosphere_1(void *, double, double *, double *, double *, double *)
int(* dFFunction)(double *, double *, int, void *, double)
int(* UpwinddF)(double *, double *, double *, double *, double *, double *, int, void *, double)
Structure of MPI-related variables.
void Numa3DCalculateStandardAtmosphere_2(void *, double, double *, double *, double *, double *)
double Numa3DComputeCFL(void *, void *, double, double)