GRTLCollaboration/GRChombo

4th order derivative stencils hard-coded in GammaCalculator class

the-florist opened this issue · 1 comments

The GammaCalculator class (Source/CCZ4/GammaCalculator.hpp) uses a m_deriv object to calculate spatial derivatives of the spatial tensor, but declares this m_deriv object as a protected ForthOrderDerivatives object belonging to the class, and does not change the type of the object depending on the max_spatial_derivative_order flag in params, nor does it throw an error if the user requests 6th order derivatives.

I'm happy to write a bit of code to either create this dependence on the max_spatial_derivative_order flag, or throw an error if a larger derivative order is requested.

-- Ericka

I guess it would be best to just template the class over a deriv_t type with default FourthOrderDerivatives. Feel free to open a PR to do this.