HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Identify 2D/3D mode for immersed body simulations. More...
Go to the source code of this file.
Functions | |
int | IBIdentifyMode (double *X, int *dim, void *ib) |
Identify 2D/3D mode for immersed body simulations.
Definition in file IBIdentifyMode.c.
int IBIdentifyMode | ( | double * | X, |
int * | dim, | ||
void * | ib | ||
) |
Identify the "mode", i.e., whether the simulation is a true 3D simulation, or a 2D simulation being run in 3D. If extent of the immersed body is larger than the grid along a particular axis (say, x), then we assume that the intention is to simulate a 2D case around a 2D body in the plane normal to that axis ( y-z plane ).
For example, to simulate a 2D cylinder in the x-y plane, we consider a cylinder whose extent along z is larger than the extent of the grid along z, i.e., it sticks out of the computational domain at both ends.
If the immersed body is completely contained within the computational domain, or sticks out only on one end along a particular dimension, we assume it's a 3D simulation.
X | Array of global spatial coordinates |
dim | global dimensions |
ib | Immersed boundary object of type ImmersedBoundary |
Definition at line 24 of file IBIdentifyMode.c.