Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
derivatives.hpp File Reference
#include "shambase/numeric_limits.hpp"
#include "shambackends/sycl.hpp"
#include <functional>
Include dependency graph for derivatives.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  shammath
 namespace for math utility

Functions

template<class T>
shammath::derivative_upwind (T x, T dx, std::function< T(T)> &&fct)
 Compute the derivative of a function at x using the upwind method.
template<class T>
shammath::derivative_centered (T x, T dx, std::function< T(T)> &&fct)
 Compute the derivative of a function at x using the centered difference method.
template<class T>
shammath::derivative_3point_forward (T x, T dx, std::function< T(T)> &&fct)
 Compute the derivative of a function at x using a 3-point forward finite difference.
template<class T>
shammath::derivative_3point_backward (T x, T dx, std::function< T(T)> &&fct)
 Compute the derivative of a function at x using a 3-point backward finite difference.
template<class T>
shammath::derivative_5point_midpoint (T x, T dx, std::function< T(T)> &&fct)
 Compute the derivative of a function at x using a 5-point centered finite difference.
template<class T>
shammath::estim_deriv_step (u32 order)
 Estimate the best step size for numerical differentiation of given order.

Detailed Description

Author
Timothée David–Cléris (tim.s.nosp@m.hamr.nosp@m.ock@p.nosp@m.roto.nosp@m.n.me)

Definition in file derivatives.hpp.