HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Find the nearest facet for immersed boundary points. More...
#include <stdio.h>
#include <basic.h>
#include <mathfunctions.h>
#include <mpivars.h>
#include <immersedboundaries.h>
Go to the source code of this file.
Functions | |
int | IBNearestFacetNormal (void *ib, void *m, double *X, double large_distance, int *dim_l, int ghosts) |
Find the nearest facet for immersed boundary points.
Definition in file IBNearestFacetNormal.c.
int IBNearestFacetNormal | ( | void * | ib, |
void * | m, | ||
double * | X, | ||
double | large_distance, | ||
int * | dim_l, | ||
int | ghosts | ||
) |
For each immersed boundary point, find the nearest facet (Facet3D) of the immersed body (ImmersedBoundary::body). The "nearest" facet is the one which is closest to the boundary point in terms of the distance along the normal defined for that facet.
Note: This function is sensitive to the fact that the normals defined for the immersed body are the outward normals, i.e., pointing away from the body. If this function returns an error, make sure this is true in the STL file the body is defined in.
ib | Immersed boundary object of type ImmersedBoundary |
m | MPI object of type MPIVariables |
X | Array of (local) spatial coordinates |
large_distance | A large distance |
dim_l | Integer array of local grid size in each spatial dimension |
ghosts | Number of ghost points |
Definition at line 25 of file IBNearestFacetNormal.c.