HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
InitializeBoundaries.c
Go to the documentation of this file.
1 
6 #include <stdio.h>
7 #include <stdlib.h>
8 #include <string.h>
9 #include <basic.h>
10 #include <common.h>
11 #if defined(HAVE_CUDA)
12 #include <basic_gpu.h>
13 #include <arrayfunctions_gpu.h>
14 #endif
15 #include <mathfunctions.h>
16 #include <boundaryconditions.h>
17 #include <mpivars.h>
18 #include <simulation_object.h>
19 
20 static int CalculateLocalExtent(void*,void*);
21 
36 int InitializeBoundaries( void *s,
37  int nsims
38  )
39 {
41  int ns;
43 
44  for (ns = 0; ns < nsims; ns++) {
45 
46  DomainBoundary *boundary = NULL;
47  HyPar *solver = &(sim[ns].solver);
48  MPIVariables *mpi = &(sim[ns].mpi);
49  int nb, ferr;
50 
51  /* root process reads boundary condition file */
52  if (!mpi->rank) {
53 
54  char filename[_MAX_STRING_SIZE_] = "boundary";
55  char filename_backup[_MAX_STRING_SIZE_] = "boundary";
56  if (nsims > 1) {
57  char index[_MAX_STRING_SIZE_];
58  GetStringFromInteger(ns, index, (int)log10(nsims)+1);
59  strcat(filename, "_");
60  strcat(filename, index);
61  }
62  strcat(filename, ".inp");
63  strcat(filename_backup, ".inp");
64 
65  FILE *in;
66  in = fopen(filename,"r");
67  if (!in) {
68  in = fopen(filename_backup, "r");
69  if (!in) {
70  fprintf(stderr,"Error: boundary condition file %s or %s not found.\n",
71  filename, filename_backup );
72  return(1);
73  } else {
74  if (nsims > 1) printf("Domain %d: ", ns);
75  printf("Reading boundary conditions from %s.\n", filename_backup);
76  }
77  } else {
78  if (nsims > 1) printf("Domain %d: ", ns);
79  printf("Reading boundary conditions from %s.\n", filename);
80  }
81 
82  /* read number of boundary conditions and allocate */
83  ferr = fscanf(in,"%d",&solver->nBoundaryZones); if (ferr != 1) return(1);
84  boundary = (DomainBoundary*) calloc (solver->nBoundaryZones,sizeof(DomainBoundary));
85  for (nb = 0; nb < solver->nBoundaryZones; nb++) {
86  boundary[nb].DirichletValue = boundary[nb].SpongeValue
87  = boundary[nb].FlowVelocity
88  = boundary[nb].UnsteadyDirichletData
89  = NULL;
90  boundary[nb].UnsteadyDirichletSize = NULL;
91  }
92 
93  /* read each boundary condition */
94  for (nb = 0; nb < solver->nBoundaryZones; nb++) {
95  int d, v;
96  boundary[nb].xmin = (double*) calloc (solver->ndims,sizeof(double)); /* deallocated in BCCleanup.c */
97  boundary[nb].xmax = (double*) calloc (solver->ndims,sizeof(double)); /* deallocated in BCCleanup.c */
98 
99  ferr = fscanf(in,"%s",boundary[nb].bctype); if (ferr != 1) return(1);
100  ferr = fscanf(in,"%d",&boundary[nb].dim ); if (ferr != 1) return(1);
101  ferr = fscanf(in,"%d",&boundary[nb].face ); if (ferr != 1) return(1);
102  for (d=0; d < solver->ndims; d++) {
103  ferr = fscanf(in,"%lf %lf", &boundary[nb].xmin[d], &boundary[nb].xmax[d]);
104  if (ferr != 2) return(1);
105  }
106 
107  /* read in boundary type-specific additional data if required */
108 
109  if (!strcmp(boundary[nb].bctype,_DIRICHLET_)) {
110  boundary[nb].DirichletValue = (double*) calloc (solver->nvars,sizeof(double));
111  /* deallocated in BCCleanup.c */
112  /* read the Dirichlet value for each variable on this boundary */
113  for (v = 0; v < solver->nvars; v++) ferr = fscanf(in,"%lf",&boundary[nb].DirichletValue[v]);
114  }
115 
116  if (!strcmp(boundary[nb].bctype,_SPONGE_)) {
117  boundary[nb].SpongeValue = (double*) calloc (solver->nvars,sizeof(double));
118  /* deallocated in BCCleanup.c */
119  /* read the sponge value for each variable on this boundary */
120  for (v = 0; v < solver->nvars; v++) ferr = fscanf(in,"%lf",&boundary[nb].SpongeValue[v]);
121  }
122 
123  if ( (!strcmp(boundary[nb].bctype,_SLIP_WALL_))
124  || (!strcmp(boundary[nb].bctype,_NOSLIP_WALL_)) ) {
125  boundary[nb].FlowVelocity = (double*) calloc (solver->ndims,sizeof(double));
126  /* deallocated in BCCleanup.c */
127  /* read the wall velocity */
128  for (v = 0; v < solver->ndims; v++) ferr = fscanf(in,"%lf",&boundary[nb].FlowVelocity[v]);
129  }
130 
131  if ( (!strcmp(boundary[nb].bctype,_SW_SLIP_WALL_))
132  || (!strcmp(boundary[nb].bctype,_SW_NOSLIP_WALL_)) ) {
133  boundary[nb].FlowVelocity = (double*) calloc (solver->ndims,sizeof(double));
134  /* deallocated in BCCleanup.c */
135  /* read the wall velocity */
136  for (v = 0; v < solver->ndims; v++) ferr = fscanf(in,"%lf",&boundary[nb].FlowVelocity[v]);
137  }
138 
139  if (!strcmp(boundary[nb].bctype,_SUBSONIC_INFLOW_)) {
140  boundary[nb].FlowVelocity = (double*) calloc (solver->ndims,sizeof(double));
141  /* deallocated in BCCleanup.c */
142  /* read in the inflow density and velocity */
143  ferr = fscanf(in,"%lf",&boundary[nb].FlowDensity);
144  for (v = 0; v < solver->ndims; v++) ferr = fscanf(in,"%lf",&boundary[nb].FlowVelocity[v]);
145  }
146 
147  if (!strcmp(boundary[nb].bctype,_SUBSONIC_OUTFLOW_)) {
148  /* read in the outflow pressure */
149  ferr = fscanf(in,"%lf",&boundary[nb].FlowPressure);
150  }
151 
152  if (!strcmp(boundary[nb].bctype,_SUBSONIC_AMBIVALENT_)) {
153  boundary[nb].FlowVelocity = (double*) calloc (solver->ndims,sizeof(double));
154  /* deallocated in BCCleanup.c */
155  /* read in the inflow density, velocity, and pressure */
156  ferr = fscanf(in,"%lf",&boundary[nb].FlowDensity);
157  for (v = 0; v < solver->ndims; v++) ferr = fscanf(in,"%lf",&boundary[nb].FlowVelocity[v]);
158  ferr = fscanf(in,"%lf",&boundary[nb].FlowPressure);
159  }
160 
161  if (!strcmp(boundary[nb].bctype,_SUPERSONIC_INFLOW_)) {
162  boundary[nb].FlowVelocity = (double*) calloc (solver->ndims,sizeof(double));
163  /* deallocated in BCCleanup.c */
164  /* read in the inflow density, velocity and pressure */
165  ferr = fscanf(in,"%lf",&boundary[nb].FlowDensity);
166  for (v = 0; v < solver->ndims; v++) ferr = fscanf(in,"%lf",&boundary[nb].FlowVelocity[v]);
167  ferr = fscanf(in,"%lf",&boundary[nb].FlowPressure);
168  }
169 
170  if (!strcmp(boundary[nb].bctype,_TURBULENT_SUPERSONIC_INFLOW_)) {
171  boundary[nb].FlowVelocity = (double*) calloc (solver->ndims,sizeof(double));
172  /* deallocated in BCCleanup.c */
173  /* read in the inflow density, velocity and pressure */
174  ferr = fscanf(in,"%lf",&boundary[nb].FlowDensity);
175  for (v = 0; v < solver->ndims; v++) ferr = fscanf(in,"%lf",&boundary[nb].FlowVelocity[v]);
176  ferr = fscanf(in,"%lf",&boundary[nb].FlowPressure);
177  ferr = fscanf(in,"%s" , boundary[nb].UnsteadyDirichletFilename);
178  }
179 
180  if ( (!strcmp(boundary[nb].bctype,_THERMAL_SLIP_WALL_))
181  || (!strcmp(boundary[nb].bctype,_THERMAL_NOSLIP_WALL_)) ){
182  boundary[nb].FlowVelocity = (double*) calloc (solver->ndims,sizeof(double));
183  /* deallocated in BCCleanup.c */
184  /* read the wall velocity */
185  for (v = 0; v < solver->ndims; v++) ferr = fscanf(in,"%lf",&boundary[nb].FlowVelocity[v]);
186  /* read in the filename where temperature data is available */
187  ferr = fscanf(in,"%s" , boundary[nb].UnsteadyTemperatureFilename);
188  }
189 
190  /* if boundary is periodic, let the MPI and HyPar know */
191  if (!strcmp(boundary[nb].bctype,_PERIODIC_)) {
192  solver->isPeriodic[boundary[nb].dim] = 1;
193  }
194  /*
195  The MPI function to exchange internal (MPI) boundary information will handle
196  periodic boundaries ONLY IF number of process along that dimension is more
197  than 1.
198  */
199  if ((!strcmp(boundary[nb].bctype,_PERIODIC_)) && (mpi->iproc[boundary[nb].dim] > 1)) {
200  mpi->bcperiodic[boundary[nb].dim] = 1;
201  }
202 
203  /* some checks */
204  if (boundary[nb].dim >= solver->ndims) {
205  fprintf(stderr,"Error in reading boundary condition %d: dim %d is invalid (ndims = %d).\n",
206  nb,boundary[nb].dim,solver->ndims);
207  return(1);
208  }
209  printf(" Boundary %30s: Along dimension %2d and face %+1d\n",
210  boundary[nb].bctype,boundary[nb].dim,boundary[nb].face);
211  }
212 
213  fclose(in);
214  printf("%d boundary condition(s) read.\n",solver->nBoundaryZones);
215  }
216 
217  /* tell other processes how many BCs are there and let them allocate */
218  IERR MPIBroadcast_integer(&solver->nBoundaryZones,1,0,&mpi->world); CHECKERR(ierr);
219  if (mpi->rank) {
220  boundary = (DomainBoundary*) calloc (solver->nBoundaryZones,sizeof(DomainBoundary));
221  for (nb = 0; nb < solver->nBoundaryZones; nb++) {
222  boundary[nb].xmin = (double*) calloc (solver->ndims,sizeof(double)); /* deallocated in BCCleanup.c */
223  boundary[nb].xmax = (double*) calloc (solver->ndims,sizeof(double)); /* deallocated in BCCleanup.c */
224  boundary[nb].DirichletValue = boundary[nb].SpongeValue
225  = boundary[nb].FlowVelocity
226  = boundary[nb].UnsteadyDirichletData
227  = NULL;
228  boundary[nb].UnsteadyDirichletSize = NULL;
229  }
230  }
231 
232  /* communicate BC data to other processes */
233  for (nb = 0; nb < solver->nBoundaryZones; nb++) {
234  IERR MPIBroadcast_character(boundary[nb].bctype,_MAX_STRING_SIZE_,0,&mpi->world); CHECKERR(ierr);
235  IERR MPIBroadcast_integer (&boundary[nb].dim ,1 ,0,&mpi->world); CHECKERR(ierr);
236  IERR MPIBroadcast_integer (&boundary[nb].face ,1 ,0,&mpi->world); CHECKERR(ierr);
237  IERR MPIBroadcast_double (boundary[nb].xmin ,solver->ndims ,0,&mpi->world); CHECKERR(ierr);
238  IERR MPIBroadcast_double (boundary[nb].xmax ,solver->ndims ,0,&mpi->world); CHECKERR(ierr);
239  }
240  IERR MPIBroadcast_integer(solver->isPeriodic,solver->ndims,0,&mpi->world);CHECKERR(ierr);
241 
242  /* broadcast periodic boundary info for MPI to all processes */
243  IERR MPIBroadcast_integer(mpi->bcperiodic,solver->ndims,0,&mpi->world);CHECKERR(ierr);
244 
245  /* On other processes, if necessary, allocate and receive boundary-type-specific data */
246  for (nb = 0; nb < solver->nBoundaryZones; nb++) {
247  if (!strcmp(boundary[nb].bctype,_DIRICHLET_)) {
248  if (mpi->rank) boundary[nb].DirichletValue = (double*) calloc (solver->nvars,sizeof(double));
249  IERR MPIBroadcast_double(boundary[nb].DirichletValue,solver->nvars,0,&mpi->world); CHECKERR(ierr);
250  }
251 
252  if (!strcmp(boundary[nb].bctype,_SPONGE_)) {
253  if (mpi->rank) boundary[nb].SpongeValue = (double*) calloc (solver->nvars,sizeof(double));
254  IERR MPIBroadcast_double(boundary[nb].SpongeValue,solver->nvars,0,&mpi->world); CHECKERR(ierr);
255  }
256 
257  if ( (!strcmp(boundary[nb].bctype,_SLIP_WALL_))
258  || (!strcmp(boundary[nb].bctype,_NOSLIP_WALL_)) ) {
259  if (mpi->rank) boundary[nb].FlowVelocity = (double*) calloc (solver->ndims,sizeof(double));
260  IERR MPIBroadcast_double(boundary[nb].FlowVelocity,solver->ndims,0,&mpi->world); CHECKERR(ierr);
261  }
262 
263  if ( (!strcmp(boundary[nb].bctype,_SW_SLIP_WALL_))
264  || (!strcmp(boundary[nb].bctype,_SW_NOSLIP_WALL_)) ) {
265  if (mpi->rank) boundary[nb].FlowVelocity = (double*) calloc (solver->ndims,sizeof(double));
266  IERR MPIBroadcast_double(boundary[nb].FlowVelocity,solver->ndims,0,&mpi->world); CHECKERR(ierr);
267  }
268 
269  if (!strcmp(boundary[nb].bctype,_SUBSONIC_INFLOW_)) {
270  if (mpi->rank) boundary[nb].FlowVelocity = (double*) calloc (solver->ndims,sizeof(double));
271  IERR MPIBroadcast_double(&boundary[nb].FlowDensity,1 ,0,&mpi->world); CHECKERR(ierr);
272  IERR MPIBroadcast_double(boundary[nb].FlowVelocity,solver->ndims,0,&mpi->world); CHECKERR(ierr);
273  }
274 
275  if (!strcmp(boundary[nb].bctype,_SUBSONIC_OUTFLOW_)) {
276  IERR MPIBroadcast_double(&boundary[nb].FlowPressure,1,0,&mpi->world); CHECKERR(ierr);
277  }
278 
279  if (!strcmp(boundary[nb].bctype,_SUBSONIC_AMBIVALENT_)) {
280  if (mpi->rank) boundary[nb].FlowVelocity = (double*) calloc (solver->ndims,sizeof(double));
281  IERR MPIBroadcast_double(&boundary[nb].FlowDensity,1 ,0,&mpi->world); CHECKERR(ierr);
282  IERR MPIBroadcast_double(boundary[nb].FlowVelocity,solver->ndims,0,&mpi->world); CHECKERR(ierr);
283  IERR MPIBroadcast_double(&boundary[nb].FlowPressure,1,0,&mpi->world); CHECKERR(ierr);
284  }
285 
286  if (!strcmp(boundary[nb].bctype,_SUPERSONIC_INFLOW_)) {
287  if (mpi->rank) boundary[nb].FlowVelocity = (double*) calloc (solver->ndims,sizeof(double));
288  IERR MPIBroadcast_double(&boundary[nb].FlowDensity ,1 ,0,&mpi->world); CHECKERR(ierr);
289  IERR MPIBroadcast_double(boundary[nb].FlowVelocity ,solver->ndims,0,&mpi->world); CHECKERR(ierr);
290  IERR MPIBroadcast_double(&boundary[nb].FlowPressure,1 ,0,&mpi->world); CHECKERR(ierr);
291  }
292 
293  if (!strcmp(boundary[nb].bctype,_TURBULENT_SUPERSONIC_INFLOW_)) {
294  if (mpi->rank) boundary[nb].FlowVelocity = (double*) calloc (solver->ndims,sizeof(double));
295  IERR MPIBroadcast_double(&boundary[nb].FlowDensity ,1 ,0,&mpi->world); CHECKERR(ierr);
296  IERR MPIBroadcast_double(boundary[nb].FlowVelocity ,solver->ndims,0,&mpi->world); CHECKERR(ierr);
297  IERR MPIBroadcast_double(&boundary[nb].FlowPressure,1 ,0,&mpi->world); CHECKERR(ierr);
298  /* allocate arrays and read in unsteady boundary data */
299  IERR BCReadTurbulentInflowData(&boundary[nb],mpi,solver->ndims,solver->nvars,solver->dim_local); CHECKERR(ierr);
300  }
301 
302  if ( (!strcmp(boundary[nb].bctype,_THERMAL_SLIP_WALL_))
303  || (!strcmp(boundary[nb].bctype,_THERMAL_NOSLIP_WALL_)) ) {
304  if (mpi->rank) boundary[nb].FlowVelocity = (double*) calloc (solver->ndims,sizeof(double));
305  IERR MPIBroadcast_double(boundary[nb].FlowVelocity,solver->ndims,0,&mpi->world); CHECKERR(ierr);
306  /* allocate arrays and read in boundary temperature data */
307  IERR BCReadTemperatureData(&boundary[nb],mpi,solver->ndims,solver->nvars,solver->dim_local); CHECKERR(ierr);
308  }
309 
310  }
311 
312  solver->boundary = boundary;
313 
314  /* each process calculates its own part of these boundaries */
315  IERR CalculateLocalExtent(solver,mpi); CHECKERR(ierr);
316 
317 #if defined(HAVE_CUDA)
318  int bounds[GPU_MAX_NDIMS];
319  if (sim[0].solver.use_gpu) {
320  for (nb = 0; nb < solver->nBoundaryZones; nb++) {
321  _ArraySubtract1D_(bounds,boundary[nb].ie,boundary[nb].is,solver->ndims);
322 
323  _ArrayProduct1D_(bounds,solver->ndims,boundary[nb].gpu_npoints_bounds);
324  boundary[nb].gpu_npoints_local_wghosts = solver->npoints_local_wghosts;
325 
326  _ArrayProduct1D_(bounds,solver->ndims,boundary[nb].gpu_npoints_bounds);
327  boundary[nb].gpu_npoints_local_wghosts = solver->npoints_local_wghosts;
328 
329  gpuMalloc((void**)&boundary[nb].gpu_is, solver->ndims*sizeof(int));
330  gpuMalloc((void**)&boundary[nb].gpu_ie, solver->ndims*sizeof(int));
331  gpuMalloc((void**)&boundary[nb].gpu_bounds, solver->ndims*sizeof(int));
332  gpuMemcpy(boundary[nb].gpu_is, boundary[nb].is, solver->ndims*sizeof(int), gpuMemcpyHostToDevice);
333  gpuMemcpy(boundary[nb].gpu_ie, boundary[nb].ie, solver->ndims*sizeof(int), gpuMemcpyHostToDevice);
334  gpuMemcpy(boundary[nb].gpu_bounds, bounds, solver->ndims*sizeof(int), gpuMemcpyHostToDevice);
335  if ( (!strcmp(boundary[nb].bctype,_SLIP_WALL_))
336  || (!strcmp(boundary[nb].bctype,_NOSLIP_WALL_)) ) {
337  gpuMalloc((void**)&boundary[nb].gpu_FlowVelocity, solver->ndims*sizeof(double));
338  gpuMemcpy( boundary[nb].gpu_FlowVelocity,
339  boundary[nb].FlowVelocity,
340  solver->ndims*sizeof(double),
342  }
343  }
344  }
345 #endif
346 
347  /* initialize function pointers for each boundary condition */
348  for (nb = 0; nb < solver->nBoundaryZones; nb++) {
349 #if defined(HAVE_CUDA)
350  BCInitialize(&boundary[nb], solver->use_gpu);
351 #else
352  BCInitialize(&boundary[nb], 0);
353 #endif
354  }
355 
356  }
357 
358  return 0;
359 }
360 
366  void *s,
367  void *m
368  )
369 {
370  HyPar *solver = (HyPar*) s;
371  MPIVariables *mpi = (MPIVariables*) m;
372  DomainBoundary *boundary = solver->boundary;
373 
374  int n;
375  for (n = 0; n < solver->nBoundaryZones; n++) {
376  /* allocate */
377  boundary[n].is = (int*) calloc (solver->ndims,sizeof(int)); /* deallocated in BCCleanup.c */
378  boundary[n].ie = (int*) calloc (solver->ndims,sizeof(int)); /* deallocated in BCCleanup.c */
379 
380  int d,dim = boundary[n].dim;
381 
382  if (!strcmp(boundary[n].bctype,_SPONGE_)) {
383  /* Sponge boundary condition */
384  boundary[n].on_this_proc = 1;
385  int offset = 0;
386  for (d=0; d<solver->ndims; d++) {
387  int is, ie;
388  FindInterval(boundary[n].xmin[d],boundary[n].xmax[d],
389  &solver->x[offset+solver->ghosts],
390  solver->dim_local[d],&is,&ie);
391  boundary[n].is[d] = is;
392  boundary[n].ie[d] = ie;
393  if ((ie-is) <= 0) boundary[n].on_this_proc = 0;
394  offset += solver->dim_local[d] + 2*solver->ghosts;
395  }
396  } else {
397  /* other boundary conditions */
398  if (boundary[n].face == 1) {
399 
400  if (mpi->ip[dim] == 0) {
401  boundary[n].on_this_proc = 1;
402  int offset = 0;
403  for (d=0; d<solver->ndims; d++) {
404  if (d == dim) {
405  boundary[n].is[d] = -solver->ghosts;
406  boundary[n].ie[d] = 0;
407  } else {
408  int is, ie;
409  FindInterval(boundary[n].xmin[d],boundary[n].xmax[d],
410  &solver->x[offset+solver->ghosts],
411  solver->dim_local[d],&is,&ie);
412  boundary[n].is[d] = is;
413  boundary[n].ie[d] = ie;
414  if ((ie-is) <= 0) boundary[n].on_this_proc = 0;
415  }
416  offset += solver->dim_local[d] + 2*solver->ghosts;
417  }
418  } else boundary[n].on_this_proc = 0;
419 
420  } else if (boundary[n].face == -1) {
421 
422  if (mpi->ip[dim] == mpi->iproc[dim]-1) {
423  boundary[n].on_this_proc = 1;
424  int offset = 0;
425  for (d=0; d<solver->ndims; d++) {
426  if (d == dim) {
427  boundary[n].is[d] = solver->dim_local[dim];
428  boundary[n].ie[d] = solver->dim_local[dim] + solver->ghosts;
429  } else {
430  int is, ie;
431  FindInterval(boundary[n].xmin[d],boundary[n].xmax[d],
432  &solver->x[offset+solver->ghosts],
433  solver->dim_local[d],&is,&ie);
434  boundary[n].is[d] = is;
435  boundary[n].ie[d] = ie;
436  if ((ie-is) <= 0) boundary[n].on_this_proc = 0;
437  }
438  offset += solver->dim_local[d] + 2*solver->ghosts;
439  }
440  } else boundary[n].on_this_proc = 0;
441  }
442  }
443 
444  }
445 
446  return(0);
447 }
Some common functions used here and there.
#define _SUPERSONIC_INFLOW_
static int CalculateLocalExtent(void *, void *)
int BCInitialize(void *, int)
Definition: BCInitialize.c:12
int nvars
Definition: hypar.h:29
Containts the structures and definitions for boundary condition implementation.
#define IERR
Definition: basic.h:16
MPI related function definitions.
Contains function definitions for common array operations on GPU.
#define CHECKERR(ierr)
Definition: basic.h:18
Contains function definitions for common mathematical functions.
Structure defining a simulation.
int InitializeBoundaries(void *s, int nsims)
void * boundary
Definition: hypar.h:159
void FindInterval(double, double, double *, int, int *, int *)
Definition: FindInterval.c:19
#define _SUBSONIC_AMBIVALENT_
int MPIBroadcast_integer(int *, int, int, void *)
Definition: MPIBroadcast.c:23
#define _DIRICHLET_
Some basic definitions and macros.
#define _THERMAL_SLIP_WALL_
Simulation object.
#define _THERMAL_NOSLIP_WALL_
double * x
Definition: hypar.h:107
#define _SPONGE_
Structure containing the variables and function pointers defining a boundary.
#define _SW_NOSLIP_WALL_
int ndims
Definition: hypar.h:26
#define _ArraySubtract1D_(x, a, b, size)
double * UnsteadyDirichletData
int MPIBroadcast_character(char *, int, int, void *)
Definition: MPIBroadcast.c:37
int MPIBroadcast_double(double *, int, int, void *)
Definition: MPIBroadcast.c:9
Structure containing all solver-specific variables and functions.
Definition: hypar.h:23
void gpuMalloc(void **, size_t)
#define _MAX_STRING_SIZE_
Definition: basic.h:14
#define _SW_SLIP_WALL_
int BCReadTurbulentInflowData(void *, void *, int, int, int *)
Definition: BCIO.c:19
MPI_Comm world
void GetStringFromInteger(int, char *, int)
#define GPU_MAX_NDIMS
Definition: basic_gpu.h:8
#define _SUBSONIC_INFLOW_
int * dim_local
Definition: hypar.h:37
void gpuMemcpy(void *, const void *, size_t, enum gpuMemcpyKind)
#define _SUBSONIC_OUTFLOW_
int ghosts
Definition: hypar.h:52
#define _NOSLIP_WALL_
Structure of MPI-related variables.
int use_gpu
Definition: hypar.h:449
int nBoundaryZones
Definition: hypar.h:157
int npoints_local_wghosts
Definition: hypar.h:42
#define _DECLARE_IERR_
Definition: basic.h:17
#define _SLIP_WALL_
#define _ArrayProduct1D_(x, size, p)
int * isPeriodic
Definition: hypar.h:162
int BCReadTemperatureData(void *, void *, int, int, int *)
Definition: BCIO.c:147
#define _PERIODIC_
#define _TURBULENT_SUPERSONIC_INFLOW_