Repository navigation
Releases
Version 0.21
This version offers many memory enhancements for effeciency by dumping calculations that are not necessarily needed for calculated outputs such as the Ricci scalars. This allows for a much smaller memory requirement. The biggest change is that the normal path no longer constructs the full Riemann tensor merely to throw most of it away. Ricci is now contracted directly from the Christoffel symbols:
Streaming Ricci calculation. Stop constructing Riemann unless "riemann" is explicitly requested.
Memory preflight. Estimate required RAM and refuse dangerous jobs before allocation.
Low-memory output policy. Don't retain inverse metric, Christoffel, Ricci, etc. unless requested.
Tiled/halo solver. Break large grids into chunks and preserve derivative neighborhoods.
unless riemann is explicitly requested. Full Riemann remains available as an output. That removes the 256-component field from the normal Einstein/stress-energy path.
Memory preflight now runs before the large tensor allocations. It estimates available physical RAM, reserves a safety margin, estimates both conventional and tiled peak memory, and chooses an execution mode. If even tiled execution plus the requested result arrays are too large, the program raises a controlled memory error rather than attempting the allocation and getting killed by the OS.
The output policy is now genuinely selective. For example:
tensor-toolkit run alcubierre --points 31 --fields einstein
will compute whatever intermediates are required but retain only 'einstein'.
You can explicitly request several:
tensor-toolkit run alcubierre --points 31 \
--fields metric einstein stress_energy
```
The first attempt at tiling is complete. The tiled implementation is also working. It currently decomposes the calculation into slabs along the \(t\) coordinate:
full t axis
|---- tile ----|---- tile ----|---- tile ----|
+ halos + halos + halos
The important detail is that I ended up using a three-cell halo.
The CLI now exposes:
--memory-mode auto
--memory-mode in_memory
--memory-mode tiled
--tile-points N
--fields ...
For example, you could run:
tensor-toolkit run alcubierre \
--points 35 \
--memory-mode tiled \
--tile-points 6 \
--fields einstein stress_energy
```
Version 0.2
Second release with major rewrites in order to validate spacetime metrics.