31 int cfl_check_interval;
36 bool variable_dt =
false;
37 bool clock_simulation =
true;
38 bool nancheck =
false;
39 bool visualize =
true;
45 std::string output_file_path;
46 std::string paraview_folder;
48 mfem::real_t t, t_final, dt, dt_real;
49 mfem::real_t dt_fixed;
51 mfem::real_t max_dt_growth;
53 mfem::real_t next_save_t;
54 mfem::real_t save_dt1;
55 mfem::real_t save_dt2;
56 mfem::real_t trigger_t;
58 mfem::real_t next_checkpoint_t;
62 mfem::real_t alpha_max;
64 mfem::Array<int> mesh_ordering;
65 std::shared_ptr<mfem::ParMesh> pmesh;
67 int btype = mfem::BasisType::GaussLobatto;
68 int ordering = mfem::Ordering::byNODES;
70 std::shared_ptr<mfem::DG_FECollection> fec;
71 std::shared_ptr<mfem::DG_FECollection> fec0;
72 std::shared_ptr<mfem::ParFiniteElementSpace> vfes;
73 std::shared_ptr<mfem::ParFiniteElementSpace> fes0;
74 std::unique_ptr<mfem::ParFiniteElementSpace> fes;
75 std::unique_ptr<mfem::ParFiniteElementSpace> dfes;
77 std::unique_ptr<mfem::VectorFunctionCoefficient> u0;
78 std::unique_ptr<mfem::VectorFunctionCoefficient> exact_solution;
80 std::shared_ptr<mfem::ParGridFunction> sol;
81 std::shared_ptr<mfem::ParGridFunction> dudx;
82 std::shared_ptr<mfem::ParGridFunction> dudy;
83 std::shared_ptr<mfem::ParGridFunction> dudz;
86 std::shared_ptr<mfem::ParGridFunction> eta;
87 std::shared_ptr<mfem::ParGridFunction> alpha;
88 std::shared_ptr<Prandtl::PerssonPeraireIndicator> indicator;
90 std::vector<std::shared_ptr<mfem::VectorFunctionCoefficient>> BC_coeff;
92 mfem::ParGridFunction rho, mom, energy;
94 std::unique_ptr<mfem::ParGridFunction> velocity;
95 std::unique_ptr<mfem::ParGridFunction> p;
97 std::unique_ptr<mfem::ParaViewDataCollection> pd;
98 std::unique_ptr<mfem::VisItDataCollection> vd;
100 std::shared_ptr<mfem::ODESolver> ode_solver;
101 std::unique_ptr<Theseus::RHSOperatorBase> rhsOp;
105 std::vector<mfem::Array<int>> bdr_marker_vector;
106 mfem::Array<int> set_marker;
108 void InitDevice(std::string);
109 std::unique_ptr<mfem::Device> device_;
111 void UpdateVisualizationFields();
112 void SaveVisualization();
114 void LoadCheckpoint();
115 void SaveCheckpoint();
116 void PrintFacePartitionDiagnostics()
const;
122 int LoadConfig(
const std::string &config_file_path);