From 0411a0563e17edea2b9c6c32bf6a76c1ae1ac9ae Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Tue, 16 Jan 2024 15:52:56 -0600 Subject: [PATCH] Trying a new name --- include/xdg/xdg.h | 10 +++++----- src/xdg.cpp | 6 +++--- tests/test_measure.cpp | 2 +- tests/test_xdg_interface.cpp | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/xdg/xdg.h b/include/xdg/xdg.h index b2b8739..5b3fbdc 100644 --- a/include/xdg/xdg.h +++ b/include/xdg/xdg.h @@ -8,23 +8,23 @@ namespace xdg { -class XDG { + +class AcceleratedDiscretizedGeometry { public: // Constructors - XDG() = default; + AcceleratedDiscretizedGeometry() = default; - XDG(std::shared_ptr mesh_manager) : + AcceleratedDiscretizedGeometry(std::shared_ptr mesh_manager) : mesh_manager_(mesh_manager) {} - // Methods void prepare_raytracer() { ray_tracing_interface_->register_all_volumes(mesh_manager_); } + // Geometric Measurements double measure_volume(MeshID volume) const; - double measure_surface_area(MeshID surface) const; double measure_volume_area(MeshID surface) const; diff --git a/src/xdg.cpp b/src/xdg.cpp index 730f269..4b3e1e2 100644 --- a/src/xdg.cpp +++ b/src/xdg.cpp @@ -6,7 +6,7 @@ #include "xdg/geometry/measure.h" namespace xdg { -double XDG::measure_volume(MeshID volume) const +double AcceleratedDiscretizedGeometry::measure_volume(MeshID volume) const { double volume_total {0.0}; @@ -31,7 +31,7 @@ double XDG::measure_volume(MeshID volume) const return volume_total / 6.0; } -double XDG::measure_surface_area(MeshID surface) const +double AcceleratedDiscretizedGeometry::measure_surface_area(MeshID surface) const { double area {0.0}; for (auto triangle : mesh_manager()->get_surface_elements(surface)) { @@ -40,7 +40,7 @@ double XDG::measure_surface_area(MeshID surface) const return area; } -double XDG::measure_volume_area(MeshID volume) const +double AcceleratedDiscretizedGeometry::measure_volume_area(MeshID volume) const { double area {0.0}; for (auto surface : mesh_manager()->get_volume_surfaces(volume)) { diff --git a/tests/test_measure.cpp b/tests/test_measure.cpp index e8da1fd..2c81cd4 100644 --- a/tests/test_measure.cpp +++ b/tests/test_measure.cpp @@ -18,7 +18,7 @@ TEST_CASE("Test Mesh Mock") std::shared_ptr mm = std::make_shared(); mm->init(); // this should do nothing, but its good practice to call it - XDG xdg{mm}; + AcceleratedDiscretizedGeometry xdg{mm}; double volume = xdg.measure_volume(mm->volumes()[0]); REQUIRE_THAT(volume, Catch::Matchers::WithinAbs(693., 1e-6)); diff --git a/tests/test_xdg_interface.cpp b/tests/test_xdg_interface.cpp index a68af22..9b831cd 100644 --- a/tests/test_xdg_interface.cpp +++ b/tests/test_xdg_interface.cpp @@ -10,7 +10,7 @@ using namespace xdg; TEST_CASE("XDG Interface") { - std::shared_ptr xdg = std::make_shared(); + std::shared_ptr xdg = std::make_shared(); REQUIRE(xdg->ray_tracing_interface() != nullptr); REQUIRE(xdg->mesh_manager() == nullptr); } \ No newline at end of file