HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
IBComputeBoundingBox.c
Go to the documentation of this file.
1 
6 #include <immersedboundaries.h>
7 
10 {
11  b->xmin = b->xmax = b->surface[0].x1;
12  b->ymin = b->ymax = b->surface[0].y1;
13  b->zmin = b->zmax = b->surface[0].z1;
14 
15  int n;
16  for (n = 0; n < b->nfacets; n++) {
17  if (b->surface[n].x1 < b->xmin) b->xmin = b->surface[n].x1;
18  if (b->surface[n].x2 < b->xmin) b->xmin = b->surface[n].x2;
19  if (b->surface[n].x3 < b->xmin) b->xmin = b->surface[n].x3;
20 
21  if (b->surface[n].y1 < b->ymin) b->ymin = b->surface[n].y1;
22  if (b->surface[n].y2 < b->ymin) b->ymin = b->surface[n].y2;
23  if (b->surface[n].y3 < b->ymin) b->ymin = b->surface[n].y3;
24 
25  if (b->surface[n].z1 < b->zmin) b->zmin = b->surface[n].z1;
26  if (b->surface[n].z2 < b->zmin) b->zmin = b->surface[n].z2;
27  if (b->surface[n].z3 < b->zmin) b->zmin = b->surface[n].z3;
28 
29  if (b->surface[n].x1 > b->xmax) b->xmax = b->surface[n].x1;
30  if (b->surface[n].x2 > b->xmax) b->xmax = b->surface[n].x2;
31  if (b->surface[n].x3 > b->xmax) b->xmax = b->surface[n].x3;
32 
33  if (b->surface[n].y1 > b->ymax) b->ymax = b->surface[n].y1;
34  if (b->surface[n].y2 > b->ymax) b->ymax = b->surface[n].y2;
35  if (b->surface[n].y3 > b->ymax) b->ymax = b->surface[n].y3;
36 
37  if (b->surface[n].z1 > b->zmax) b->zmax = b->surface[n].z1;
38  if (b->surface[n].z2 > b->zmax) b->zmax = b->surface[n].z2;
39  if (b->surface[n].z3 > b->zmax) b->zmax = b->surface[n].z3;
40  }
41  return(0);
42 }
int IBComputeBoundingBox(Body3D *)
Structure defining a body.
Structures and function definitions for immersed boundaries.
Facet3D * surface