Skip to content

Commit

Permalink
Trying a new name
Browse files Browse the repository at this point in the history
  • Loading branch information
pshriwise committed Jan 16, 2024
1 parent f36957f commit 0411a05
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions include/xdg/xdg.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@

namespace xdg {

class XDG {

class AcceleratedDiscretizedGeometry {

public:
// Constructors
XDG() = default;
AcceleratedDiscretizedGeometry() = default;

XDG(std::shared_ptr<MeshManager> mesh_manager) :
AcceleratedDiscretizedGeometry(std::shared_ptr<MeshManager> 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;

Expand Down
6 changes: 3 additions & 3 deletions src/xdg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand All @@ -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)) {
Expand All @@ -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)) {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_measure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ TEST_CASE("Test Mesh Mock")
std::shared_ptr<MeshManager> mm = std::make_shared<MeshMock>();
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));
Expand Down
2 changes: 1 addition & 1 deletion tests/test_xdg_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ using namespace xdg;

TEST_CASE("XDG Interface")
{
std::shared_ptr<XDG> xdg = std::make_shared<XDG>();
std::shared_ptr<AcceleratedDiscretizedGeometry> xdg = std::make_shared<AcceleratedDiscretizedGeometry>();
REQUIRE(xdg->ray_tracing_interface() != nullptr);
REQUIRE(xdg->mesh_manager() == nullptr);
}

0 comments on commit 0411a05

Please sign in to comment.