docs(docs): rebuild with more usage examples

This commit is contained in:
2025-07-30 15:12:46 -04:00
parent 24870ffcbc
commit cd60ae5c1e
79 changed files with 5050 additions and 4496 deletions

View File

@@ -216,13 +216,33 @@ gridfire::AdaptiveEngineView adaptiveView(baseEngine);
### Python Example
```python
import gridfire
from fourdst.composition import Composition
symbols = ["H-1", ...]
X = [0.708, ...]
comp = Composition()
comp.registerSymbols(symbols)
comp.setMassFraction(X)
comp.finalize(true)
# Initialize GraphEngine with predefined composition
engine = gridfire.GraphEngine(composition="example_composition")
engine = gridfire.GraphEngine(comp)
netIn = gridfire.types.NetIn
netIn.composition = comp
netIn.tMax = 1e-3
netIn.temperature = 1.5e7
netIn.density = 1.6e2
netIn.dt0 = 1e-12
# Perform one integration step
engine.step(dt=1e-3)
print(engine.abundances)
netOut = engine.evaluate(netIn)
print(netOut)
```
More detailed python usage can be found [here](usage.md)
## Common Workflow Example
A representative workflow often composes multiple engine views to balance accuracy, stability, and performance when integrating stiff nuclear networks:
@@ -277,4 +297,4 @@ GridFire integrates with and builds upon several key 4D-STAR libraries:
- [libcomposition](https://github.com/4D-STAR/libcomposition) ([docs](https://4d-star.github.io/libcomposition/)): Composition management toolkit.
- [libconfig](https://github.com/4D-STAR/libconfig): Configuration file parsing utilities.
- [liblogging](https://github.com/4D-STAR/liblogging): Flexible logging framework.
- [libconstants](https://github.com/4D-STAR/libconstants): Physical constants
- [libconstants](https://github.com/4D-STAR/libconstants): Physical constants