Tensorium
Loading...
Searching...
No Matches
BSSNRicciComplete.hpp
Go to the documentation of this file.
1
6#pragma once
7
12
13namespace tensorium_RG {
14
46template <typename T> class RicciPhysicalTensor {
47 public:
70 const ChiContext<T> &chi_context, const tensorium::Tensor<T, 2> &gamma_tilde,
71 const tensorium::Tensor<T, 2> &gamma_tilde_inv, const tensorium::Vector<T> &tilde_Gamma,
72 const tensorium::Tensor<T, 3> &christoffel_tilde) {
73 using namespace tensorium;
74
76 chi_context, gamma_tilde_inv, tilde_Gamma, christoffel_tilde, gamma_tilde);
77
79 chi_context, gamma_tilde, gamma_tilde_inv, christoffel_tilde);
80
82 for (int i = 0; i < 3; ++i)
83 for (int j = 0; j < 3; ++j)
84 Ricci_phys(i, j) = Ricci_tilde(i, j) + Ricci_chi(i, j);
85
86 T norm = 0.0;
87 for (int i = 0; i < 3; ++i)
88 for (int j = 0; j < 3; ++j)
89 norm += Ricci_phys(i, j) * Ricci_phys(i, j);
90
91 norm = std::sqrt(norm);
92 std::cout << "||R_phys||_F = " << norm << std::endl;
93
94 return Ricci_phys;
95 }
96};
97
98} // namespace tensorium_RG
Computes the conformal Ricci tensor contributions from the conformal factor in the BSSN formalism.
Computes the conformal part of the Ricci tensor in the BSSN formalism.
Multi-dimensional tensor class with fixed rank and SIMD support.
Definition Tensor.hpp:25
static tensorium::Tensor< T, 2 > compute_Ricci_chi_total(const ChiContext< T > &chi_context, const tensorium::Tensor< T, 2 > &gamma_tilde, const tensorium::Tensor< T, 2 > &gamma_tilde_inv, const tensorium::Tensor< T, 3 > &christoffel_tilde)
Computes the total contribution as:
Definition BSSNRicciConformalTensor.hpp:173
Computes the physical 3-Ricci tensor as the sum of conformal and conformal-factor contributions.
Definition BSSNRicciComplete.hpp:46
static tensorium::Tensor< T, 2 > compute_Ricci_total(const ChiContext< T > &chi_context, const tensorium::Tensor< T, 2 > &gamma_tilde, const tensorium::Tensor< T, 2 > &gamma_tilde_inv, const tensorium::Vector< T > &tilde_Gamma, const tensorium::Tensor< T, 3 > &christoffel_tilde)
Compute the full Ricci tensor as the sum of and .
Definition BSSNRicciComplete.hpp:69
static tensorium::Tensor< T, 2 > compute_Ricci_Tilde_tensor(const ChiContext< T > &chi_context, const tensorium::Tensor< T, 2 > &gamma_tilde_inv, const tensorium::Vector< T > &tilde_Gamma, const tensorium::Tensor< T, 3 > &christoffel_tilde, const tensorium::Tensor< T, 2 > &gamma_tilde)
Combine all four contributions to compute the conformal Ricci tensor:
Definition BSSNRicciTildeTensor.hpp:222
Definition BSSNAtildeTensor.hpp:10
Definition Derivate.hpp:24
Definition BSSNChiContext.hpp:10