Tensorium
|
Stores and computes Christoffel symbols \( \Gamma^\lambda_{\mu\nu} \). More...
#include <ChristoffelSymbol.hpp>
Public Member Functions | |
ChristoffelSym (size_t dim) | |
Construct a Christoffel symbol tensor. | |
T & | operator() (size_t i, size_t j, size_t k, size_t l) |
Mutable access to component \( \Gamma^\lambda_{\mu\nu} \). | |
const T & | operator() (size_t i, size_t j, size_t k, size_t l) const |
Const access to component \( \Gamma^\lambda_{\mu\nu} \). | |
void | fill (T value) |
Fill all components with a constant value. | |
void | print () const |
Print all non-zero Christoffel components to stdout. | |
__attribute__ ((always_inline, hot, flatten)) static inline ChristoffelSym< T > compute_christoffel(const tensorium | |
Compute Christoffel symbols numerically from a metric. | |
Public Attributes | |
aligned_vector< T > | data |
size_t | dim |
Static Public Attributes | |
static constexpr size_t | rank = 4 |
Stores and computes Christoffel symbols \( \Gamma^\lambda_{\mu\nu} \).
This class represents a tensor of Christoffel symbols for a 4D metric and supports:
The Christoffel symbols are given by:
\[ \Gamma^\lambda_{\mu\nu} = \frac{1}{2} g^{\lambda\kappa} \left( \partial_\mu g_{\nu\kappa} + \partial_\nu g_{\mu\kappa} - \partial_\kappa g_{\mu\nu} \right) \]
T | Scalar type (e.g., float or double) |
|
inline |
Construct a Christoffel symbol tensor.
dim | Dimensionality of the space |
|
inline |
Compute Christoffel symbols numerically from a metric.
Uses centered finite differences on the metric tensor and contracts with \( g^{\mu\nu} \).
X | Coordinates \( X^\mu \) |
h | Step size |
g | Metric tensor \( g_{\mu\nu} \) |
g_inv | Inverse metric \( g^{\mu\nu} \) |
metric_generator | A callable that generates \( g_{\mu\nu}(X) \) |
References tensorium_RG::ChristoffelSym< T >::dim, tensorium_RG::ChristoffelSym< T >::fill(), gamma, mu, nu, and X().
|
inline |
Fill all components with a constant value.
value | Value to fill |
References tensorium_RG::ChristoffelSym< T >::data.
Referenced by tensorium_RG::ChristoffelSym< T >::__attribute__().
|
inline |
Mutable access to component \( \Gamma^\lambda_{\mu\nu} \).
References tensorium_RG::ChristoffelSym< T >::data, and tensorium_RG::ChristoffelSym< T >::dim.
|
inline |
Const access to component \( \Gamma^\lambda_{\mu\nu} \).
References tensorium_RG::ChristoffelSym< T >::data, and tensorium_RG::ChristoffelSym< T >::dim.
|
inline |
Print all non-zero Christoffel components to stdout.
References tensorium_RG::ChristoffelSym< T >::dim.
aligned_vector<T> tensorium_RG::ChristoffelSym< T >::data |
size_t tensorium_RG::ChristoffelSym< T >::dim |
|
staticconstexpr |