HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
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
9
int
IBComputeBoundingBox
(
Body3D
*b )
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
}
IBComputeBoundingBox
int IBComputeBoundingBox(Body3D *)
Definition:
IBComputeBoundingBox.c:9
Body3D
Structure defining a body.
Definition:
immersedboundaries.h:100
Facet3D::x1
double x1
Definition:
immersedboundaries.h:40
Body3D::xmin
double xmin
Definition:
immersedboundaries.h:104
immersedboundaries.h
Structures and function definitions for immersed boundaries.
Facet3D::y3
double y3
Definition:
immersedboundaries.h:40
Body3D::zmax
double zmax
Definition:
immersedboundaries.h:104
Facet3D::y1
double y1
Definition:
immersedboundaries.h:40
Facet3D::z2
double z2
Definition:
immersedboundaries.h:40
Body3D::ymax
double ymax
Definition:
immersedboundaries.h:104
Body3D::ymin
double ymin
Definition:
immersedboundaries.h:104
Body3D::surface
Facet3D * surface
Definition:
immersedboundaries.h:102
Facet3D::x3
double x3
Definition:
immersedboundaries.h:40
Body3D::zmin
double zmin
Definition:
immersedboundaries.h:104
Body3D::xmax
double xmax
Definition:
immersedboundaries.h:104
Facet3D::z1
double z1
Definition:
immersedboundaries.h:40
Facet3D::y2
double y2
Definition:
immersedboundaries.h:40
Facet3D::x2
double x2
Definition:
immersedboundaries.h:40
Facet3D::z3
double z3
Definition:
immersedboundaries.h:40
Body3D::nfacets
int nfacets
Definition:
immersedboundaries.h:101