diff --git a/tests/poly/meson.build b/tests/poly/meson.build index 995982d..00d5d28 100644 --- a/tests/poly/meson.build +++ b/tests/poly/meson.build @@ -11,7 +11,7 @@ foreach test_file : test_sources test_exe = executable( exe_name, test_file, - dependencies: [gtest_dep, polysolver_dep], + dependencies: [gtest_dep, polysolver_dep, probe_dep, quill_dep], install_rpath: '@loader_path/../../src' # Ensure runtime library path resolves correctly ) diff --git a/tests/poly/polyTest.cpp b/tests/poly/polyTest.cpp index e148eba..2c4d4e5 100644 --- a/tests/poly/polyTest.cpp +++ b/tests/poly/polyTest.cpp @@ -1,6 +1,10 @@ #include +#include "quill/LogMacros.h" +#include "mfem.hpp" + #include "polySolver.h" +#include "probe.h" class polyTest : public ::testing::Test {}; @@ -11,4 +15,18 @@ TEST_F(polyTest, DefaultConstructor) { TEST_F(polyTest, Solve) { PolySolver polytrope(1.5, 1); EXPECT_NO_THROW(polytrope.solve()); + Probe::LogManager& logManager = Probe::LogManager::getInstance(); + quill::Logger* logger = logManager.newFileLogger("polyTest.log", "polyTest"); + LOG_INFO(logger, "Solving polytrope with n = 1.5, gamma = 1"); + mfem::Mesh& mesh = polytrope.getMesh(); + mfem::GridFunction& solution = polytrope.getSolution(); + + // Get the mesh radius + double radius = Probe::getMeshRadius(mesh); + LOG_INFO(logger, "Mesh radius: {}", radius); + + // Get the ray solution + const std::vector rayDirection = {0, 0}; + int numSamples = 10; + std::vector samples = Probe::getRaySolution(solution, mesh, rayDirection, numSamples); } \ No newline at end of file