10 #if defined(HAVE_CUDA) 58 TS->
u_offsets = (
long*) calloc (nsims,
sizeof(
long));
59 TS->
u_sizes = (
long*) calloc (nsims,
sizeof(
long));
62 for (ns = 0; ns < nsims; ns++) {
78 TS->
bf_offsets = (
int*) calloc (nsims,
sizeof(
int));
79 TS->
bf_sizes = (
int*) calloc (nsims,
sizeof(
int));
81 for (ns = 0; ns < nsims; ns++) {
87 #if defined(HAVE_CUDA) 88 if (sim[0].solver.use_gpu) {
90 if (!strcmp(sim[0].solver.time_scheme,
_RK_)) {
105 fprintf(stderr,
"ERROR in TimeInitialize(): %s is not yet implemented on GPUs.\n",
106 sim[0].solver.time_scheme );
114 if (!strcmp(sim[0].solver.time_scheme,
_RK_)) {
119 TS->
U = (
double**) calloc (nstages,
sizeof(
double*));
120 TS->
Udot = (
double**) calloc (nstages,
sizeof(
double*));
121 for (i = 0; i < nstages; i++) {
122 TS->
U[i] = (
double*) calloc (TS->
u_size_total,
sizeof(
double));
126 TS->
BoundaryFlux = (
double**) calloc (nstages,
sizeof(
double*));
127 for (i=0; i<nstages; i++) {
134 TS->
BoundaryFlux = (
double**) calloc (nstages,
sizeof(
double*));
135 for (i=0; i<nstages; i++) {
139 }
else if (!strcmp(sim[0].solver.time_scheme,
_GLM_GEE_)) {
145 TS->
U = (
double**) calloc (2*r-1 ,
sizeof(
double*));
146 TS->
Udot = (
double**) calloc (nstages,
sizeof(
double*));
147 for (i=0; i<2*r-1; i++) TS->
U[i] = (
double*) calloc (TS->
u_size_total,
sizeof(
double));
148 for (i=0; i<nstages; i++) TS->
Udot[i] = (
double*) calloc (TS->
u_size_total,
sizeof(
double));
150 TS->
BoundaryFlux = (
double**) calloc (nstages,
sizeof(
double*));
151 for (i=0; i<nstages; i++) {
157 for (ns = 0; ns < nsims; ns++) {
158 for (i=0; i<r-1; i++) {
165 for (i=0; i<r-1; i++) {
170 #if defined(HAVE_CUDA) 179 if (sim[0].solver.write_residual) TS->
ResidualFile = (
void*) fopen(
"residual.out",
"w");
183 for (ns = 0; ns < nsims; ns++) {
Structure of variables/parameters and function pointers for time integration.
void gpuMemset(void *, int, size_t)
Contains function definitions for common array operations on GPU.
int TimeRHSFunctionExplicit(double *, double *, void *, void *, double)
Structure defining a simulation.
Some basic definitions and macros.
Contains function declarations for time integration.
int(* RHSFunction)(double *, double *, void *, void *, double)
int(* TimeIntegrate)(void *)
int(* TimeIntegrate)(void *)
void gpuMalloc(void **, size_t)
char ee_mode[_MAX_STRING_SIZE_]
#define _ArraySetValue_(x, size, value)
int TimeInitialize(void *s, int nsims, int rank, int nproc, void *ts)
double * gpu_BoundaryFlux
Structure containing the parameters for an explicit Runge-Kutta method.
Structure containing the parameters for the General Linear Methods with Global Error Estimators (GLM-...
int npoints_local_wghosts
#define _ArrayCopy1D_(x, y, size)
Contains macros and function definitions for common array operations.