From 6905584fe6178ad8f7a56aa57fb60608368e111c Mon Sep 17 00:00:00 2001
From: Julian Heinze <julian.heinze@ufz.de>
Date: Tue, 6 Jun 2023 13:05:05 +0200
Subject: [PATCH] Moved docu to header + adjusted for doxygen

---
 MeshToolsLib/MeshGenerators/VoxelGridFromMesh.cpp | 11 +++--------
 MeshToolsLib/MeshGenerators/VoxelGridFromMesh.h   |  6 ++++++
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/MeshToolsLib/MeshGenerators/VoxelGridFromMesh.cpp b/MeshToolsLib/MeshGenerators/VoxelGridFromMesh.cpp
index 4efc769151d..37a3e9d331d 100644
--- a/MeshToolsLib/MeshGenerators/VoxelGridFromMesh.cpp
+++ b/MeshToolsLib/MeshGenerators/VoxelGridFromMesh.cpp
@@ -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)
     {
diff --git a/MeshToolsLib/MeshGenerators/VoxelGridFromMesh.h b/MeshToolsLib/MeshGenerators/VoxelGridFromMesh.h
index 21324abe1e1..13f6598d349 100644
--- a/MeshToolsLib/MeshGenerators/VoxelGridFromMesh.h
+++ b/MeshToolsLib/MeshGenerators/VoxelGridFromMesh.h
@@ -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);
 
-- 
GitLab