SPHinXsys
alpha version
|
Base class for all structured meshes which may be grid or cell based. The basic properties of the mesh, such as lower bound, grid spacing and number of grid points may be determined by the derived class. Note that there is no mesh-based data defined here. More...
#include <base_mesh.h>
Inherited by SPH::GridDataPackage< 4, 6 >, SPH::GridDataPackage< PKG_SIZE, ADDRS_SIZE >, and SPH::Mesh.
Public Member Functions | |
BaseMesh (Vecu number_of_grid_points) | |
BaseMesh (Vecd mesh_lower_bound, Real grid_spacing, Vecu number_of_grid_points) | |
BaseMesh (BoundingBox tentative_bounds, Real grid_spacing, size_t buffer_width) | |
Vecd | MeshLowerBound () |
Real | GridSpacing () |
Vecu | NumberOfGridPoints () |
Vecu | NumberOfGridPointsFromNumberOfCells (const Vecu &number_of_cells) |
Vecu | NumberOfCellsFromNumberOfGridPoints (const Vecu &number_of_grid_points) |
Vecd | GridPositionFromCellPosition (const Vecd &cell_position) |
Vecu | CellIndexFromPosition (const Vecd &position) |
Vecd | CellPositionFromIndex (const Vecu &cell_index) |
Vecd | GridPositionFromIndex (const Vecu &grid_index) |
Vecu | transfer1DtoMeshIndex (const Vecu &number_of_mesh_indexes, size_t i) |
size_t | transferMeshIndexTo1D (const Vecu &number_of_mesh_indexes, const Vecu &mesh_index) |
size_t | MortonCode (const size_t &i) |
size_t | transferMeshIndexToMortonOrder (const Vecu &mesh_index) |
Protected Attributes | |
Vecd | mesh_lower_bound_ |
Real | grid_spacing_ |
Vecu | number_of_grid_points_ |
Base class for all structured meshes which may be grid or cell based. The basic properties of the mesh, such as lower bound, grid spacing and number of grid points may be determined by the derived class. Note that there is no mesh-based data defined here.
Vecd SPH::BaseMesh::GridPositionFromIndex | ( | const Vecu & | grid_index | ) |
Note that, the lower corner grid of a cell has the same index as the cell.
converts mesh index into a Morton order. Interleave a 10 bit number in 32 bits, fill one bit and leave the other 2 as zeros https://stackoverflow.com/questions/18529057/ produce-interleaving-bit-patterns-morton-keys-for-32-bit-64-bit-and-128bit
This function converts mesh index into a Morton order.
|
protected |
grid_spacing
|
protected |
mesh lower bound as reference coordinate
|
protected |
number of grid points by dimension