26 int(*)(
double*,
double*,
int,
void*,
double),
27 int(*)(
double*,
double*,
double*,
double*,
double*,
28 double*,
int,
void*,
double));
39 int(*)(
double*,
double*,
int,
void*,
double));
41 #if defined(HAVE_CUDA)
43 int(*)(
double*,
double*,
int,
void*,
double),
44 int(*)(
double*,
double*,
double*,
double*,
45 double*,
double*,
int,
void*,
double));
60 if (nsims == 0)
return 0;
62 if (!sim[0].mpi.rank) {
63 printf(
"Initializing solvers.\n");
66 for (ns = 0; ns < nsims; ns++) {
74 #if defined(HAVE_CUDA)
80 #if defined(HAVE_CUDA)
94 #if defined(HAVE_CUDA)
104 fprintf(stderr,
"ERROR (domain %d): scheme %s is not supported on GPU!",
122 fprintf(stderr,
"Error (domain %d): %s is not a supported ",
124 fprintf(stderr,
"spatial scheme of type %s for the parabolic terms.\n",
143 fprintf(stderr,
"Error (domain %d): %s is not a supported ",
145 fprintf(stderr,
"spatial scheme of type %s for the parabolic terms.\n",
159 fprintf(stderr,
"Error (domain %d): %s is not a supported ",
161 fprintf(stderr,
"spatial scheme of type %s for the parabolic terms.\n",
171 fprintf(stderr,
"Error (domain %d): %s is not a supported ",
173 fprintf(stderr,
"spatial scheme of type %s for the parabolic terms.\n",
179 fprintf(stderr,
"Error (domain %d): %s is not a supported ",
181 fprintf(stderr,
"spatial discretization type for the parabolic terms.\n");
186 #if defined(HAVE_CUDA)
197 fprintf(stderr,
"Error in InitializeSolvers() (domain %d): %s is not a ",
199 fprintf(stderr,
"supported interpolation type.\n");
203 #if defined(HAVE_CUDA)
211 "Error (domain %d): characteristic-based WENO5 is not yet implemented on GPUs.\n",
224 "Error (domain %d): %s is a not a supported spatial interpolation scheme on GPUs.\n",
349 fprintf(stderr,
"Error (domain %d): %s is a not a supported spatial interpolation scheme.\n",
354 #if defined(HAVE_CUDA)
380 fprintf(stderr,
"Error (domain %d): %s is a not a supported time-integration scheme.\n",
400 fprintf(stderr,
"Error (domain %d): %s is a not a supported time-integration scheme.\n",
434 fprintf(stderr,
"Error (domain %d): %s is not a supported file format.\n",
444 }
else if (!strcmp(solver->
output_mode,
"parallel")) {
453 fprintf(stderr,
"Error (domain %d): %s is not a supported output mode.\n",
455 fprintf(stderr,
"Should be \"serial\" or \"parallel\". \n");
466 PyObject* py_plot_name = PyUnicode_DecodeFSDefault(python_plotting_fname);
467 PyObject* py_plot_module = PyImport_Import(py_plot_name);
468 Py_DECREF(py_plot_name);
469 if (py_plot_module) {
470 solver->
py_plt_func = PyObject_GetAttrString(py_plot_module,
"plotSolution");
473 printf(
"Unable to load plotSolution function from Python module.\n");
477 printf(
"Loaded Python module for plotting.\n");
478 printf(
"Loaded plotSolution function from Python module.\n");
483 printf(
"Unable to load Python module for plotting.\n");
char spatial_scheme_hyp[_MAX_STRING_SIZE_]
Header file for TridiagLU.
int CompactSchemeInitialize(void *, void *, char *)
int Interp1PrimThirdOrderMUSCLChar(double *, double *, double *, double *, int, int, void *, void *, int)
3rd order MUSCL scheme with Koren's limiter (characteristic-based) on a uniform grid ...
int SecondDerivativeFourthOrderCentral(double *, double *, int, void *, void *)
int TimeForwardEuler(void *)
int ParabolicFunctionNC1Stage(double *par, double *u, void *s, void *m, double t)
int ParabolicFunctionNC2Stage(double *par, double *u, void *s, void *m, double t)
int ParabolicFunctionNC1_5Stage(double *par, double *u, void *s, void *m, double t)
Definitions for the functions computing the interpolated value of the primitive at the cell interface...
Definitions for the functions computing the first derivative.
char aux_op_fname_root[_MAX_STRING_SIZE_]
int HyperbolicFunction(double *hyp, double *u, void *s, void *m, double t, int LimFlag, int(*FluxFunction)(double *, double *, int, void *, double), int(*UpwindFunction)(double *, double *, double *, double *, double *, double *, int, void *, double))
int Interp1PrimSecondOrderCentralChar(double *, double *, double *, double *, int, int, void *, void *, int)
2nd order central reconstruction (characteristic-based) on a uniform grid
int NonLinearInterpolation(double *u, void *s, void *m, double t, int(*FluxFunction)(double *, double *, int, void *, double))
int gpuHyperbolicFunction(double *hyp, double *u, void *s, void *m, double t, int LimFlag, int(*FluxFunction)(double *, double *, int, void *, double), int(*UpwindFunction)(double *, double *, double *, double *, double *, double *, int, void *, double))
#define _FIFTH_ORDER_COMPACT_UPWIND_
int Interp1PrimSecondOrderMUSCLChar(double *, double *, double *, double *, int, int, void *, void *, int)
2nd order MUSCL scheme (characteristic-based) on a uniform grid
int CalculateConservationError(void *s, void *m)
char spatial_type_par[_MAX_STRING_SIZE_]
#define _FIRST_ORDER_UPWIND_
#define _THIRD_ORDER_MUSCL_
int Interp1PrimFifthOrderCompactUpwindChar(double *, double *, double *, double *, int, int, void *, void *, int)
5th order compact upwind reconstruction (characteristic-based) on a uniform grid
int FirstDerivativeFirstOrder(double *, double *, int, int, void *, void *)
int FirstDerivativeFourthOrderCentral(double *, double *, int, int, void *, void *)
MPI related function definitions.
char op_file_format[_MAX_STRING_SIZE_]
int Interp1PrimThirdOrderMUSCL(double *, double *, double *, double *, int, int, void *, void *, int)
3rd order MUSCL scheme with Koren's limiter (component-wise) on a uniform grid
#define _SECOND_ORDER_CENTRAL_
int MUSCLInitialize(void *, void *)
int BoundaryIntegral(void *s, void *m)
int TimeExplicitRKInitialize(char *, char *, void *, void *)
#define _FIFTH_ORDER_HCWENO_
int Interp1PrimFifthOrderUpwind(double *, double *, double *, double *, int, int, void *, void *, int)
5th order upwind reconstruction (component-wise) on a uniform grid
Function declarations for file I/O functions.
int(* ParabolicFunction)(double *, double *, void *, void *, double)
Structure of variables/parameters needed by the WENO-type scheme.
Structure of variables/parameters needed by the compact schemes.
int Interp1PrimFifthOrderWENOChar(double *, double *, double *, double *, int, int, void *, void *, int)
5th order WENO reconstruction (characteristic-based) on a uniform grid
#define _FOURTH_ORDER_CENTRAL_
int(* NonlinearInterp)(double *, void *, void *, double, int(*)(double *, double *, int, void *, double))
int(* SetInterpLimiterVar)(double *, double *, double *, int, void *, void *)
char op_fname_root[_MAX_STRING_SIZE_]
int Interp1PrimFifthOrderCompactUpwind(double *, double *, double *, double *, int, int, void *, void *, int)
5th order compact upwind reconstruction (component-wise) on a uniform grid
Definitions for the functions computing the second derivative.
int Interp1PrimFirstOrderUpwind(double *, double *, double *, double *, int, int, void *, void *, int)
1st order upwind reconstruction (component-wise) on a uniform grid
int ApplyIBConditions(void *s, void *m, double *x, double waqt)
#define _MAX_STRING_SIZE_
Structure containing the parameters for the General Linear Methods with Global Error Estimators (GLM-...
Structure containing the parameters for an explicit Runge-Kutta method.
#define _FIFTH_ORDER_WENO_
char plotfilename_extn[_MAX_STRING_SIZE_]
int WENOInitialize(void *, void *, char *, char *)
char time_scheme[_MAX_STRING_SIZE_]
char op_overwrite[_MAX_STRING_SIZE_]
int Interp1PrimFifthOrderWENO(double *, double *, double *, double *, int, int, void *, void *, int)
5th order WENO reconstruction (component-wise) on a uniform grid
int(* SourceFunction)(double *, double *, void *, void *, double)
int ApplyBoundaryConditions(void *s, void *m, double *x, double *xref, double waqt)
Applies the boundary conditions specified for each boundary zone.
int(* InterpolateInterfacesPar)(double *, double *, int, void *, void *)
int(* BoundaryIntegralFunction)(void *, void *)
int Interp1PrimFourthOrderCentralChar(double *, double *, double *, double *, int, int, void *, void *, int)
4th order central reconstruction (characteristic-based) on a uniform grid
int(* VolumeIntegralFunction)(double *, double *, void *, void *)
char op_rom_fname_root[_MAX_STRING_SIZE_]
int ParabolicFunctionCons1Stage(double *par, double *u, void *s, void *m, double t)
int(* FirstDerivativePar)(double *, double *, int, int, void *, void *)
int Interp1PrimFourthOrderCentral(double *, double *, double *, double *, int, int, void *, void *, int)
4th order central reconstruction (component-wise) on a uniform grid
int SecondDerivativeSecondOrderCentral(double *, double *, int, void *, void *)
int tridiagLUInit(void *, void *)
int(* HyperbolicFunction)(double *, double *, void *, void *, double, int, int(*)(double *, double *, int, void *, double), int(*)(double *, double *, double *, double *, double *, double *, int, void *, double))
#define _FIFTH_ORDER_UPWIND_
int WriteTecplot3D(int, int, int *, double *, double *, char *, int *)
char spatial_scheme_par[_MAX_STRING_SIZE_]
int Interp1PrimSecondOrderMUSCL(double *, double *, double *, double *, int, int, void *, void *, int)
2nd order MUSCL scheme (component-wise) on a uniform grid
int Interp1PrimSecondOrderCentral(double *, double *, double *, double *, int, int, void *, void *, int)
2nd order central reconstruction (component-wise) on a uniform grid
char time_scheme_type[_MAX_STRING_SIZE_]
int gpuInterp1PrimFifthOrderWENO(double *, double *, double *, double *, int, int, void *, void *, int)
5th order WENO reconstruction (component-wise) on a uniform grid
int(* InterpolateInterfacesHyp)(double *, double *, double *, double *, int, int, void *, void *, int)
int Interp1PrimFifthOrderCRWENO(double *, double *, double *, double *, int, int, void *, void *, int)
5th order CRWENO reconstruction (component-wise) on a uniform grid
char interp_type[_MAX_STRING_SIZE_]
int Interp1PrimFifthOrderHCWENOChar(double *, double *, double *, double *, int, int, void *, void *, int)
5th order hybrid compact-WENO reconstruction (characteristic-based) on a uniform grid ...
Contains function declarations for time integration.
#define _SECOND_ORDER_MUSCL_
int Interp1PrimFifthOrderCRWENOChar(double *, double *, double *, double *, int, int, void *, void *, int)
5th order CRWENO reconstruction (characteristic-based) on a uniform grid
Structure defining a simulation.
int TimeGLMGEEInitialize(char *, char *, void *, void *)
int WriteText(int, int, int *, double *, double *, char *, int *)
Structure of variables/parameters needed by the MUSCL scheme.
int SourceFunction(double *source, double *u, void *s, void *m, double t)
int(* SecondDerivativePar)(double *, double *, int, void *, void *)
int WriteTecplot2D(int, int, int *, double *, double *, char *, int *)
int(* ApplyBoundaryConditions)(void *, void *, double *, double *, double)
char solnfilename_extn[_MAX_STRING_SIZE_]
#define _FIFTH_ORDER_CRWENO_
int(* TimeIntegrate)(void *)
int(* CalculateConservationError)(void *, void *)
int gpuFirstDerivativeFourthOrderCentral(double *, double *, int, int, void *, void *)
int WriteBinary(int, int, int *, double *, double *, char *, int *)
int FirstDerivativeSecondOrderCentral(double *, double *, int, int, void *, void *)
Structure of MPI-related variables.
int(* ApplyIBConditions)(void *, void *, double *, double)
char output_mode[_MAX_STRING_SIZE_]
int InitializeSolvers(void *, int)
Structure containing all solver-specific variables and functions.
int Interp1PrimFifthOrderHCWENO(double *, double *, double *, double *, int, int, void *, void *, int)
5th order hybrid compact-WENO reconstruction (component-wise) on a uniform grid
void IncrementFilenameIndex(char *f, int len)
int VolumeIntegral(double *VolumeIntegral, double *u, void *s, void *m)
int Interp1PrimFirstOrderUpwindChar(double *, double *, double *, double *, int, int, void *, void *, int)
1st order upwind reconstruction (characteristic-based) on a uniform grid
int(* WriteOutput)(int, int, int *, double *, double *, char *, int *)
int Interp1PrimFifthOrderUpwindChar(double *, double *, double *, double *, int, int, void *, void *, int)
5th order upwind reconstruction (characteristic-based) on a uniform grid
int Interp2PrimSecondOrder(double *, double *, int, void *, void *)
2nd order component-wise interpolation of the 2nd primitive on a uniform grid