HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
ApplyIBConditions.c
Go to the documentation of this file.
1 
6 #include <stdio.h>
7 #include <mpivars.h>
8 #include <hypar.h>
9 
14 int ApplyIBConditions(void *s,
15  void *m,
16  double *x,
17  double waqt
18  )
19 {
20  HyPar *solver = (HyPar*) s;
21  MPIVariables *mpi = (MPIVariables*) m;
22 
23  /* Apply immersed boundary conditions, if applicable */
24 #if defined(HAVE_CUDA)
25  if (solver->use_gpu) {
26  if (solver->flag_ib) {
27  fprintf(stderr, "ERROR: immersed boundaries have not yet been implemented on GPU.\n");
28  }
29  } else {
30 #endif
31  if (solver->flag_ib) solver->IBFunction(solver,mpi,x,waqt);
32 #if defined(HAVE_CUDA)
33  }
34 #endif
35 
36  return 0;
37 }
MPI related function definitions.
int flag_ib
Definition: hypar.h:441
int(* IBFunction)(void *, void *, double *, double)
Definition: hypar.h:446
Structure containing all solver-specific variables and functions.
Definition: hypar.h:23
int ApplyIBConditions(void *s, void *m, double *x, double waqt)
Contains structure definition for hypar.
Structure of MPI-related variables.
int use_gpu
Definition: hypar.h:449