30 fprintf(stderr,
"Error in FPDoubleWellInitializeO(): nvars has to be %d.\n",
_MODEL_NVARS_);
34 fprintf(stderr,
"Error in FPDoubleWellInitializeO(): ndims has to be %d.\n",
_MODEL_NDIMS_);
41 if (!count) printf(
"Reading physical model inputs from file \"physics.inp\".\n");
42 in = fopen(
"physics.inp",
"r");
44 fprintf(stderr,
"Error: File \"physics.inp\" not found.\n");
48 ferr = fscanf(in,
"%s",word);
if (ferr != 1)
return(1);
49 if (!strcmp(word,
"begin")){
50 while (strcmp(word,
"end")){
51 ferr = fscanf(in,
"%s",word);
if (ferr != 1)
return(1);
52 if (!strcmp(word,
"q")) {
54 ferr = fscanf(in,
"%lf",&physics->
q);
55 if (ferr != 1)
return(1);
56 }
else if (strcmp(word,
"end")) {
58 ferr = fscanf(in,
"%s",useless);
if (ferr != 1)
return(ferr);
59 printf(
"Warning: keyword %s in file \"physics.inp\" with value %s not ",word,useless);
60 printf(
"recognized or extraneous. Ignoring.\n");
64 fprintf(stderr,
"Error: Illegal format in file \"physics.inp\".\n");
77 fprintf(stderr,
"Error in FPDoubleWellInitialize: This physical model does not have a splitting ");
78 fprintf(stderr,
"of the hyperbolic term defined.\n");
double(* ComputeCFL)(void *, void *, double, double)
int MPIBroadcast_double(double *, int, int, void *)
int FPDoubleWellDiffusion(double *f, double *u, int dir, void *s, double t)
int(* Upwind)(double *, double *, double *, double *, double *, double *, int, void *, double)
int(* FFunction)(double *, double *, int, void *, double)
int FPDoubleWellAdvection(double *f, double *u, int dir, void *s, double t)
#define _MAX_STRING_SIZE_
double(* ComputeDiffNumber)(void *, void *, double, double)
double FPDoubleWellComputeDiffNumber(void *s, void *m, double dt, double t)
int FPDoubleWellPrintStep(void *, void *, double)
char SplitHyperbolicFlux[_MAX_STRING_SIZE_]
int(* PrintStep)(void *, void *, double)
int FPDoubleWellUpwind(double *, double *, double *, double *, double *, double *, int, void *, double)
int FPDoubleWellPostStep(double *, void *, void *, double, int)
Structure of MPI-related variables.
Structure containing all solver-specific variables and functions.
int(* GFunction)(double *, double *, int, void *, double)
int(* PostStep)(double *, void *, void *, double, int)
double FPDoubleWellComputeCFL(void *s, void *m, double dt, double t)