24 double*,
double*,
int,
void*,
double);
26 double*,
double*,
int,
void*,
double);
76 physics->
d = (
double*) calloc (solver->
ndims*solver->
nvars,
sizeof(
double));
83 if (!count) printf(
"Reading physical model inputs from file \"physics.inp\".\n");
84 in = fopen(
"physics.inp",
"r");
88 fprintf(stderr,
"Error: File \"physics.inp\" not found.\n");
94 ferr = fscanf(in,
"%s",word);
if (ferr != 1)
return(1);
95 if (!strcmp(word,
"begin")) {
96 while (strcmp(word,
"end")) {
98 ferr = fscanf(in,
"%s",word);
if (ferr != 1)
return(1);
100 if (!strcmp(word,
"advection_filename")) {
102 fprintf(stderr,
"Error in LinearADRInitialize():\n");
103 fprintf(stderr,
"Maybe advection_filename and advection are both specified.\n");
109 physics->
a = (
double*) calloc ( physics->
adv_arr_size,
sizeof(
double) );
111 ferr = fscanf(in,
"%s",physics->
adv_filename);
if (ferr != 1)
return(ferr);
113 }
else if (!strcmp(word,
"advection")) {
115 fprintf(stderr,
"Error in LinearADRInitialize():\n");
116 fprintf(stderr,
"Maybe advection_filename and advection are both specified.\n");
122 physics->
a = (
double*) calloc ( physics->
adv_arr_size,
sizeof(
double) );
123 for (i=0; i<solver->
ndims*solver->
nvars; i++) ferr = fscanf(in,
"%lf",&physics->
a[i]);
124 if (ferr != 1)
return(1);
126 }
else if (!strcmp(word,
"diffusion")) {
128 for (i=0; i<solver->
ndims*solver->
nvars; i++) ferr = fscanf(in,
"%lf",&physics->
d[i]);
129 if (ferr != 1)
return(1);
130 }
else if (!strcmp(word,
"centered_flux")) {
132 if (ferr != 1)
return(ferr);
133 }
else if (strcmp(word,
"end")) {
135 ferr = fscanf(in,
"%s",useless);
if (ferr != 1)
return(ferr);
136 printf(
"Warning: keyword %s in file \"physics.inp\" with value %s not ",word,useless);
137 printf(
"recognized or extraneous. Ignoring.\n");
143 fprintf(stderr,
"Error: Illegal format in file \"physics.inp\".\n");
159 physics->
a = (
double*) calloc (physics->
adv_arr_size,
sizeof(
double));
180 fprintf(stderr,
"Error in LinearADRInitialize: This physical model does not have a splitting ");
181 fprintf(stderr,
"of the hyperbolic term defined.\n");
int LinearADRDiffusionJacobian(double *, double *, void *, int, int)
int(* PhysicsOutput)(void *, void *, double)
int LinearADRAdvectionField(void *, void *, int, int, int *)
int(* GFunction)(double *, double *, int, void *, double)
MPI related function definitions.
char SplitHyperbolicFlux[_MAX_STRING_SIZE_]
Data structure and some function declarations for banded block matrices.
int MPIBroadcast_integer(int *, int, int, void *)
int(* KFunction)(double *, double *, void *, int, int)
int(* HFunction)(double *, double *, int, int, void *, double)
Some basic definitions and macros.
double LinearADRComputeDiffNumber(void *, void *, double, double)
int(* SFunction)(double *, double *, void *, void *, double)
int(* PhysicsInput)(void *, void *, int, int, int *)
int LinearADRUpwind(double *, double *, double *, double *, double *, double *, int, void *, double)
int(* Upwind)(double *, double *, double *, double *, double *, double *, int, void *, double)
char adv_filename[_MAX_STRING_SIZE_]
Structure containing variables and parameters specific to the linear advection-diffusion-reaction mod...
int LinearADRWriteAdvField(void *, void *, double)
int MPIBroadcast_character(char *, int, int, void *)
int(* FFunction)(double *, double *, int, void *, double)
int MPIBroadcast_double(double *, int, int, void *)
int LinearADRAdvectionJacobian(double *, double *, void *, int, int, int)
int LinearADRCenteredFlux(double *, double *, double *, double *, double *, double *, int, void *, double)
double(* ComputeCFL)(void *, void *, double, double)
Structure containing all solver-specific variables and functions.
#define _MAX_STRING_SIZE_
int LinearADRAdvection(double *, double *, int, void *, double)
int LinearADRInitialize(void *s, void *m)
Contains structure definition for hypar.
double(* ComputeDiffNumber)(void *, void *, double, double)
Linear Advection-Diffusion-Reaction model.
#define _ArraySetValue_(x, size, value)
int LinearADRDiffusionH(double *, double *, int, int, void *, double)
char centered_flux[_MAX_STRING_SIZE_]
int(* JFunction)(double *, double *, void *, int, int, int)
double LinearADRComputeCFL(void *, void *, double, double)
Structure of MPI-related variables.
int npoints_local_wghosts
Contains macros and function definitions for common array operations.
int LinearADRDiffusionG(double *, double *, int, void *, double)