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");
int Interp1PrimSecondOrderCentral(double *, double *, double *, double *, int, int, void *, void *, int)
2nd order central reconstruction (component-wise) on a uniform grid
int FirstDerivativeFourthOrderCentral(double *, double *, int, int, void *, void *)
#define _FIRST_ORDER_UPWIND_
int Interp1PrimFifthOrderCRWENOChar(double *, double *, double *, double *, int, int, void *, void *, int)
5th order CRWENO reconstruction (characteristic-based) on a uniform grid
#define _FIFTH_ORDER_WENO_
int Interp1PrimFifthOrderCRWENO(double *, double *, double *, double *, int, int, void *, void *, int)
5th order CRWENO reconstruction (component-wise) on a uniform grid
#define _FIFTH_ORDER_HCWENO_
#define _FOURTH_ORDER_CENTRAL_
int WriteBinary(int, int, int *, double *, double *, char *, int *)
int(* SecondDerivativePar)(double *, double *, int, void *, void *)
int WriteTecplot3D(int, int, int *, double *, double *, char *, int *)
MPI related function definitions.
int SourceFunction(double *, double *, void *, void *, double)
int Interp1PrimSecondOrderMUSCL(double *, double *, double *, double *, int, int, void *, void *, int)
2nd order MUSCL scheme (component-wise) on a uniform grid
int(* ParabolicFunction)(double *, double *, void *, void *, double)
Structure defining a simulation.
int ParabolicFunctionNC1_5Stage(double *, double *, void *, void *, double)
int SecondDerivativeFourthOrderCentral(double *, double *, int, void *, void *)
int InitializeSolvers(void *s, int nsims)
int Interp1PrimFifthOrderCompactUpwindChar(double *, double *, double *, double *, int, int, void *, void *, int)
5th order compact upwind reconstruction (characteristic-based) on a uniform grid
Header file for TridiagLU.
int WENOInitialize(void *, void *, char *, char *)
int Interp1PrimFifthOrderUpwindChar(double *, double *, double *, double *, int, int, void *, void *, int)
5th order upwind reconstruction (characteristic-based) on a uniform grid
char plotfilename_extn[_MAX_STRING_SIZE_]
int tridiagLUInit(void *, void *)
char op_rom_fname_root[_MAX_STRING_SIZE_]
int Interp1PrimSecondOrderMUSCLChar(double *, double *, double *, double *, int, int, void *, void *, int)
2nd order MUSCL scheme (characteristic-based) on a uniform grid
int HyperbolicFunction(double *, double *, void *, void *, double, int, int(*)(double *, double *, int, void *, double), int(*)(double *, double *, double *, double *, double *, double *, int, void *, double))
int VolumeIntegral(double *, double *, void *, void *)
int FirstDerivativeFirstOrder(double *, double *, int, int, void *, void *)
int(* ApplyBoundaryConditions)(void *, void *, double *, double *, double)
#define _THIRD_ORDER_MUSCL_
int ParabolicFunctionNC1Stage(double *, double *, void *, void *, double)
int(* NonlinearInterp)(double *, void *, void *, double, int(*)(double *, double *, int, void *, double))
int Interp1PrimFifthOrderUpwind(double *, double *, double *, double *, int, int, void *, void *, int)
5th order upwind reconstruction (component-wise) on a uniform grid
Contains function declarations for time integration.
int(* CalculateConservationError)(void *, void *)
int SecondDerivativeSecondOrderCentral(double *, double *, int, void *, void *)
char output_mode[_MAX_STRING_SIZE_]
char spatial_scheme_par[_MAX_STRING_SIZE_]
int(* ApplyIBConditions)(void *, void *, double *, double)
int MUSCLInitialize(void *, void *)
int Interp1PrimFifthOrderHCWENO(double *, double *, double *, double *, int, int, void *, void *, int)
5th order hybrid compact-WENO reconstruction (component-wise) on a uniform grid
char aux_op_fname_root[_MAX_STRING_SIZE_]
int(* SourceFunction)(double *, double *, void *, void *, double)
#define _SECOND_ORDER_CENTRAL_
int(* TimeIntegrate)(void *)
#define _SECOND_ORDER_MUSCL_
int WriteText(int, int, int *, double *, double *, char *, int *)
int(* SetInterpLimiterVar)(double *, double *, double *, int, 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))
int TimeForwardEuler(void *)
int(* VolumeIntegralFunction)(double *, double *, void *, void *)
int CompactSchemeInitialize(void *, void *, char *)
Structure containing all solver-specific variables and functions.
#define _MAX_STRING_SIZE_
char spatial_scheme_hyp[_MAX_STRING_SIZE_]
int NonLinearInterpolation(double *, void *, void *, double, int(*)(double *, double *, int, void *, double))
int Interp1PrimFirstOrderUpwindChar(double *, double *, double *, double *, int, int, void *, void *, int)
1st order upwind reconstruction (characteristic-based) on a uniform grid
int(* BoundaryIntegralFunction)(void *, void *)
char time_scheme[_MAX_STRING_SIZE_]
char op_overwrite[_MAX_STRING_SIZE_]
int Interp1PrimFifthOrderWENOChar(double *, double *, double *, double *, int, int, void *, void *, int)
5th order WENO reconstruction (characteristic-based) on a uniform grid
int gpuFirstDerivativeFourthOrderCentral(double *, double *, int, int, void *, void *)
char interp_type[_MAX_STRING_SIZE_]
int(* InterpolateInterfacesHyp)(double *, double *, double *, double *, int, int, void *, void *, int)
char op_fname_root[_MAX_STRING_SIZE_]
int ApplyBoundaryConditions(void *, void *, double *, double *, double)
Applies the boundary conditions specified for each boundary zone.
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 Interp1PrimFourthOrderCentral(double *, double *, double *, double *, int, int, void *, void *, int)
4th order central reconstruction (component-wise) on a uniform grid
char solnfilename_extn[_MAX_STRING_SIZE_]
char spatial_type_par[_MAX_STRING_SIZE_]
Structure of variables/parameters needed by the WENO-type scheme.
int ParabolicFunctionCons1Stage(double *, double *, void *, void *, double)
Structure of variables/parameters needed by the compact schemes.
int WriteTecplot2D(int, int, int *, double *, double *, char *, int *)
int(* FirstDerivativePar)(double *, double *, int, int, void *, void *)
int TimeGLMGEEInitialize(char *, char *, void *, void *)
int(* InterpolateInterfacesPar)(double *, double *, int, void *, void *)
#define _FIFTH_ORDER_CRWENO_
int Interp1PrimFifthOrderHCWENOChar(double *, double *, double *, double *, int, int, void *, void *, int)
5th order hybrid compact-WENO reconstruction (characteristic-based) on a uniform grid ...
int Interp1PrimSecondOrderCentralChar(double *, double *, double *, double *, int, int, void *, void *, int)
2nd order central reconstruction (characteristic-based) on a uniform grid
Structure of variables/parameters needed by the MUSCL scheme.
int(* WriteOutput)(int, int, int *, double *, double *, char *, int *)
char time_scheme_type[_MAX_STRING_SIZE_]
void IncrementFilenameIndex(char *, int)
#define _FIFTH_ORDER_COMPACT_UPWIND_
int Interp1PrimFifthOrderCompactUpwind(double *, double *, double *, double *, int, int, void *, void *, int)
5th order compact upwind reconstruction (component-wise) on a uniform grid
int Interp1PrimFourthOrderCentralChar(double *, double *, double *, double *, int, int, void *, void *, int)
4th order central reconstruction (characteristic-based) on a uniform grid
Structure of MPI-related variables.
#define _FIFTH_ORDER_UPWIND_
int Interp2PrimSecondOrder(double *, double *, int, void *, void *)
2nd order component-wise interpolation of the 2nd primitive on a uniform grid
Definitions for the functions computing the interpolated value of the primitive at the cell interface...
int gpuHyperbolicFunction(double *, double *, void *, void *, double, int, int(*)(double *, double *, int, void *, double), int(*)(double *, double *, double *, double *, double *, double *, int, void *, double))
Structure containing the parameters for an explicit Runge-Kutta method.
int FirstDerivativeSecondOrderCentral(double *, double *, int, int, void *, void *)
Structure containing the parameters for the General Linear Methods with Global Error Estimators (GLM-...
int BoundaryIntegral(void *, void *)
char op_file_format[_MAX_STRING_SIZE_]
Function declarations for file I/O functions.
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
Definitions for the functions computing the first derivative.
int ParabolicFunctionNC2Stage(double *, double *, void *, void *, double)
int ApplyIBConditions(void *, void *, double *, double)
int TimeExplicitRKInitialize(char *, char *, void *, void *)
int gpuInterp1PrimFifthOrderWENO(double *, double *, double *, double *, int, int, void *, void *, int)
Definitions for the functions computing the second derivative.
int Interp1PrimFifthOrderWENO(double *, double *, double *, double *, int, int, void *, void *, int)
5th order WENO reconstruction (component-wise) on a uniform grid
int CalculateConservationError(void *, void *)
int Interp1PrimFirstOrderUpwind(double *, double *, double *, double *, int, int, void *, void *, int)
1st order upwind reconstruction (component-wise) on a uniform grid