Skip to content
Snippets Groups Projects
Commit 6905584f authored by Julian Heinze's avatar Julian Heinze
Browse files

Moved docu to header + adjusted for doxygen

parent 16db77d7
No related branches found
No related tags found
No related merge requests found
......@@ -28,12 +28,6 @@
namespace MeshToolsLib::MeshGenerator::VoxelGridFromMesh
{
// getNumberOfVoxelPerDimension is used to calculate how many voxel fit to
// a bounding box. For this calculation the differnce of min and max point of
// the bounding box is devided by the cellsize, for every dimension. The
// calculation is restricted to work only with positive values for the cellsize.
// If the there is no differencec in min and max, we assign one voxel for the
// respective dimension.
std::array<std::size_t, 3> getNumberOfVoxelPerDimension(
std::array<double, 3> const& ranges, std::array<double, 3> const& cellsize)
{
......@@ -42,8 +36,9 @@ std::array<std::size_t, 3> getNumberOfVoxelPerDimension(
OGS_FATAL("A cellsize ({},{},{}) is not allowed to be <= 0",
cellsize[0], cellsize[1], cellsize[2]);
}
std::array<double, 3> numberOfVoxel = {
ranges[0] / cellsize[0], ranges[1] / cellsize[1], ranges[2] / cellsize[2]};
std::array<double, 3> numberOfVoxel = {ranges[0] / cellsize[0],
ranges[1] / cellsize[1],
ranges[2] / cellsize[2]};
if (ranges[0] < 0 || ranges[1] < 0 || ranges[2] < 0)
{
......
......@@ -29,6 +29,12 @@ namespace MeshToolsLib::MeshGenerator::VoxelGridFromMesh
{
static std::string const cell_id_name = "CellIds";
/// 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.
std::array<std::size_t, 3> getNumberOfVoxelPerDimension(
std::array<double, 3> const& ranges, std::array<double, 3> const& cellsize);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment