50 fprintf(stderr,
"Error in ShallowWater1DInitialize(): nvars has to be %d.\n",
_MODEL_NVARS_);
54 fprintf(stderr,
"Error in ShallowWater1DInitialize(): ndims has to be %d.\n",
_MODEL_NDIMS_);
66 if (!count) printf(
"Reading physical model inputs from file \"physics.inp\".\n");
67 in = fopen(
"physics.inp",
"r");
68 if (!in) printf(
"Warning: File \"physics.inp\" not found. Using default values.\n");
71 ferr = fscanf(in,
"%s",word);
if (ferr != 1)
return(1);
72 if (!strcmp(word,
"begin")){
73 while (strcmp(word,
"end")){
74 ferr = fscanf(in,
"%s",word);
if (ferr != 1)
return(1);
75 if (!strcmp(word,
"gravity")) {
76 ferr = fscanf(in,
"%lf",&physics->
g);
77 if (ferr != 1)
return(1);
78 }
else if (!strcmp(word,
"topography_type")) {
79 ferr = fscanf(in,
"%d",&physics->
bt_type);
80 if (ferr != 1)
return(1);
81 }
else if (!strcmp(word,
"upwinding")) {
83 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");
114 if (!mpi->
rank) fprintf(stderr,
"Error in ShallowWater1DInitialize(): %s is not a valid upwinding scheme.\n",
int ShallowWater1DUpwindRoe(double *, double *, double *, double *, double *, double *, int, void *, double)
int ShallowWater1DFlux(double *f, double *u, int dir, void *s, double t)
int npoints_local_wghosts
int(* JFunction)(double *, double *, void *, int, int, int)
double(* ComputeCFL)(void *, void *, double, double)
int MPIBroadcast_double(double *, int, int, void *)
int ShallowWater1DModifiedSolution(double *, double *, int, void *, void *, double)
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(* Upwind)(double *, double *, double *, double *, double *, double *, int, void *, double)
int(* GetRightEigenvectors)(double *, double *, void *, int)
MPI related function definitions.
int(* PhysicsOutput)(void *, void *, double)
int(* FFunction)(double *, double *, int, void *, double)
int(* PhysicsInput)(void *, void *, int, int, int *)
int ShallowWater1DSource(double *, double *, void *, void *, double)
#define _MAX_STRING_SIZE_
int ShallowWater1DTopography(void *, void *, int, int, int *)
int ShallowWater1DRightEigenvectors(double *u, double *R, void *p, int dir)
int(* AveragingFunction)(double *, double *, double *, void *)
int ShallowWater1DUpwindLLF(double *, double *, double *, double *, double *, double *, int, void *, double)
int(* GetLeftEigenvectors)(double *, double *, void *, int)
int ShallowWater1DInitialize(void *, void *)
int ShallowWater1DJacobian(double *, double *, void *, int, int, int)
int(* SFunction)(double *, double *, void *, void *, double)
double ShallowWater1DComputeCFL(void *s, void *m, double dt, double t)
char upw_choice[_MAX_STRING_SIZE_]
Contains structure definition for hypar.
int ShallowWater1DSourceUpwindLLF(double *, double *, double *, double *, int, void *, double)
int(* UFunction)(double *, double *, int, void *, void *, double)
int MPIBroadcast_character(char *, int, int, void *)
1D Shallow Water Equations
int ShallowWater1DSourceUpwindRoe(double *, double *, double *, double *, int, void *, double)
Some basic definitions and macros.
Contains macros and function definitions for common array operations.
int ShallowWater1DRoeAverage(double *uavg, double *uL, double *uR, void *p)
Structure of MPI-related variables.
int(* SourceUpwind)(double *, double *, double *, double *, int, void *, double)
int ShallowWater1DLeftEigenvectors(double *u, double *L, void *p, int dir)
Structure containing all solver-specific variables and functions.
int ShallowWater1DWriteTopography(void *, void *, double)
int MPIBroadcast_integer(int *, int, int, void *)