From 8f231e1ab50833f85c58b67c876b46250c619054 Mon Sep 17 00:00:00 2001 From: William Anderson <53445030+andersonw1@users.noreply.github.com> Date: Fri, 10 Nov 2023 12:49:26 -0800 Subject: [PATCH] Update maxwell_global_rom.cpp Changed saving mesh/sol files to calculate relative errors Saved mesh/solution files are now in folders titled "maxwell" instead of "example3" --- examples/prom/maxwell_global_rom.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/examples/prom/maxwell_global_rom.cpp b/examples/prom/maxwell_global_rom.cpp index 0a6b2f951..c1c7121f7 100644 --- a/examples/prom/maxwell_global_rom.cpp +++ b/examples/prom/maxwell_global_rom.cpp @@ -453,15 +453,22 @@ int main(int argc, char *argv[]) ofstream sol_ofs(sol_name.str().c_str()); sol_ofs.precision(8); x.Save(sol_ofs); + + ofstream sol_dofs_ofs(sol_dofs_name.str().c_str()); + sol_dofs_ofs.precision(16); + for (int i = 0; i < x.Size(); ++i) + { + sol_dofs_ofs << x[i] << std::endl; + } } // 28. Save data in the VisIt format. DataCollection *dc = NULL; if (visit) { - if (offline) dc = new VisItDataCollection("Example3", pmesh); - else if (fom) dc = new VisItDataCollection("Example3_fom", pmesh); - else if (online) dc = new VisItDataCollection("Example3_rom", pmesh); + if (offline) dc = new VisItDataCollection("maxwell", pmesh); + else if (fom) dc = new VisItDataCollection("maxwell_fom", pmesh); + else if (online) dc = new VisItDataCollection("maxwell_rom", pmesh); dc->SetPrecision(precision); dc->RegisterField("solution", &x); dc->Save();