20 int Euler1DUpwindRoe (
double*,
double*,
double*,
double*,
double*,
double*,
int,
void*,
double);
21 int Euler1DUpwinddFRoe (
double*,
double*,
double*,
double*,
double*,
double*,
int,
void*,
double);
23 int Euler1DUpwindRF (
double*,
double*,
double*,
double*,
double*,
double*,
int,
void*,
double);
24 int Euler1DUpwinddFRF (
double*,
double*,
double*,
double*,
double*,
double*,
int,
void*,
double);
26 int Euler1DUpwindLLF (
double*,
double*,
double*,
double*,
double*,
double*,
int,
void*,
double);
27 int Euler1DUpwinddFLLF (
double*,
double*,
double*,
double*,
double*,
double*,
int,
void*,
double);
29 int Euler1DUpwindSWFS (
double*,
double*,
double*,
double*,
double*,
double*,
int,
void*,
double);
84 fprintf(stderr,
"Error in Euler1DInitialize(): nvars has to be %d.\n",
_MODEL_NVARS_);
88 fprintf(stderr,
"Error in Euler1DInitialize(): ndims has to be %d.\n",
_MODEL_NDIMS_);
101 if (!count) printf(
"Reading physical model inputs from file \"physics.inp\".\n");
102 in = fopen(
"physics.inp",
"r");
103 if (!in) printf(
"Warning: File \"physics.inp\" not found. Using default values.\n");
106 ferr = fscanf(in,
"%s",word);
if (ferr != 1)
return(1);
107 if (!strcmp(word,
"begin")){
108 while (strcmp(word,
"end")){
109 ferr = fscanf(in,
"%s",word);
if (ferr != 1)
return(1);
110 if (!strcmp(word,
"gamma")) {
111 ferr = fscanf(in,
"%lf",&physics->
gamma);
112 if (ferr != 1)
return(1);
113 }
else if (!strcmp(word,
"gravity")) {
114 ferr = fscanf(in,
"%lf",&physics->
grav);
115 if (ferr != 1)
return(1);
116 }
else if (!strcmp(word,
"gravity_type")) {
117 ferr = fscanf(in,
"%d",&physics->
grav_type);
118 if (ferr != 1)
return(1);
119 }
else if (!strcmp(word,
"upwinding")) {
121 if (ferr != 1)
return(1);
122 }
else if (strcmp(word,
"end")) {
124 ferr = fscanf(in,
"%s",useless);
if (ferr != 1)
return(ferr);
125 printf(
"Warning: keyword %s in file \"physics.inp\" with value %s not ",word,useless);
126 printf(
"recognized or extraneous. Ignoring.\n");
130 fprintf(stderr,
"Error: Illegal format in file \"physics.inp\".\n");
146 fprintf(stderr,
"Error in Euler1DInitialize: %s or %s upwinding is needed for flows ",
_LLF_,
_ROE_);
147 fprintf(stderr,
"with gravitational forces.\n");
164 if (!mpi->
rank) fprintf(stderr,
"Error in Euler1DInitialize(): %s is not a valid upwinding scheme.\n",
176 fprintf(stderr,
"Error in Euler1DInitialize(): %s is not a valid upwinding scheme ",
178 fprintf(stderr,
"when split form of the hyperbolic flux is used. Use %s, %s or %s.\n",
197 int ghosts = solver->
ghosts;
198 int size = 1;
for (d=0; d<
_MODEL_NDIMS_; d++) size *= (dim[d] + 2*ghosts);
199 physics->
grav_field = (
double*) calloc (size,
sizeof(
double));
double Euler1DComputeCFL(void *, void *, double, double)
int Euler1DStiffFlux(double *, double *, int, void *, double)
int Euler1DRoeAverage(double *, double *, double *, void *)
MPI related function definitions.
int Euler1DSourceUpwindRoe(double *, double *, double *, double *, int, void *, double)
Structure containing variables and parameters specific to the 1D Euler equations. This structure cont...
int Euler1DUpwinddFRF(double *, double *, double *, double *, double *, double *, int, void *, double)
char SplitHyperbolicFlux[_MAX_STRING_SIZE_]
int(* SourceUpwind)(double *, double *, double *, double *, int, void *, double)
int Euler1DUpwindRusanov(double *, double *, double *, double *, double *, double *, int, void *, double)
int Euler1DUpwindLLF(double *, double *, double *, double *, double *, double *, int, void *, double)
int MPIBroadcast_integer(int *, int, int, void *)
int Euler1DJacobian(double *, double *, void *, int, int, int)
int(* AveragingFunction)(double *, double *, double *, void *)
int Euler1DGravityField(void *, void *)
Some basic definitions and macros.
int(* SFunction)(double *, double *, void *, void *, double)
int(* Upwind)(double *, double *, double *, double *, double *, double *, int, void *, double)
int Euler1DUpwinddFRoe(double *, double *, double *, double *, double *, double *, int, void *, double)
int Euler1DInitialize(void *s, void *m)
int MPIBroadcast_character(char *, int, int, void *)
int Euler1DRightEigenvectors(double *, double *, void *, int)
int(* FFunction)(double *, double *, int, void *, double)
int MPIBroadcast_double(double *, int, int, void *)
double(* ComputeCFL)(void *, void *, double, double)
int Euler1DPreStep(double *, void *, void *, double)
Structure containing all solver-specific variables and functions.
int Euler1DUpwindSWFS(double *, double *, double *, double *, double *, double *, int, void *, double)
#define _MAX_STRING_SIZE_
int Euler1DUpwindRoe(double *, double *, double *, double *, double *, double *, int, void *, double)
int Euler1DLeftEigenvectors(double *, double *, void *, int)
Contains structure definition for hypar.
int(* PreStep)(double *, void *, void *, double)
int(* dFFunction)(double *, double *, int, void *, double)
int(* JFunction)(double *, double *, void *, int, int, int)
1D Euler Equations (inviscid, compressible flows)
int Euler1DSource(double *, double *, void *, void *, double)
int Euler1DUpwinddFLLF(double *, double *, double *, double *, double *, double *, int, void *, double)
int(* UpwinddF)(double *, double *, double *, double *, double *, double *, int, void *, double)
int Euler1DUpwindRF(double *, double *, double *, double *, double *, double *, int, void *, double)
Structure of MPI-related variables.
int Euler1DStiffJacobian(double *, double *, void *, int, int, int)
Contains macros and function definitions for common array operations.
int(* GetRightEigenvectors)(double *, double *, void *, int)
int Euler1DModifiedSolution(double *, double *, int, void *, void *, double)
int Euler1DFlux(double *, double *, int, void *, double)
int(* GetLeftEigenvectors)(double *, double *, void *, int)
int(* UFunction)(double *, double *, int, void *, void *, double)
int Euler1DSourceUpwindLLF(double *, double *, double *, double *, int, void *, double)
char upw_choice[_MAX_STRING_SIZE_]