Tensorium
Loading...
Searching...
No Matches
tensorium_RG::fd Namespace Reference

Enumerations

enum  Axis { X = 0 , Y = 1 , Z = 2 }

Functions

template<typename Field>
double get (const Field &f, size_t i, size_t j, size_t k)
 Utility accessor that forwards to Field3D::idx / raw pointer storage.
template<typename Field>
double Dx (const Field &f, size_t i, size_t j, size_t k, double dx)
 4th-order centered derivative along x.
template<typename Field>
double Dy (const Field &f, size_t i, size_t j, size_t k, double dy)
 4th-order centered derivative along y.
template<typename Field>
double Dz (const Field &f, size_t i, size_t j, size_t k, double dz)
 4th-order centered derivative along z.
template<typename Field>
double Dxx (const Field &f, size_t i, size_t j, size_t k, double dx)
 4th-order approximation to \(\partial_{xx} f\).
template<typename Field>
double Dyy (const Field &f, size_t i, size_t j, size_t k, double dy)
template<typename Field>
double Dzz (const Field &f, size_t i, size_t j, size_t k, double dz)
template<typename Field>
double Dxy (const Field &f, size_t i, size_t j, size_t k, double dx, double dy)
 Mixed second derivative using the compact second-order stencil.
template<typename Field>
double Dxz (const Field &f, size_t i, size_t j, size_t k, double dx, double dz)
template<typename Field>
double Dyz (const Field &f, size_t i, size_t j, size_t k, double dy, double dz)
template<typename Field>
double Dxy4 (const Field &f, size_t i, size_t j, size_t k, double dx, double dy)
 Tensor-product 4th-order approximation to \(\partial_{xy} f\).
template<typename Field>
double Dxz4 (const Field &f, size_t i, size_t j, size_t k, double dx, double dz)
template<typename Field>
double Dyz4 (const Field &f, size_t i, size_t j, size_t k, double dy, double dz)
template<typename Field>
double D (const Field &f, size_t i, size_t j, size_t k, Axis a, double dx, double dy, double dz)
 Axis selector that forwards to Dx/Dy/Dz for compile-time loops.
template<typename Field>
double KO6_axis (const Field &f, size_t i, size_t j, size_t k, Axis axis)
 One-dimensional slice of the 6th-order Kreiss–Oliger filter.
template<typename Field>
double KO6 (const Field &f, size_t i, size_t j, size_t k, double sigma)
 Dimension-summed Kreiss–Oliger dissipation scaled by \(\sigma\).
template<typename Field>
double Dx_upwind (const Field &f, size_t i, size_t j, size_t k, double dx, double beta)
 Third-order upwind derivative along x used for shift advection terms.
template<typename Field>
double Dy_upwind (const Field &f, size_t i, size_t j, size_t k, double dy, double beta)
template<typename Field>
double Dz_upwind (const Field &f, size_t i, size_t j, size_t k, double dz, double beta)

Enumeration Type Documentation

◆ Axis

Enumerator

Function Documentation

◆ D()

template<typename Field>
double tensorium_RG::fd::D ( const Field & f,
size_t i,
size_t j,
size_t k,
Axis a,
double dx,
double dy,
double dz )
inline

Axis selector that forwards to Dx/Dy/Dz for compile-time loops.

References Dx(), Dy(), Dz(), X, and Y.

Here is the call graph for this function:

◆ Dx()

template<typename Field>
double tensorium_RG::fd::Dx ( const Field & f,
size_t i,
size_t j,
size_t k,
double dx )
inline

4th-order centered derivative along x.

Implements the stencil shown in the file-level documentation.

Parameters
fField to differentiate.
dxGrid spacing \(\Delta x\).

References get().

Referenced by tensorium_RG::bssn::compute_bssn_constraints(), tensorium_RG::bssn::compute_rhs_A_tilde(), tensorium_RG::bssn::compute_rhs_chi(), tensorium_RG::bssn::compute_rhs_Gamma(), tensorium_RG::bssn::compute_rhs_gamma_tilde(), tensorium_RG::bssn::compute_rhs_K(), tensorium_RG::bssn::compute_ricci_bssn(), D(), and tensorium_RG::bssn::detail::diff_gamma_tilde_inv_component().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Dx_upwind()

template<typename Field>
double tensorium_RG::fd::Dx_upwind ( const Field & f,
size_t i,
size_t j,
size_t k,
double dx,
double beta )
inline

Third-order upwind derivative along x used for shift advection terms.

Parameters
betaSign of the advecting velocity (typically \(\beta^x\)) determines the biased stencil.

References get().

Referenced by tensorium_RG::bssn::compute_rhs_A_tilde(), tensorium_RG::bssn::compute_rhs_alpha(), tensorium_RG::bssn::compute_rhs_chi(), tensorium_RG::bssn::compute_rhs_Gamma(), tensorium_RG::bssn::compute_rhs_gamma_tilde(), and tensorium_RG::bssn::compute_rhs_K().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Dxx()

template<typename Field>
double tensorium_RG::fd::Dxx ( const Field & f,
size_t i,
size_t j,
size_t k,
double dx )
inline

4th-order approximation to \(\partial_{xx} f\).

Note
Uses the classic \((-1,16,-30,16,-1)/12\) stencil scaled by \(1/\Delta x^2\).

References get().

Referenced by tensorium_RG::bssn::compute_rhs_A_tilde(), tensorium_RG::bssn::compute_rhs_Gamma(), tensorium_RG::bssn::compute_rhs_K(), and tensorium_RG::bssn::compute_ricci_bssn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Dxy()

template<typename Field>
double tensorium_RG::fd::Dxy ( const Field & f,
size_t i,
size_t j,
size_t k,
double dx,
double dy )
inline

Mixed second derivative using the compact second-order stencil.

Useful near where 4th-order cross derivatives would require larger halos.

References get().

Here is the call graph for this function:

◆ Dxy4()

template<typename Field>
double tensorium_RG::fd::Dxy4 ( const Field & f,
size_t i,
size_t j,
size_t k,
double dx,
double dy )
inline

Tensor-product 4th-order approximation to \(\partial_{xy} f\).

Expands the 1D \((-1,8,-8,1)/12\) derivative in both axes and rescales by \(144\,\Delta x\,\Delta y\) so Ricci builders can reuse it for the \(\tilde{R}_{ij}\) terms.

References get().

Referenced by tensorium_RG::bssn::compute_rhs_A_tilde(), tensorium_RG::bssn::compute_rhs_Gamma(), tensorium_RG::bssn::compute_rhs_K(), and tensorium_RG::bssn::compute_ricci_bssn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Dxz()

template<typename Field>
double tensorium_RG::fd::Dxz ( const Field & f,
size_t i,
size_t j,
size_t k,
double dx,
double dz )
inline

References get().

Here is the call graph for this function:

◆ Dxz4()

template<typename Field>
double tensorium_RG::fd::Dxz4 ( const Field & f,
size_t i,
size_t j,
size_t k,
double dx,
double dz )
inline

References get().

Referenced by tensorium_RG::bssn::compute_rhs_A_tilde(), tensorium_RG::bssn::compute_rhs_Gamma(), tensorium_RG::bssn::compute_rhs_K(), and tensorium_RG::bssn::compute_ricci_bssn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Dy()

template<typename Field>
double tensorium_RG::fd::Dy ( const Field & f,
size_t i,
size_t j,
size_t k,
double dy )
inline

4th-order centered derivative along y.

References get().

Referenced by tensorium_RG::bssn::compute_bssn_constraints(), tensorium_RG::bssn::compute_rhs_A_tilde(), tensorium_RG::bssn::compute_rhs_chi(), tensorium_RG::bssn::compute_rhs_Gamma(), tensorium_RG::bssn::compute_rhs_gamma_tilde(), tensorium_RG::bssn::compute_rhs_K(), tensorium_RG::bssn::compute_ricci_bssn(), D(), and tensorium_RG::bssn::detail::diff_gamma_tilde_inv_component().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Dy_upwind()

template<typename Field>
double tensorium_RG::fd::Dy_upwind ( const Field & f,
size_t i,
size_t j,
size_t k,
double dy,
double beta )
inline

References get().

Referenced by tensorium_RG::bssn::compute_rhs_A_tilde(), tensorium_RG::bssn::compute_rhs_alpha(), tensorium_RG::bssn::compute_rhs_chi(), tensorium_RG::bssn::compute_rhs_Gamma(), tensorium_RG::bssn::compute_rhs_gamma_tilde(), and tensorium_RG::bssn::compute_rhs_K().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Dyy()

template<typename Field>
double tensorium_RG::fd::Dyy ( const Field & f,
size_t i,
size_t j,
size_t k,
double dy )
inline

References get().

Referenced by tensorium_RG::bssn::compute_rhs_A_tilde(), tensorium_RG::bssn::compute_rhs_Gamma(), tensorium_RG::bssn::compute_rhs_K(), and tensorium_RG::bssn::compute_ricci_bssn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Dyz()

template<typename Field>
double tensorium_RG::fd::Dyz ( const Field & f,
size_t i,
size_t j,
size_t k,
double dy,
double dz )
inline

References get().

Here is the call graph for this function:

◆ Dyz4()

template<typename Field>
double tensorium_RG::fd::Dyz4 ( const Field & f,
size_t i,
size_t j,
size_t k,
double dy,
double dz )
inline

References get().

Referenced by tensorium_RG::bssn::compute_rhs_A_tilde(), tensorium_RG::bssn::compute_rhs_Gamma(), tensorium_RG::bssn::compute_rhs_K(), and tensorium_RG::bssn::compute_ricci_bssn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Dz()

template<typename Field>
double tensorium_RG::fd::Dz ( const Field & f,
size_t i,
size_t j,
size_t k,
double dz )
inline

4th-order centered derivative along z.

References get().

Referenced by tensorium_RG::bssn::compute_bssn_constraints(), tensorium_RG::bssn::compute_rhs_A_tilde(), tensorium_RG::bssn::compute_rhs_chi(), tensorium_RG::bssn::compute_rhs_Gamma(), tensorium_RG::bssn::compute_rhs_gamma_tilde(), tensorium_RG::bssn::compute_rhs_K(), tensorium_RG::bssn::compute_ricci_bssn(), D(), and tensorium_RG::bssn::detail::diff_gamma_tilde_inv_component().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Dz_upwind()

template<typename Field>
double tensorium_RG::fd::Dz_upwind ( const Field & f,
size_t i,
size_t j,
size_t k,
double dz,
double beta )
inline

References get().

Referenced by tensorium_RG::bssn::compute_rhs_A_tilde(), tensorium_RG::bssn::compute_rhs_alpha(), tensorium_RG::bssn::compute_rhs_chi(), tensorium_RG::bssn::compute_rhs_Gamma(), tensorium_RG::bssn::compute_rhs_gamma_tilde(), and tensorium_RG::bssn::compute_rhs_K().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Dzz()

template<typename Field>
double tensorium_RG::fd::Dzz ( const Field & f,
size_t i,
size_t j,
size_t k,
double dz )
inline

References get().

Referenced by tensorium_RG::bssn::compute_rhs_A_tilde(), tensorium_RG::bssn::compute_rhs_Gamma(), tensorium_RG::bssn::compute_rhs_K(), and tensorium_RG::bssn::compute_ricci_bssn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get()

template<typename Field>
double tensorium_RG::fd::get ( const Field & f,
size_t i,
size_t j,
size_t k )
inline

Utility accessor that forwards to Field3D::idx / raw pointer storage.

Referenced by Dx(), Dx_upwind(), Dxx(), Dxy(), Dxy4(), Dxz(), Dxz4(), Dy(), Dy_upwind(), Dyy(), Dyz(), Dyz4(), Dz(), Dz_upwind(), Dzz(), and KO6_axis().

Here is the caller graph for this function:

◆ KO6()

template<typename Field>
double tensorium_RG::fd::KO6 ( const Field & f,
size_t i,
size_t j,
size_t k,
double sigma )
inline

Dimension-summed Kreiss–Oliger dissipation scaled by \(\sigma\).

Note
RHS kernels typically set \(\sigma=0.1\) following the module conventions.

References KO6_axis(), X, Y, and Z.

Referenced by tensorium_RG::bssn::compute_rhs_A_tilde(), tensorium_RG::bssn::compute_rhs_alpha(), tensorium_RG::bssn::compute_rhs_chi(), tensorium_RG::bssn::compute_rhs_Gamma(), tensorium_RG::bssn::compute_rhs_gamma_tilde(), and tensorium_RG::bssn::compute_rhs_K().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ KO6_axis()

template<typename Field>
double tensorium_RG::fd::KO6_axis ( const Field & f,
size_t i,
size_t j,
size_t k,
Axis axis )
inline

One-dimensional slice of the 6th-order Kreiss–Oliger filter.

Implements \(\mathcal{D}_6[f]_j = (f_{j-3} - 6f_{j-2} + 15 f_{j-1} - 20 f_j + 15 f_{j+1} - 6 f_{j+2} + f_{j+3})/64\).

References get(), X, and Y.

Referenced by KO6().

Here is the call graph for this function:
Here is the caller graph for this function: