Skip to content

Commit bcaee7a

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/CPP' into CPP
2 parents 8e535d6 + 1df003c commit bcaee7a

File tree

1 file changed

+38
-0
lines changed
  • includes/Tensorium/DiffGeometry/BSSN

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Tensorium — BSSN Module
2+
3+
This directory contains the building blocks for the BSSN (Baumgarte–Shapiro–Shibata–Nakamura) formulation used in numerical relativity. The headers implement helper routines to compute conformal variables, derivatives and curvature terms from a given spacetime metric.
4+
5+
## Header Overview
6+
7+
- `BSSNSetup.hpp` – defines `BSSNGrid` and the `BSSN` class. It initializes all BSSN variables at a spatial point: lapse, shift, conformal metric \(\tilde{\gamma}_{ij}\), its derivatives and inverse, Christoffel symbols, the extrinsic curvature \(K_{ij}\) and the trace–free tensor \(\tilde{A}_{ij}\).
8+
- `BSSNMetricUtils.hpp` – utilities for generating conformal metric fields on a 3D grid (e.g. `generate_conformal_metric_field`).
9+
- `BSSNDerivatives.hpp` – finite difference helpers to compute partial derivatives of scalars, vectors and tensors.
10+
- `BSSNChristoffel.hpp` – computes the conformal Christoffel symbols \(\tilde{\Gamma}^{k}_{ij}\) and provides routines to differentiate a 5‑D metric field.
11+
- `BSSNTildeChristoffel.hpp` – contracts the conformal Christoffel symbols with the inverse metric to form \(\tilde{\Gamma}^{i}\).
12+
- `BSSNContractedChristoffel.hpp` – evaluates the contracted connection \(\Gamma^{i}_{ij} = -\tfrac{3}{2}\,\partial_j \ln\chi\).
13+
- `BSSNextrinTensor.hpp` – computes the extrinsic curvature tensor \(K_{ij}\) from metric time derivatives, lapse and shift.
14+
- `BSSNAtildeTensor.hpp` – builds the trace‑free conformal extrinsic curvature tensor \(\tilde{A}_{ij}\).
15+
16+
## Status
17+
18+
The BSSN implementation is experimental and currently limited to initializing variables at a single grid point. Evolution equations and advanced gauge conditions are not yet available, and derivative operators rely on straightforward finite differences. APIs may change as development continues.
19+
20+
## Usage
21+
22+
`setup_BSSN_grid` from `includes/Tensorium/Functionnal/FunctionnalRG.hpp` provides a simple entry point:
23+
24+
```cpp
25+
using tensorium::Vector;
26+
Vector<double> X(3); // (x, y, z)
27+
X(0) = 10.0; X(1) = 0.0; X(2) = 0.0;
28+
29+
tensorium_RG::Metric<double> metric("kerr", 1.0, 0.8);
30+
double dx = 0.1, dy = 0.1, dz = 0.1;
31+
32+
auto bssn = tensorium::setup_BSSN_grid(X, metric, dx, dy, dz);
33+
34+
const auto& gamma_tilde = bssn.grid.gamma_tilde[0];
35+
const auto& A_tilde = bssn.grid.A_tildeTensor[0];
36+
```
37+
38+
The returned `tensorium_RG::BSSN` object stores all conformal and curvature quantities for that spatial coordinate.

0 commit comments

Comments
 (0)