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

Functions

template<typename T>
void print_ricci_samples (const BSSNGridSoA< T > &G)
 Print Ricci tensor samples at representative radii for diagnostic purposes.
template<typename T>
void invert_gamma_tilde (BSSNGridSoA< T > &G, size_t i, size_t j, size_t k)
 Explicit 3x3 inversion of \(\tilde{\gamma}_{ij}\) at a given grid index.
template<typename T>
void minkowski (BSSNGridSoA< T > &G, T M, T xc=T(0), T yc=T(0), T zc=T(0), T r_floor=T(1e-6))
 Populate the grid with Minkowski (flat) initial data.
template<typename T>
void schwarzschild_isotropic (BSSNGridSoA< T > &G, T M, T xc=T(0), T yc=T(0), T zc=T(0), T r_floor=T(1e-6))
 Construct an isotropic Schwarzschild puncture with conformal factor \(\psi=1+M/(2r)\).
template<typename T>
void binary_schwarzschild_isotropic_2centers (BSSNGridSoA< T > &G, T m1, T x1, T y1, T z1, T m2, T x2, T y2, T z2, T r_floor=T(1e-6))
 Superpose two isotropic Schwarzschild conformal factors for binary puncture data.
template<typename T>
void binary_bowen_york_puncture_init (BSSNGridSoA< T > &G, T m1, T x1, T y1, T z1, const T P1[3], const T S1[3], T m2, T x2, T y2, T z2, const T P2[3], const T S2[3], T r_floor=T(1e-6))
template<typename T>
static void by_add_momentum_TF (T A[3][3], const T n[3], const T P[3], T r)
 Add the trace-free momentum component \(\tilde{A}_{ij}^P\) to \(\tilde{A}_{ij}\).
template<typename T>
static void by_add_spin_TF (T A[3][3], const T n[3], const T S[3], T r)
 Add the spin component \(\tilde{A}_{ij}^S\) derived from \(S^i\).
template<typename T>
void fill_Atilde_bowen_york_binary (BSSNGridSoA< T > &G, T x1, T y1, T z1, const T P1[3], const T S1[3], T x2, T y2, T z2, const T P2[3], const T S2[3], T r_floor=T(1e-6))
 Populate \(\tilde{A}_{ij}\) with the superposition of two Bowen–York punctures.
template<typename T>
static T Atilde_sq_flat_from_soa (const BSSNGridSoA< T > &G, size_t id)
 Compute \(\tilde{A}_{ij}\tilde{A}^{ij}\) assuming \(\tilde{\gamma}_{ij}=\delta_{ij}\).
template<typename T>
void solve_lichnerowicz_u_SOR (BSSNGridSoA< T > &G, T m1, T x1, T y1, T z1, T m2, T x2, T y2, T z2, T r_floor=T(1e-6), int maxIter=4000, T tol=T(1e-10), T omega=T(1.6))
 Solve the Lichnerowicz equation \(\Delta u = -\frac{1}{8}\psi^{-7}\tilde{A}_{ij}\tilde{A}^{ij}\) via red-black SOR.

Function Documentation

◆ Atilde_sq_flat_from_soa()

template<typename T>
T tensorium_RG::init::Atilde_sq_flat_from_soa ( const BSSNGridSoA< T > & G,
size_t id )
inlinestatic

Compute \(\tilde{A}_{ij}\tilde{A}^{ij}\) assuming \(\tilde{\gamma}_{ij}=\delta_{ij}\).

References tensorium_RG::XX, tensorium_RG::XY, tensorium_RG::XZ, tensorium_RG::YY, tensorium_RG::YZ, and tensorium_RG::ZZ.

Referenced by solve_lichnerowicz_u_SOR().

Here is the caller graph for this function:

◆ binary_bowen_york_puncture_init()

template<typename T>
void tensorium_RG::init::binary_bowen_york_puncture_init ( BSSNGridSoA< T > & G,
T m1,
T x1,
T y1,
T z1,
const T P1[3],
const T S1[3],
T m2,
T x2,
T y2,
T z2,
const T P2[3],
const T S2[3],
T r_floor = T(1e-6) )
inline

◆ binary_schwarzschild_isotropic_2centers()

template<typename T>
void tensorium_RG::init::binary_schwarzschild_isotropic_2centers ( BSSNGridSoA< T > & G,
T m1,
T x1,
T y1,
T z1,
T m2,
T x2,
T y2,
T z2,
T r_floor = T(1e-6) )
inline

Superpose two isotropic Schwarzschild conformal factors for binary puncture data.

Uses \(\psi = 1 + m_1/(2 r_1) + m_2/(2 r_2)\) with centers at \((x_a,y_a,z_a)\) and enforces the algebraic constraints afterwards. Generates conformally flat, time-symmetric data ( \(K=0\)).

References tensorium_RG::bssn::apply_halos_grid(), tensorium_RG::bssn::assert_invariants(), tensorium_RG::bssn::compute_bssn_constraints(), tensorium_RG::bssn::compute_ricci_bssn(), tensorium_RG::bssn::compute_tildeGamma_contracted(), invert_gamma_tilde(), tensorium_RG::bssn::print_constraint_norms(), print_ricci_samples(), tensorium_RG::bssn::project_bssn_state(), tensorium_RG::XX, tensorium_RG::XY, tensorium_RG::XZ, tensorium_RG::YY, tensorium_RG::YZ, and tensorium_RG::ZZ.

Here is the call graph for this function:

◆ by_add_momentum_TF()

template<typename T>
void tensorium_RG::init::by_add_momentum_TF ( T A[3][3],
const T n[3],
const T P[3],
T r )
inlinestatic

Add the trace-free momentum component \(\tilde{A}_{ij}^P\) to \(\tilde{A}_{ij}\).

Referenced by fill_Atilde_bowen_york_binary().

Here is the caller graph for this function:

◆ by_add_spin_TF()

template<typename T>
void tensorium_RG::init::by_add_spin_TF ( T A[3][3],
const T n[3],
const T S[3],
T r )
inlinestatic

Add the spin component \(\tilde{A}_{ij}^S\) derived from \(S^i\).

Referenced by fill_Atilde_bowen_york_binary().

Here is the caller graph for this function:

◆ fill_Atilde_bowen_york_binary()

template<typename T>
void tensorium_RG::init::fill_Atilde_bowen_york_binary ( BSSNGridSoA< T > & G,
T x1,
T y1,
T z1,
const T P1[3],
const T S1[3],
T x2,
T y2,
T z2,
const T P2[3],
const T S2[3],
T r_floor = T(1e-6) )
inline

Populate \(\tilde{A}_{ij}\) with the superposition of two Bowen–York punctures.

Parameters
x1,y1,z1,x2,y2,z2Centers of punctures 1 and 2.
P1,S1Linear momentum and spin of puncture 1; analogous for puncture 2.
r_floorMinimum radius enforced when normalizing \(n_i\).

References by_add_momentum_TF(), by_add_spin_TF(), tensorium_RG::XX, tensorium_RG::XY, tensorium_RG::XZ, tensorium_RG::YY, tensorium_RG::YZ, and tensorium_RG::ZZ.

Referenced by binary_bowen_york_puncture_init().

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

◆ invert_gamma_tilde()

template<typename T>
void tensorium_RG::init::invert_gamma_tilde ( BSSNGridSoA< T > & G,
size_t i,
size_t j,
size_t k )
inline

Explicit 3x3 inversion of \(\tilde{\gamma}_{ij}\) at a given grid index.

Used by initial-data routines after writing the conformal metric to keep the inverse cache synchronized without invoking the global projector.

References tensorium_RG::XX, tensorium_RG::XY, tensorium_RG::XZ, tensorium_RG::YY, tensorium_RG::YZ, and tensorium_RG::ZZ.

Referenced by binary_bowen_york_puncture_init(), binary_schwarzschild_isotropic_2centers(), and schwarzschild_isotropic().

Here is the caller graph for this function:

◆ minkowski()

template<typename T>
void tensorium_RG::init::minkowski ( BSSNGridSoA< T > & G,
T M,
T xc = T(0),
T yc = T(0),
T zc = T(0),
T r_floor = T(1e-6) )
inline

Populate the grid with Minkowski (flat) initial data.

Parameters
MUnused placeholder (kept for interface compatibility with Schwarzschild builders).
xc,yc,zcCenter of the coordinate system used for diagnostics.
r_floorMinimum radius when sampling Ricci/constraint monitors.

Sets \(\alpha=1,\chi=1,\tilde{\gamma}_{ij}=\delta_{ij},\tilde{A}_{ij}=0,K=0,\beta^i=B^i=0,\tilde{\Gamma}^i=0\). After filling halos it recomputes Christoffels, Ricci, constraints, and enforces invariants.

References tensorium_RG::bssn::apply_halos_grid(), tensorium_RG::bssn::assert_invariants(), tensorium_RG::bssn::compute_bssn_constraints(), tensorium_RG::bssn::compute_ricci_bssn(), tensorium_RG::bssn::compute_tildeGamma_contracted(), tensorium_RG::bssn::print_constraint_norms(), print_ricci_samples(), tensorium_RG::bssn::project_bssn_state(), tensorium_RG::XX, tensorium_RG::XY, tensorium_RG::XZ, tensorium_RG::YY, tensorium_RG::YZ, and tensorium_RG::ZZ.

Here is the call graph for this function:

◆ print_ricci_samples()

template<typename T>
void tensorium_RG::init::print_ricci_samples ( const BSSNGridSoA< T > & G)

Print Ricci tensor samples at representative radii for diagnostic purposes.

Evaluates \(R_{ij}\) at three locations (near, mid, far) along the x-axis to verify that the initial data satisfy \(R_{ij}=0\) away from punctures. Used after Minkowski/Schwarzschild set-up.

References tensorium_RG::XX, tensorium_RG::XY, tensorium_RG::XZ, tensorium_RG::YY, tensorium_RG::YZ, and tensorium_RG::ZZ.

Referenced by binary_bowen_york_puncture_init(), binary_schwarzschild_isotropic_2centers(), minkowski(), and schwarzschild_isotropic().

Here is the caller graph for this function:

◆ schwarzschild_isotropic()

template<typename T>
void tensorium_RG::init::schwarzschild_isotropic ( BSSNGridSoA< T > & G,
T M,
T xc = T(0),
T yc = T(0),
T zc = T(0),
T r_floor = T(1e-6) )
inline

Construct an isotropic Schwarzschild puncture with conformal factor \(\psi=1+M/(2r)\).

Parameters
MPuncture mass parameter.
xc,yc,zcPuncture center.
r_floorRegularization radius to avoid division by zero at the puncture.

Sets \(\alpha=\psi^{-2}\), \(\chi=\psi^{-4}\), \(\tilde{\gamma}_{ij}=\delta_{ij}\), and \(\tilde{A}_{ij}=K=0\). The routine clamps \(r\ge r_{\text{floor}}\), applies halo BCs, recomputes \(\tilde{\Gamma}^i\) and \(R_{ij}\), then prints Ricci and constraint diagnostics.

References tensorium_RG::bssn::apply_halos_grid(), tensorium_RG::bssn::assert_invariants(), tensorium_RG::bssn::compute_bssn_constraints(), tensorium_RG::bssn::compute_ricci_bssn(), tensorium_RG::bssn::compute_tildeGamma_contracted(), invert_gamma_tilde(), tensorium_RG::bssn::print_constraint_norms(), print_ricci_samples(), tensorium_RG::bssn::project_bssn_state(), tensorium_RG::XX, tensorium_RG::XY, tensorium_RG::XZ, tensorium_RG::YY, tensorium_RG::YZ, and tensorium_RG::ZZ.

Here is the call graph for this function:

◆ solve_lichnerowicz_u_SOR()

template<typename T>
void tensorium_RG::init::solve_lichnerowicz_u_SOR ( BSSNGridSoA< T > & G,
T m1,
T x1,
T y1,
T z1,
T m2,
T x2,
T y2,
T z2,
T r_floor = T(1e-6),
int maxIter = 4000,
T tol = T(1e-10),
T omega = T(1.6) )
inline

Solve the Lichnerowicz equation \(\Delta u = -\frac{1}{8}\psi^{-7}\tilde{A}_{ij}\tilde{A}^{ij}\) via red-black SOR.

Parameters
m1,m2,x1,...Coordinates and bare masses entering the Brill–Lindquist conformal factor.
maxIter,tol,omegaSolver controls (iterations, residual tolerance, relaxation factor).

The discrete Laplacian uses standard 2nd-order stencils to balance efficiency with robustness. After convergence the routine updates \(\chi=\psi^{-4}\) and \(\alpha=\psi^{-2}\) and reprojects the grid.

References tensorium_RG::bssn::assert_invariants(), Atilde_sq_flat_from_soa(), tensorium_RG::bssn::compute_tildeGamma_contracted(), and tensorium_RG::bssn::project_bssn_state().

Referenced by binary_bowen_york_puncture_init().

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