Skip to content

Commit

Permalink
Altered KerrBHLevel and ApparentHorizonFinderTest
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
the-florist committed May 1, 2024
1 parent 744cbda commit c7f5885
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
14 changes: 12 additions & 2 deletions Examples/KerrBH/KerrBHLevel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<FourthOrderDerivatives> 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<SixthOrderDerivatives> 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
Expand Down
15 changes: 13 additions & 2 deletions Tests/ApparentHorizonFinderTest3D/ApparentHorizonTest3DLevel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<FourthOrderDerivatives> 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<SixthOrderDerivatives> 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,
Expand Down

0 comments on commit c7f5885

Please sign in to comment.