35 bool variable_dt =
false;
36 bool clock_simulation =
true;
37 bool nancheck =
false;
38 bool visualize =
true;
44 std::string output_file_path;
45 std::string paraview_folder;
47 mfem::real_t t, t_final, dt, dt_real;
51 mfem::real_t next_save_t;
52 mfem::real_t save_dt1;
53 mfem::real_t save_dt2;
54 mfem::real_t trigger_t;
56 mfem::real_t next_checkpoint_t;
60 mfem::real_t alpha_max;
62 mfem::Array<int> mesh_ordering;
63 std::shared_ptr<mfem::ParMesh> pmesh;
65 int btype = mfem::BasisType::GaussLobatto;
66 int ordering = mfem::Ordering::byNODES;
68 std::shared_ptr<mfem::DG_FECollection> fec;
69 std::shared_ptr<mfem::DG_FECollection> fec0;
70 std::shared_ptr<mfem::ParFiniteElementSpace> vfes;
71 std::shared_ptr<mfem::ParFiniteElementSpace> fes0;
72 std::unique_ptr<mfem::ParFiniteElementSpace> fes;
73 std::unique_ptr<mfem::ParFiniteElementSpace> dfes;
75 std::unique_ptr<mfem::VectorFunctionCoefficient> u0;
76 std::unique_ptr<mfem::VectorFunctionCoefficient> exact_solution;
78 std::shared_ptr<mfem::ParGridFunction> sol;
79 std::shared_ptr<mfem::ParGridFunction> dudx;
80 std::shared_ptr<mfem::ParGridFunction> dudy;
81 std::shared_ptr<mfem::ParGridFunction> dudz;
84 std::shared_ptr<mfem::ParGridFunction> eta;
85 std::shared_ptr<mfem::ParGridFunction> alpha;
86 std::shared_ptr<Prandtl::PerssonPeraireIndicator> indicator;
88 std::vector<std::shared_ptr<mfem::VectorFunctionCoefficient>> BC_coeff;
90 mfem::ParGridFunction rho, mom, energy;
92 std::unique_ptr<mfem::ParGridFunction> velocity;
93 std::unique_ptr<mfem::ParGridFunction> p;
95 std::unique_ptr<mfem::ParaViewDataCollection> pd;
96 std::unique_ptr<mfem::VisItDataCollection> vd;
98 std::shared_ptr<mfem::ODESolver> ode_solver;
99 std::unique_ptr<Theseus::RHSOperatorBase> rhsOp;
103 std::vector<mfem::Array<int>> bdr_marker_vector;
104 mfem::Array<int> set_marker;
106 void InitDevice(std::string);
107 std::unique_ptr<mfem::Device> device_;
109 void UpdateVisualizationFields();
110 void SaveVisualization();
112 void LoadCheckpoint();
113 void SaveCheckpoint();
119 int LoadConfig(
const std::string &config_file_path);