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 npoints_local_wghosts
#define _ArraySetValue_(x, size, value)
int(* JFunction)(double *, double *, void *, int, int, int)
double(* ComputeCFL)(void *, void *, double, double)
char adv_filename[_MAX_STRING_SIZE_]
int MPIBroadcast_double(double *, int, int, void *)
int(* HFunction)(double *, double *, int, int, void *, double)
int(* Upwind)(double *, double *, double *, double *, double *, double *, int, void *, double)
Structure containing variables and parameters specific to the linear advection-diffusion-reaction mod...
MPI related function definitions.
int(* PhysicsOutput)(void *, void *, double)
int(* FFunction)(double *, double *, int, void *, double)
int(* PhysicsInput)(void *, void *, int, int, int *)
int LinearADRInitialize(void *, void *)
int LinearADRWriteAdvField(void *, void *, double)
Linear Advection-Diffusion-Reaction model.
int LinearADRCenteredFlux(double *, double *, double *, double *, double *, double *, int, void *, double)
#define _MAX_STRING_SIZE_
Data structure and some function declarations for banded block matrices.
double LinearADRComputeCFL(void *s, void *m, double dt, double t)
int LinearADRDiffusionG(double *f, double *u, int dir, void *s, double t)
double(* ComputeDiffNumber)(void *, void *, double, double)
int LinearADRDiffusionJacobian(double *, double *, void *, int, int)
int LinearADRAdvection(double *f, double *u, int dir, void *s, double t)
int LinearADRDiffusionH(double *f, double *u, int dir1, int dir2, void *s, double t)
int LinearADRAdvectionField(void *s, void *m, int idx, int nsims, int *dim_adv)
int(* SFunction)(double *, double *, void *, void *, double)
int(* KFunction)(double *, double *, void *, int, int)
char centered_flux[_MAX_STRING_SIZE_]
Contains structure definition for hypar.
int MPIBroadcast_character(char *, int, int, void *)
char SplitHyperbolicFlux[_MAX_STRING_SIZE_]
Some basic definitions and macros.
Contains macros and function definitions for common array operations.
int LinearADRAdvectionJacobian(double *, double *, void *, int, int, int)
double LinearADRComputeDiffNumber(void *s, void *m, double dt, double t)
Structure of MPI-related variables.
Structure containing all solver-specific variables and functions.
int LinearADRUpwind(double *, double *, double *, double *, double *, double *, int, void *, double)
int(* GFunction)(double *, double *, int, void *, double)
int MPIBroadcast_integer(int *, int, int, void *)