Tensorium
|
Computes the Ricci tensor and Ricci scalar from a 4D Riemann tensor. More...
#include <RicciTensor.hpp>
Public Types | |
using | Tensor4D = tensorium::Tensor<T, 4> |
using | Tensor2D = tensorium::Tensor<T, 2> |
using | VectorT = tensorium::Vector<T> |
Static Public Member Functions | |
static tensorium::Tensor< T, 2 > | contract_to_ricci (const Tensor4D &Riemann, const tensorium::Tensor< T, 2 > &g_inv) |
Contracts a 4D Riemann tensor into the 2D Ricci tensor. | |
static double | compute_ricci_scalar (const Tensor2D &Ricci, const tensorium::Tensor< T, 2 > &g_inv) |
Computes the Ricci scalar curvature. | |
static void | print_componentwise (const Tensor2D &R, T threshold=1e-12) |
Prints the Ricci tensor components with optional zero threshold. | |
static void | print (const Tensor2D &R, const std::string &name="Ricci") |
Prints only the non-zero components of the Ricci tensor. | |
static void | print (const Tensor2D &R, const tensorium::Tensor< T, 2 > &g_inv, const std::string &name="Ricci") |
Prints non-zero components using both Ricci and inverse metric. | |
static void | print_ricci_scalar (const Tensor2D &Ricci, const tensorium::Tensor< T, 2 > &g_inv) |
Computes and prints the Ricci scalar from the tensor and metric. | |
Computes the Ricci tensor and Ricci scalar from a 4D Riemann tensor.
This class provides static methods to contract the Riemann tensor into the Ricci tensor, compute the scalar curvature, and print these results.
The Ricci tensor is obtained by contraction:
\[ R_{\mu\nu} = R^\rho_{\ \mu\rho\nu} = g^{\rho\sigma} R_{\rho\sigma\mu\nu} \]
The Ricci scalar is the trace:
\[ R = g^{\mu\nu} R_{\mu\nu} \]
using tensorium_RG::RicciTensor< T >::Tensor2D = tensorium::Tensor<T, 2> |
using tensorium_RG::RicciTensor< T >::Tensor4D = tensorium::Tensor<T, 4> |
using tensorium_RG::RicciTensor< T >::VectorT = tensorium::Vector<T> |
|
inlinestatic |
Computes the Ricci scalar curvature.
Uses the trace formula: \( R = g^{\mu\nu} R_{\mu\nu} \)
Ricci | The Ricci tensor \( R_{\mu\nu} \) |
g_inv | The inverse metric \( g^{\mu\nu} \) |
Referenced by tensorium::compute_ricci_scalar(), and tensorium_RG::RicciTensor< T >::print_ricci_scalar().
|
inlinestatic |
Contracts a 4D Riemann tensor into the 2D Ricci tensor.
Uses the identity \( R_{\mu\nu} = g^{\rho\sigma} R_{\rho\sigma\mu\nu} \)
Riemann | The Riemann tensor \( R_{\rho\sigma\mu\nu} \) |
g_inv | The inverse metric \( g^{\rho\sigma} \) |
References tensorium::Tensor< K, Rank >::fill(), mu, nu, rho, and sigma.
Referenced by tensorium::contract_riemann_to_ricci().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Prints the Ricci tensor components with optional zero threshold.
R | The Ricci tensor |
threshold | Minimum value to display (default = 1e-12) |
Referenced by tensorium::print_ricci_tensor().
|
inlinestatic |
Computes and prints the Ricci scalar from the tensor and metric.
Ricci | The Ricci tensor |
g_inv | The inverse metric |
References tensorium_RG::RicciTensor< T >::compute_ricci_scalar().
Referenced by tensorium::print_ricci_scalar().