OGS
|
Functions | |
std::array< std::size_t, 3 > | getNumberOfVoxelPerDimension (std::array< double, 3 > const &ranges, std::array< double, 3 > const &cellsize) |
std::vector< int > | assignCellIds (vtkSmartPointer< vtkUnstructuredGrid > const &mesh, MathLib::Point3d const &min, std::array< std::size_t, 3 > const &dims, std::array< double, 3 > const &cellsize) |
bool | removeUnusedGridCells (vtkSmartPointer< vtkUnstructuredGrid > const &mesh, std::unique_ptr< MeshLib::Mesh > &grid) |
template<typename T , typename VTK_TYPE > | |
void | mapArray (MeshLib::Mesh &grid, VTK_TYPE vtk_arr, std::string const &name) |
template<typename T > | |
bool | checkDyncast (MeshLib::Mesh &mesh, vtkSmartPointer< vtkCellData > const cell_data, char const *const name) |
void | mapMeshArraysOntoGrid (vtkSmartPointer< vtkUnstructuredGrid > const &mesh, std::unique_ptr< MeshLib::Mesh > const &grid) |
Variables | |
static std::string const | cell_id_name = "CellIds" |
std::vector< int > MeshToolsLib::MeshGenerator::VoxelGridFromMesh::assignCellIds | ( | vtkSmartPointer< vtkUnstructuredGrid > const & | mesh, |
MathLib::Point3d const & | min, | ||
std::array< std::size_t, 3 > const & | dims, | ||
std::array< double, 3 > const & | cellsize ) |
Definition at line 57 of file VoxelGridFromMesh.cpp.
bool MeshToolsLib::MeshGenerator::VoxelGridFromMesh::checkDyncast | ( | MeshLib::Mesh & | mesh, |
vtkSmartPointer< vtkCellData > const | cell_data, | ||
char const *const | name ) |
Definition at line 133 of file VoxelGridFromMesh.cpp.
References mapArray().
Referenced by mapMeshArraysOntoGrid().
std::array< std::size_t, 3 > MeshToolsLib::MeshGenerator::VoxelGridFromMesh::getNumberOfVoxelPerDimension | ( | std::array< double, 3 > const & | ranges, |
std::array< double, 3 > const & | cellsize ) |
getNumberOfVoxelPerDimension is used to calculate how many voxel fit into a bounding box. For this calculation the difference of min and max point of the bounding box is divided by the cell size, for every dimension. The calculation is restricted to work only with positive values for the cell size. If the difference between min and max is zero, we assign one voxel for the respective dimension.
Definition at line 32 of file VoxelGridFromMesh.cpp.
References OGS_FATAL.
void MeshToolsLib::MeshGenerator::VoxelGridFromMesh::mapArray | ( | MeshLib::Mesh & | grid, |
VTK_TYPE | vtk_arr, | ||
std::string const & | name ) |
Definition at line 113 of file VoxelGridFromMesh.cpp.
References MeshLib::Cell, cell_id_name, MeshLib::Properties::createNewPropertyVector(), MeshLib::Mesh::getProperties(), and MeshLib::Properties::getPropertyVector().
Referenced by checkDyncast().
void MeshToolsLib::MeshGenerator::VoxelGridFromMesh::mapMeshArraysOntoGrid | ( | vtkSmartPointer< vtkUnstructuredGrid > const & | mesh, |
std::unique_ptr< MeshLib::Mesh > const & | grid ) |
Definition at line 148 of file VoxelGridFromMesh.cpp.
References checkDyncast(), and WARN().
bool MeshToolsLib::MeshGenerator::VoxelGridFromMesh::removeUnusedGridCells | ( | vtkSmartPointer< vtkUnstructuredGrid > const & | mesh, |
std::unique_ptr< MeshLib::Mesh > & | grid ) |
Definition at line 90 of file VoxelGridFromMesh.cpp.
References cell_id_name, ERR(), MeshLib::ElementSearch::getSearchedElementIDs(), MeshToolsLib::removeElements(), and MeshLib::ElementSearch::searchByPropertyValueRange().
|
static |
Definition at line 30 of file VoxelGridFromMesh.h.
Referenced by mapArray(), and removeUnusedGridCells().