From 57600fabc25a6079f0488c15a08b2ea26ab74e8c Mon Sep 17 00:00:00 2001 From: Thomas Guillermo Albers Raviola Date: Fri, 31 Jul 2026 12:11:46 +0200 Subject: Add cache to Bondi --- 01-bondi.mac | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to '01-bondi.mac') diff --git a/01-bondi.mac b/01-bondi.mac index e9133ab..08b04a6 100644 --- a/01-bondi.mac +++ b/01-bondi.mac @@ -157,6 +157,44 @@ eq_dipo : block( eq : -3*solve(eq, diff(N,u))[1], 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 */ -- cgit v1.3