#include "header.h"
#include "SparseMatrix.h"
#include "ElementValueFinfo.h"
#include "Boundary.h"
#include "MeshEntry.h"
#include "VoxelJunction.h"
#include "ChemCompt.h"
#include "MeshCompt.h"
#include "CubeMesh.h"
Typedefs | |
typedef pair< unsigned int, unsigned int > | PII |
Functions | |
void | swapIfBackward (double &x0, double &x1) |
void | setAbut (PII &voxel, unsigned int meshIndex, unsigned int axis) |
void | setIntersectVoxel (vector< PII > &intersect, unsigned int ix, unsigned int iy, unsigned int iz, unsigned int nx, unsigned int ny, unsigned int nz, unsigned int meshIndex) |
void | checkAbut (const vector< PII > &intersect, unsigned int ix, unsigned int iy, unsigned int iz, unsigned int nx, unsigned int ny, unsigned int nz, unsigned int meshIndex, vector< VoxelJunction > &ret) |
typedef pair< unsigned int, unsigned int > PII |
void checkAbut | ( | const vector< PII > & | intersect, | |
unsigned int | ix, | |||
unsigned int | iy, | |||
unsigned int | iz, | |||
unsigned int | nx, | |||
unsigned int | ny, | |||
unsigned int | nz, | |||
unsigned int | meshIndex, | |||
vector< VoxelJunction > & | ret | |||
) |
checkAbut checks the intersect vector for the current position ix, iy, iz, to determine how many diffusion terms to extract. It then puts each of the extracted terms into the ret vector. There is a minor efficiency for one and two diffusion terms as they are encoded within the intersect vector. Higher-order surface alignments require an in-line scan of neighboring voxels. In all casesl the function inserts a flag indicating surface direction into the diffScale field of the VoxelJunction. 0 = x; 1 = y; 2 = z.
References CubeMesh::ABUTX, CubeMesh::ABUTY, CubeMesh::ABUTZ, CubeMesh::EMPTY, CubeMesh::MULTI, and CubeMesh::SURFACE.
Referenced by testIntersectVoxel().
void setAbut | ( | PII & | voxel, | |
unsigned int | meshIndex, | |||
unsigned int | axis | |||
) |
The intersect pairs are always meshIndex in first, and a flag in the second. The flag can be: EMPTY: empty SURFACE: on the surface ABUT[X,Y,Z]: One place removed from the surface, only one entry MULTI: Multiple surface voxels are only one place removed from here. a number: Special case where 2 surface voxels abut. The number is the meshIndex of the second surface voxel. setAbut assigns the voxel flags based on what was already there
References CubeMesh::EMPTY, CubeMesh::MULTI, and CubeMesh::SURFACE.
Referenced by setIntersectVoxel().
void setIntersectVoxel | ( | vector< PII > & | intersect, | |
unsigned int | ix, | |||
unsigned int | iy, | |||
unsigned int | iz, | |||
unsigned int | nx, | |||
unsigned int | ny, | |||
unsigned int | nz, | |||
unsigned int | meshIndex | |||
) |
References CubeMesh::ABUTX, CubeMesh::ABUTY, CubeMesh::ABUTZ, setAbut(), and CubeMesh::SURFACE.
Referenced by testIntersectVoxel().
void swapIfBackward | ( | double & | x0, | |
double & | x1 | |||
) |
Referenced by CubeMesh::defineIntersection(), and CubeMesh::updateCoords().