feat(libmeanfield): variadic refactor
also added normaliztion operator
This commit is contained in:
55
extension_example/README.md
Normal file
55
extension_example/README.md
Normal file
@@ -0,0 +1,55 @@
|
||||
# MeanField physics extension example
|
||||
|
||||
This directory is a small, isolated example for physicists who want to extend
|
||||
MeanField without first learning its internal block-matrix machinery.
|
||||
|
||||
Start in this order:
|
||||
|
||||
1. Read `ideal_gas_radiation.cppm`. It implements a monatomic ideal gas plus
|
||||
equilibrium radiation using the public EOS relation protocol.
|
||||
2. Read `rotating_stellar_model.cppm`. It composes that EOS with the existing
|
||||
isobaric surface, fixed-total-mass invariant, and fixed-angular-momentum
|
||||
invariant.
|
||||
3. Read and run `demo.cpp`.
|
||||
4. Read the tests. They show which claims should be compile-time contracts and
|
||||
which claims require physical or numerical checks.
|
||||
5. Use `manual/physics_developer_manual.pdf` as the detailed guide. Its LaTeX
|
||||
source is beside it.
|
||||
|
||||
## The important boundary
|
||||
|
||||
`makeRotatingStellarModel(...)` produces a valid, strongly typed stellar-model
|
||||
specification. The current equilibrium numerical core is still barotropic: it
|
||||
expects density to be closed by specific enthalpy alone. An ideal-gas plus
|
||||
radiation EOS depends independently on density and temperature, so a complete
|
||||
thermal equilibrium solve also needs a temperature or entropy field and its
|
||||
governing equation.
|
||||
|
||||
The example therefore proves at compile time that model composition succeeds
|
||||
and that the present discretizer rejects this model. It does not disguise the
|
||||
thermal EOS as a polytrope or claim that a missing energy equation exists.
|
||||
|
||||
## Build only this example
|
||||
|
||||
From the repository root, configure as usual, then build only these targets:
|
||||
|
||||
```sh
|
||||
cmake --build cmake-build-profile-homebrew-llvm \
|
||||
--target extension_example_demo extension_example_tests
|
||||
```
|
||||
|
||||
Run only the extension tests:
|
||||
|
||||
```sh
|
||||
./cmake-build-profile-homebrew-llvm/extension_example/extension_example_tests
|
||||
```
|
||||
|
||||
Compile a fresh manual into the build directory:
|
||||
|
||||
```sh
|
||||
cmake --build cmake-build-profile-homebrew-llvm \
|
||||
--target extension_example_manual
|
||||
```
|
||||
|
||||
No source under `libmeanfield/` belongs to this example, and the extension test
|
||||
executable is separate from the main MeanField regression suite.
|
||||
Reference in New Issue
Block a user