HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
ApplyIBConditions.c File Reference

Apply immersed boundary conditions. More...

#include <stdio.h>
#include <mpivars.h>
#include <hypar.h>

Go to the source code of this file.

Functions

int ApplyIBConditions (void *s, void *m, double *x, double waqt)
 

Detailed Description

Apply immersed boundary conditions.

Author
Debojyoti Ghosh

Definition in file ApplyIBConditions.c.

Function Documentation

◆ ApplyIBConditions()

int ApplyIBConditions ( void *  s,
void *  m,
double *  x,
double  waqt 
)

Call the physics-specific function that applies the immersed boundary conditions on the immersed boundary points.

Parameters
sObject of type HyPar containing solver-related variables
mObject of type MPIVariables containing MPI-related variables
xThe solution vector to apply immersed BCs on
waqtCurrent simulation time

Definition at line 14 of file ApplyIBConditions.c.

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
int(* IBFunction)(void *, void *, double *, double)
Definition: hypar.h:446
Structure containing all solver-specific variables and functions.
Definition: hypar.h:23
Structure of MPI-related variables.
int use_gpu
Definition: hypar.h:449