HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
immersedboundaries.h
Go to the documentation of this file.
1 
6 #ifndef _IB_H_
7 #define _IB_H_
8 
10 #define _IB_NDIMS_ 3
11 
13 #define _IB_NNODES_ 8
14 
16 #define _IB_XY_ "2d (xy)"
17 
18 #define _IB_XZ_ "2d (xz)"
19 
20 #define _IB_YZ_ "2d (yz)"
21 
22 #define _IB_3D_ "3d"
23 
24 #include <basic.h>
25 
39 typedef struct _facet_3d_{
40  double x1,
41  x2,
42  x3,
43  y1,
44  y2,
45  y3,
46  z1,
47  z2,
48  z3,
49  nx,
50  ny,
51  nz;
52 } Facet3D;
53 
67 typedef struct _facet_map_{
69  int index;
70  int interp_nodes [_IB_NNODES_];
71  double interp_coeffs [_IB_NNODES_];
72  int interp_nodes_ns [_IB_NNODES_];
73  double interp_coeffs_ns[_IB_NNODES_];
75  double xc,
76  yc,
77  zc,
78  xns,
79  yns,
80  zns;
82  double dx,
83  dy,
84  dz;
85 } FacetMap;
86 
100 typedef struct _body_3d_{
101  int nfacets;
103  /* coordinates of bounding box */
104  double xmin,
105  xmax,
106  ymin,
107  ymax,
108  zmin,
109  zmax;
110 } Body3D;
111 
125 typedef struct _boundary_node_{
126  int i,
127  j,
128  k,
129  p;
130  double x,
131  y,
132  z;
135  int interp_nodes[_IB_NNODES_];
136  double interp_coeffs[_IB_NNODES_],
137  interp_node_distance,
140 } IBNode;
141 
153 typedef struct immersed_boundary{
158  double tolerance;
159  double delta;
160  int itr_max;
164  char mode[_MAX_STRING_SIZE_];
167 
168 
169 int IBReadBodySTL (Body3D**,char*,void*,int*);
170 int IBWriteBodySTL(Body3D*,char*,void*,int,int*);
171 
172 int IBCleanup (void*);
174 int IBCreateFacetMapping(void*,void*,double*,int*,int);
175 int IBIdentifyBody (void*,int*,int*,int,void*,double*,double*);
176 int IBIdentifyBoundary (void*,void*,int*,int,double*);
177 int IBIdentifyMode (double*,int*,void*);
178 int IBNearestFacetNormal(void*,void*,double*,double,int*,int);
179 int IBInterpCoeffs (void*,void*,double*,int*,int,double*);
180 
181 int IBAssembleGlobalFacetData(void*,void*,const double* const, double** const,int);
182 
183 int IBComputeNormalGradient(void*,void*,const double* const, int, double** const);
184 int IBComputeFacetVar(void*,void*,const double* const, int, double** const);
185 
186 #endif
int IBIdentifyMode(double *, int *, void *)
Structure defining a facet.
Structure defining a facet map.
Structure defining a body.
#define _IB_NNODES_
Structure defining an immersed boundary node.
Structure containing variables for immersed boundary implementation.
int IBNearestFacetNormal(void *, void *, double *, double, int *, int)
Facet3D * surface
Some basic definitions and macros.
int IBCreateFacetMapping(void *, void *, double *, int *, int)
int IBWriteBodySTL(Body3D *, char *, void *, int, int *)
#define _MAX_STRING_SIZE_
Definition: basic.h:14
Facet3D * facet
int IBReadBodySTL(Body3D **, char *, void *, int *)
Definition: IBReadBodySTL.c:21
int IBComputeNormalGradient(void *, void *, const double *const, int, double **const)
Facet3D * face
int IBIdentifyBody(void *, int *, int *, int, void *, double *, double *)
int IBComputeBoundingBox(Body3D *)
int IBCleanup(void *)
Definition: IBCleanup.c:11
double surface_distance
int IBInterpCoeffs(void *, void *, double *, int *, int, double *)
int IBComputeFacetVar(void *, void *, const double *const, int, double **const)
int IBIdentifyBoundary(void *, void *, int *, int, double *)
int IBAssembleGlobalFacetData(void *, void *, const double *const, double **const, int)