14 int Numa2DFlux (
double*,
double*,
int,
void*,
double);
19 int Numa2DRusanovFlux (
double*,
double*,
double*,
double*,
double*,
double*,
int,
void*,
double);
35 fprintf(stderr,
"Error in Numa2DInitialize(): nvars has to be %d.\n",
_MODEL_NVARS_);
39 fprintf(stderr,
"Error in Numa2DInitialize(): ndims has to be %d.\n",
_MODEL_NDIMS_);
49 physics->
Pref = 101327.0;
50 physics->
Tref = 288.15;
60 if (!count) printf(
"Reading physical model inputs from file \"physics.inp\".\n");
61 in = fopen(
"physics.inp",
"r");
62 if (!in) printf(
"Warning: File \"physics.inp\" not found. Using default values.\n");
65 ferr = fscanf(in,
"%s",word);
if (ferr != 1)
return(1);
66 if (!strcmp(word,
"begin")){
67 while (strcmp(word,
"end")){
68 ferr = fscanf(in,
"%s",word);
if (ferr != 1)
return(1);
69 if (!strcmp(word,
"gamma")) {
70 ferr = fscanf(in,
"%lf",&physics->
gamma);
if (ferr != 1)
return(1);
71 }
else if (!strcmp(word,
"R")) {
72 ferr = fscanf(in,
"%lf",&physics->
R);
if (ferr != 1)
return(1);
73 }
else if (!strcmp(word,
"g")) {
74 ferr = fscanf(in,
"%lf",&physics->
g);
if (ferr != 1)
return(1);
75 }
else if (!strcmp(word,
"mu")) {
76 ferr = fscanf(in,
"%lf",&physics->
mu);
if (ferr != 1)
return(1);
77 }
else if (!strcmp(word,
"Pref")) {
78 ferr = fscanf(in,
"%lf",&physics->
Pref);
if (ferr != 1)
return(1);
79 }
else if (!strcmp(word,
"Tref")) {
80 ferr = fscanf(in,
"%lf",&physics->
Tref);
if (ferr != 1)
return(1);
81 }
else if (!strcmp(word,
"init_atmos")) {
82 ferr = fscanf(in,
"%d",&physics->
init_atmos);
if (ferr != 1)
return(1);
83 }
else if (!strcmp(word,
"upwinding")) {
84 ferr = fscanf(in,
"%s",physics->
upwind);
if (ferr != 1)
return(1);
85 }
else if (strcmp(word,
"end")) {
87 ferr = fscanf(in,
"%s",useless);
if (ferr != 1)
return(ferr);
88 printf(
"Warning: keyword %s in file \"physics.inp\" with value %s not ",word,useless);
89 printf(
"recognized or extraneous. Ignoring.\n");
93 fprintf(stderr,
"Error: Illegal format in file \"physics.inp\".\n");
118 fprintf(stderr,
"Error in Numa2DInitialize(): invalid choice of initial atmosphere (init_atmos).\n");
137 if (!mpi->
rank) fprintf(stderr,
"Error in Numa2DInitialize(): Invalid choice of upwinding scheme.\n");
154 fprintf(stderr,
"Error in Numa2DInitialize(): Parabolic term spatial discretization must be \"%s\"\n",
_NC_2STAGE_);
int Numa2DRusanovLinearFlux(double *, double *, double *, double *, double *, double *, int, void *, double)
void Numa2DCalculateStandardAtmosphere_2(void *, double, double *, double *, double *, double *)
Containts the structures and definitions for boundary condition implementation.
MPI related function definitions.
Contains function definitions for common mathematical functions.
int(* ParabolicFunction)(double *, double *, void *, void *, double)
char SplitHyperbolicFlux[_MAX_STRING_SIZE_]
int MPIBroadcast_integer(int *, int, int, void *)
#define _RUSANOV_UPWINDING_
Some basic definitions and macros.
int(* SFunction)(double *, double *, void *, void *, double)
int(* Upwind)(double *, double *, double *, double *, double *, double *, int, void *, double)
int Numa2DParabolicFunction(double *, double *, void *, void *, double)
Structure containing the variables and function pointers defining a boundary.
void Numa2DCalculateStandardAtmosphere_1(void *, double, double *, double *, double *, double *)
int MPIBroadcast_character(char *, int, int, void *)
int(* FFunction)(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_
Contains structure definition for hypar.
int Numa2DInitialize(void *s, void *m)
char spatial_type_par[_MAX_STRING_SIZE_]
int(* dFFunction)(double *, double *, int, void *, double)
int(* UpwinddF)(double *, double *, double *, double *, double *, double *, int, void *, double)
int Numa2DStiffFlux(double *, double *, int, void *, double)
Structure of MPI-related variables.
void(* StandardAtmosphere)(void *, double, double *, double *, double *, double *)
int Numa2DRusanovFlux(double *, double *, double *, double *, double *, double *, int, void *, double)
Contains macros and function definitions for common array operations.
int Numa2DFlux(double *, double *, int, void *, double)
int Numa2DSource(double *, double *, void *, void *, double)
char upwind[_MAX_STRING_SIZE_]
double Numa2DComputeCFL(void *, void *, double, double)