diff options
| author | Thomas Guillermo Albers Raviola <thomas@thomaslabs.org> | 2026-07-31 12:11:46 +0200 |
|---|---|---|
| committer | Thomas Guillermo Albers Raviola <thomas@thomaslabs.org> | 2026-07-31 12:11:46 +0200 |
| commit | 57600fabc25a6079f0488c15a08b2ea26ab74e8c (patch) | |
| tree | 9fce3c668d4e55f2913da1904a28790b1e79a90d | |
| parent | cd37b2cd9c408e7a91382c02aa5c39f8c95ba443 (diff) | |
Add cache to Bondi
| -rw-r--r-- | 01-bondi.mac | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/01-bondi.mac b/01-bondi.mac index e9133ab..08b04a6 100644 --- a/01-bondi.mac +++ b/01-bondi.mac @@ -158,6 +158,44 @@ eq_dipo : block( trigreduce(expand(trigsimp(eq)))); +/* Cache */ + +path(name) := printf(false, "cache/01-bondi/~a.lisp", name); + +/* Hypersurface equations */ +save(path("e_hs_eqs"), e_hs_eqs); +save(path("ce_hs_eqs"), ce_hs_eqs); + +/* Evolution equation */ +save(path("e_ev_eqs"), e_ev_eqs); +save(path("ce_ev_eqs"), ce_ev_eqs); + +/* Supplementary conditions */ +save(path("e_sc_eqs"), e_sc_eqs); + +/* Coefficients */ +save(path("beta_coeffs"), β_coeffs); +save(path("a_coeffs"), A_coeffs); +save(path("b_coeffs"), B_coeffs); +save(path("coeffs"), coeffs) + +/* Loss formulae */ +save(path("eq_quad"), eq_quad); +save(path("eq_mono"), eq_mono); +save(path("eq_dipo"), eq_dipo); + +load_cache() := block( + [cache : [ + "e_hs_eqs", "ce_hs_eqs", + "e_ev_eqs", "ce_ev_eqs", + "e_sc_eqs", + "beta_coeffs", "a_coeffs", "b_coeffs", "coeffs", + "eq_quad", "eq_mono", "eq_dipo"]], + for file in cache do load(path(file))); + +load_cache(); + + /* Convoluted way to show that the results for C_u are consistent */ e_ev_eqs[1] : expand_equation(ev_eqs[1], coeffs); |
