HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Create facet mapping. More...
#include <stdlib.h>
#include <string.h>
#include <arrayfunctions.h>
#include <mathfunctions.h>
#include <immersedboundaries.h>
#include <mpivars.h>
Go to the source code of this file.
Functions | |
static int | isInside (double x, double a, double b) |
static int | interpNodesCoeffs (void *m, double xc, double yc, double zc, double *x, double *y, double *z, int *dim, int ghosts, char *mode, int *ii, int *jj, int *kk, int *inodes, double *icoeffs) |
int | IBCreateFacetMapping (void *ib, void *m, double *X, int *dim, int ghosts) |
Create facet mapping.
Definition in file IBCreateFacetMapping.c.
|
inlinestatic |
is x inside the interval [a,b]?
x | the value to check for |
a | small end of the interval |
b | big end of the interval |
Definition at line 14 of file IBCreateFacetMapping.c.
|
static |
Given a point in the 3D space (xc, yc, zc), this function finds the indices of the 8 grid points that define the grid cell the given point is in, as well as the trilinear interpolation coefficients for each of the surrounding grid points.
m | MPI object of type MPIVariables |
xc | x-coordinate of the point |
yc | y-coordinate of the point |
zc | z-coordinate of the point |
x | array of x-coordinates of the grid |
y | array of y-coordinates of the grid |
z | array of z-coordinates of the grid |
dim | local dimensions of the grid |
ghosts | number of ghost points |
mode | "mode", i.e., ImmersedBoundary::mode |
ii | i-index of the surrounding node at the high end (i.e. smallest i such that x[i] > xc) |
jj | j-index of the surrounding node at the high end (i.e. smallest j such that y[j] > yc) |
kk | k-index of the surrounding node at the high end (i.e. smallest k such that z[k] > zc) |
inodes | array to store the indices of the surrounding nodes |
icoeffs | array to store the interpolation coefficients of the surrounding nodes |
Definition at line 28 of file IBCreateFacetMapping.c.
int IBCreateFacetMapping | ( | void * | ib, |
void * | m, | ||
double * | X, | ||
int * | dim, | ||
int | ghosts | ||
) |
This function creates a "facet map", i.e., on each MPI rank, it does the following:
Note: each MPI rank has a copy of the entire immersed body, i.e., all the facets.
ib | Immersed boundary object of type ImmersedBoundary |
m | MPI object of type MPIVariables |
X | Array of local spatial coordinates |
dim | Local dimensions |
ghosts | Number of ghost points |
Definition at line 143 of file IBCreateFacetMapping.c.