![]() |
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 56 of file VoxelGridFromMesh.cpp.
Referenced by Vtu2GridDialog::accept(), and main().
bool MeshToolsLib::MeshGenerator::VoxelGridFromMesh::checkDyncast | ( | MeshLib::Mesh & | mesh, |
vtkSmartPointer< vtkCellData > const | cell_data, | ||
char const *const | name ) |
Definition at line 134 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 31 of file VoxelGridFromMesh.cpp.
References OGS_FATAL.
Referenced by Vtu2GridDialog::accept(), and main().
void MeshToolsLib::MeshGenerator::VoxelGridFromMesh::mapArray | ( | MeshLib::Mesh & | grid, |
VTK_TYPE | vtk_arr, | ||
std::string const & | name ) |
Definition at line 112 of file VoxelGridFromMesh.cpp.
References MeshLib::Cell, cell_id_name, MeshLib::Properties::createNewPropertyVector(), MeshLib::Mesh::getProperties(), MeshLib::Properties::getPropertyVector(), and MeshLib::PropertyVector< PROP_VAL_TYPE >::size().
Referenced by checkDyncast().
void MeshToolsLib::MeshGenerator::VoxelGridFromMesh::mapMeshArraysOntoGrid | ( | vtkSmartPointer< vtkUnstructuredGrid > const & | mesh, |
std::unique_ptr< MeshLib::Mesh > const & | grid ) |
Definition at line 149 of file VoxelGridFromMesh.cpp.
References checkDyncast(), and WARN().
Referenced by Vtu2GridDialog::accept(), and main().
bool MeshToolsLib::MeshGenerator::VoxelGridFromMesh::removeUnusedGridCells | ( | vtkSmartPointer< vtkUnstructuredGrid > const & | mesh, |
std::unique_ptr< MeshLib::Mesh > & | grid ) |
Definition at line 89 of file VoxelGridFromMesh.cpp.
References cell_id_name, ERR(), MeshLib::ElementSearch::getSearchedElementIDs(), MeshToolsLib::removeElements(), and MeshLib::ElementSearch::searchByPropertyValueRange().
Referenced by Vtu2GridDialog::accept(), and main().
|
static |
Definition at line 30 of file VoxelGridFromMesh.h.
Referenced by Vtu2GridDialog::accept(), main(), mapArray(), and removeUnusedGridCells().