HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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 }
int flag_ib
Definition: hypar.h:441
MPI related function definitions.
int ApplyIBConditions(void *s, void *m, double *x, double waqt)
Contains structure definition for hypar.
int use_gpu
Definition: hypar.h:449
int(* IBFunction)(void *, void *, double *, double)
Definition: hypar.h:446
Structure of MPI-related variables.
Structure containing all solver-specific variables and functions.
Definition: hypar.h:23