28 for (
size_t i = 0; i <
d0; ++i)
29 for (
size_t j = 0;
j <
d1; ++
j)
36 const size_t d0 =
mat.rows;
37 const size_t d1 =
mat.cols;
40 for (
size_t i = 0; i <
d0; ++i)
41 for (
size_t j = 0;
j <
d1; ++
j)
56 template <
typename T,
typename MetricFunc>
151 bssn.init_BSSN(
X, metric, dx, dy, dz);
static FrontendPluginRegistry::Add< TensoriumPluginAction > X("tensorium-dispatch", "Handle #pragma tensorium directives")
Register the plugin under the name "tensorium-dispatch".
Multi-dimensional tensor class with fixed rank and SIMD support.
Definition Tensor.hpp:25
std::array< size_t, Rank > dimensions
Dimensions of the tensor (e.g., {4,4,4,4})
Definition Tensor.hpp:29
static void compute3D(const tensorium::Tensor< T, 5 > &gamma_tilde, const tensorium::Tensor< T, 6 > &dgamma_tilde, const tensorium::Tensor< T, 5 > &gamma_tilde_inv, tensorium::Tensor< T, 6 > &Christoffel)
Definition BSSNChristoffel.hpp:65
static void compute(const tensorium::Tensor< T, 2 > &gamma_tilde, const tensorium::Tensor< T, 3 > &dgamma_tilde, const tensorium::Tensor< T, 2 > &gamma_tilde_inv, tensorium::Tensor< T, 3 > &Christoffel)
Compute the conformal Christoffel symbols .
Definition BSSNChristoffel.hpp:36
Driver class to initialize and store BSSN variables from an input spacetime metric.
Definition BSSNSetup.hpp:81
Stores and computes Christoffel symbols .
Definition ChristoffelSymbol.hpp:40
A callable 4D metric class for general relativity (Minkowski, Schwarzschild, Kerr,...
Definition Metric.hpp:27
void compute_conformal_metric(const tensorium::Tensor< T, 2 > &gamma, T chi, tensorium::Tensor< T, 2 > &gamma_tilde) const
Definition Metric.hpp:109
T compute_conformal_factor(const tensorium::Tensor< T, 2 > &gamma) const
Definition Metric.hpp:101
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.
Definition RicciTensor.hpp:141
static void print_componentwise(const Tensor2D &R, T threshold=1e-12)
Prints the Ricci tensor components with optional zero threshold.
Definition RicciTensor.hpp:84
static double compute_ricci_scalar(const Tensor2D &Ricci, const tensorium::Tensor< T, 2 > &g_inv)
Computes the Ricci scalar curvature.
Definition RicciTensor.hpp:67
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.
Definition RicciTensor.hpp:40
static Tensor4D compute(const VectorT &X, T h, const Metric< T > &metric)
Computes the 4D Riemann curvature tensor .
Definition RiemannTensor.hpp:90
static void print_componentwise(const Tensor4D &R, T threshold=1e-12)
Definition RiemannTensor.hpp:30
Definition Derivate.hpp:24
void generate_metric(const tensorium_RG::Metric< T > &metric, const Vector< T > &X, Tensor< T, 2 > &g)
Definition FunctionnalRG.hpp:73
void compute_christoffel_3D_Grid(const Tensor< T, 5 > &gamma_tilde, const Tensor< T, 6 > &dgamma_tilde, const Tensor< T, 5 > &gamma_tilde_inv, Tensor< T, 6 > &Christoffel)
Definition FunctionnalRG.hpp:139
tensorium_RG::BSSN< T > setup_BSSN(const Vector< T > &X, const tensorium_RG::Metric< T > &metric, T dx, T dy, T dz)
Definition FunctionnalRG.hpp:147
T compute_ricci_scalar(const Tensor< T, 2 > &Ricci, const Tensor< T, 2 > &ginv)
Definition FunctionnalRG.hpp:101
void print_ricci_scalar(const Tensor< T, 2 > &Ricci, const Tensor< T, 2 > &g_inv)
Definition FunctionnalRG.hpp:111
tensorium::Tensor< T, 4 > compute_riemann_tensor(const tensorium::Vector< T > &X, T h, const tensorium_RG::Metric< T > &metric)
Definition FunctionnalRG.hpp:80
T compute_conformal_factor(const tensorium_RG::Metric< T > &metric, const Tensor< T, 2 > &gamma)
Definition FunctionnalRG.hpp:115
tensorium_RG::ChristoffelSym< T > compute_christoffel(const tensorium::Vector< T > &X, T h, const tensorium::Tensor< T, 2 > &g, const tensorium::Tensor< T, 2 > &g_inv, MetricFunc &&metric_generator)
Definition FunctionnalRG.hpp:57
Tensor< T, 2 > contract_riemann_to_ricci(const Tensor< T, 4 > &R, const Tensor< T, 2 > &ginv)
Definition FunctionnalRG.hpp:96
void print_riemann_tensor(const tensorium::Tensor< T, 4 > &R)
Definition FunctionnalRG.hpp:89
Tensor< T, 2 > compute_conformal_metric(const tensorium_RG::Metric< T > &metric, const Tensor< T, 2 > &gamma, T chi)
Definition FunctionnalRG.hpp:121
Matrix< T > tensor_to_matrix(const Tensor< T, 2 > &tensor)
Definition FunctionnalRG.hpp:24
tensorium::Tensor< T, 2 > inv_mat_tensor(const tensorium::Tensor< T, 2 > &g)
Definition FunctionnalRG.hpp:17
void compute_christoffel_3D(const Tensor< T, 2 > &gamma_tilde, const Tensor< T, 3 > &dgamma_tilde, const Tensor< T, 2 > &gamma_tilde_inv, Tensor< T, 3 > &Christoffel)
Definition FunctionnalRG.hpp:131
void print_ricci_tensor(const Tensor< T, 2 > &R)
Definition FunctionnalRG.hpp:106
Tensor< T, 2 > matrix_to_tensor(const Matrix< T > &mat)
Definition FunctionnalRG.hpp:35