From c7f5885a1812979e69eeb9f200c9da4669f712ab Mon Sep 17 00:00:00 2001 From: Ericka Florio Date: Wed, 1 May 2024 13:30:38 +0100 Subject: [PATCH] Altered KerrBHLevel and ApparentHorizonFinderTest Added the choice over max_spatial_derivative_order and new templated format for GammaCalculator to the KerrBH example (InitialData) and ApparentHorizonFinderTest3DLevel.hpp InitialData function (still commented out). --- Examples/KerrBH/KerrBHLevel.cpp | 14 ++++++++++++-- .../ApparentHorizonTest3DLevel.hpp | 15 +++++++++++++-- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/Examples/KerrBH/KerrBHLevel.cpp b/Examples/KerrBH/KerrBHLevel.cpp index 5488e66f6..c0d41168f 100644 --- a/Examples/KerrBH/KerrBHLevel.cpp +++ b/Examples/KerrBH/KerrBHLevel.cpp @@ -47,8 +47,18 @@ void KerrBHLevel::initialData() m_state_new, m_state_new, INCLUDE_GHOST_CELLS); fillAllGhosts(); - BoxLoops::loop(GammaCalculator(m_dx), m_state_new, m_state_new, - EXCLUDE_GHOST_CELLS); + if (m_p.max_spatial_derivative_order == FourthOrderDerivatives) + { + GammaCalculator my_gamma_calculator(m_dx); + BoxLoops::loop(my_gamma_calculator, m_state_new, m_state_new, + EXCLUDE_GHOST_CELLS); + } + else if (m_p.max_spatial_derivative_order == SixthOrderDerivatives) + { + GammaCalculator my_gamma_calculator(m_dx); + BoxLoops::loop(my_gamma_calculator, m_state_new, m_state_new, + EXCLUDE_GHOST_CELLS); + } #ifdef USE_AHFINDER // Diagnostics needed for AHFinder diff --git a/Tests/ApparentHorizonFinderTest3D/ApparentHorizonTest3DLevel.hpp b/Tests/ApparentHorizonFinderTest3D/ApparentHorizonTest3DLevel.hpp index f86247e3b..518de8c17 100755 --- a/Tests/ApparentHorizonFinderTest3D/ApparentHorizonTest3DLevel.hpp +++ b/Tests/ApparentHorizonFinderTest3D/ApparentHorizonTest3DLevel.hpp @@ -82,8 +82,19 @@ class ApparentHorizonTest3DLevel : public GRAMRLevel // Gamma's are not needed // fillAllGhosts(); - // BoxLoops::loop(GammaCalculator(m_dx), m_state_new, m_state_new, - // EXCLUDE_GHOST_CELLS); + // fillAllGhosts(); + /*if (m_p.max_spatial_derivative_order == FourthOrderDerivatives) + { + GammaCalculator my_gamma_calculator(m_dx); + BoxLoops::loop(my_gamma_calculator, m_state_new, m_state_new, + EXCLUDE_GHOST_CELLS); + } + else if (m_p.max_spatial_derivative_order == SixthOrderDerivatives) + { + GammaCalculator my_gamma_calculator(m_dx); + BoxLoops::loop(my_gamma_calculator, m_state_new, m_state_new, + EXCLUDE_GHOST_CELLS); + }*/ } virtual void specificEvalRHS(GRLevelData &a_soln, GRLevelData &a_rhs,