Peano
math::differentiation::numeric_3D::central_difference Namespace Reference

Functions

auto partialX (auto f, const auto x, const auto y, const auto t)
 Approximates the partial derivative ∂f/∂x of a function f(x, y, t) using central differences. More...
 
auto partialY (auto f, const auto x, const auto y, const auto t)
 Approximates the partial derivative ∂f/∂y of a function f(x, y, t) using central differences. More...
 
auto partialT (auto f, const auto x, const auto y, const auto t)
 Approximates the partial derivative ∂f/∂t of a function f(x, y, t) using central differences. More...
 

Function Documentation

◆ partialT()

auto math::differentiation::numeric_3D::central_difference::partialT ( auto  f,
const auto  x,
const auto  y,
const auto  t 
)

Approximates the partial derivative ∂f/∂t of a function f(x, y, t) using central differences.

This lambda computes the numerical derivative of a scalar function with respect to the t-direction via a second-order central difference scheme. The step size is adaptively chosen based on machine precision to balance truncation and rounding errors.

Parameters
fThe function to differentiate; must accept (x, y, t) as input
xThe x-coordinate (passed to f but not differentiated)
yThe y-coordinate (passed to f but not differentiated)
tThe time value at which the derivative is evaluated
Returns
Approximation of ∂f/∂t at (x, y, t)

Definition at line 55 of file CentralDifferencePartial2D.h.

References fuseADERSolvers::f, swe::h, acoustic::t, ModeCalc::x, and csv_to_plot::y.

◆ partialX()

auto math::differentiation::numeric_3D::central_difference::partialX ( auto  f,
const auto  x,
const auto  y,
const auto  t 
)

Approximates the partial derivative ∂f/∂x of a function f(x, y, t) using central differences.

This lambda computes the numerical derivative of a scalar function with respect to the x-direction via a second-order central difference scheme. The step size is adaptively chosen based on machine precision to balance truncation and rounding errors.

Parameters
fThe function to differentiate; must accept (x, y, t) as input
xThe x-coordinate at which the derivative is evaluated
yThe y-coordinate (passed to f but not differentiated)
tThe time value (passed to f but not differentiated)
Returns
Approximation of ∂f/∂x at (x, y, t)

Definition at line 19 of file CentralDifferencePartial2D.h.

References fuseADERSolvers::f, swe::h, acoustic::t, ModeCalc::x, and csv_to_plot::y.

◆ partialY()

auto math::differentiation::numeric_3D::central_difference::partialY ( auto  f,
const auto  x,
const auto  y,
const auto  t 
)

Approximates the partial derivative ∂f/∂y of a function f(x, y, t) using central differences.

This lambda computes the numerical derivative of a scalar function with respect to the y-direction via a second-order central difference scheme. The step size is adaptively chosen based on machine precision to balance truncation and rounding errors.

Parameters
fThe function to differentiate; must accept (x, y, t) as input
xThe x-coordinate (passed to f but not differentiated)
yThe y-coordinate at which the derivative is evaluated
tThe time value (passed to f but not differentiated)
Returns
Approximation of ∂f/∂y at (x, y, t)

Definition at line 37 of file CentralDifferencePartial2D.h.

References fuseADERSolvers::f, swe::h, acoustic::t, ModeCalc::x, and csv_to_plot::y.