1 #include "flow_solver.h" 8 #include "reduced_order/pod_basis_offline.h" 9 #include "reduced_order/pod_basis_online.h" 10 #include "physics/initial_conditions/set_initial_condition.h" 11 #include "mesh/mesh_adaptation/mesh_adaptation.h" 12 #include <deal.II/base/timer.h> 16 namespace FlowSolver {
21 template <
int dim,
int nspecies,
int nstate>
25 const dealii::ParameterHandler ¶meter_handler_input)
27 , flow_solver_case(flow_solver_case_input)
28 , parameter_handler(parameter_handler_input)
29 , mpi_communicator(MPI_COMM_WORLD)
30 , mpi_rank(dealii::Utilities::MPI::this_mpi_process(MPI_COMM_WORLD))
31 , n_mpi(dealii::Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD))
32 , pcout(
std::cout, mpi_rank==0)
33 , all_param(*parameters_input)
34 , flow_solver_param(all_param.flow_solver_param)
35 , ode_param(all_param.ode_solver_param)
36 , poly_degree(flow_solver_param.poly_degree)
37 , grid_degree(flow_solver_param.grid_degree)
38 , final_time(flow_solver_param.final_time)
39 , input_parameters_file_reference_copy_filename(flow_solver_param.restart_files_directory_name +
std::string(
"/") +
std::string(
"input_copy.prm"))
40 , do_output_solution_at_fixed_times(ode_param.output_solution_at_fixed_times)
41 , number_of_fixed_times_to_output_solution(ode_param.number_of_fixed_times_to_output_solution)
42 , output_solution_at_exact_fixed_times(ode_param.output_solution_at_exact_fixed_times)
43 , do_compute_unsteady_data_and_write_to_table(flow_solver_param.do_compute_unsteady_data_and_write_to_table)
44 , dg(
DGFactory<dim,nspecies,double>::create_discontinuous_galerkin(&all_param, poly_degree, flow_solver_param.max_poly_degree_for_adaptation, grid_degree, flow_solver_case->generate_grid()))
48 pcout <<
"Note: Allocating DG with AD matrix dRdW only." << std::endl;
49 dg->allocate_system(
true,
false,
false);
51 pcout <<
"Note: Allocating DG without AD matrices." << std::endl;
52 dg->allocate_system(
false,
false,
false);
60 pcout <<
"Error: restart_computation_from_file is not possible for 1D. Set to false." << std::endl;
65 pcout <<
"Error: Restart capability has not been fully implemented / tested for steady state computations." << std::endl;
70 pcout <<
"Initializing solution from restart file..." << std::flush;
77 dealii::LinearAlgebra::distributed::Vector<double> solution_no_ghost;
78 solution_no_ghost.reinit(
dg->locally_owned_dofs, this->mpi_communicator);
79 dealii::parallel::distributed::SolutionTransfer<dim, dealii::LinearAlgebra::distributed::Vector<double>, dealii::DoFHandler<dim>> solution_transfer(
dg->dof_handler);
80 solution_transfer.deserialize(solution_no_ghost);
81 dg->solution = solution_no_ghost;
84 dealii::LinearAlgebra::distributed::Vector<double> time_averaged_solution_no_ghost;
85 time_averaged_solution_no_ghost.reinit(
dg->locally_owned_dofs, this->mpi_communicator);
86 dealii::parallel::distributed::SolutionTransfer<dim, dealii::LinearAlgebra::distributed::Vector<double>, dealii::DoFHandler<dim>> time_averaged_solution_transfer(
dg->dof_handler);
87 time_averaged_solution_transfer.deserialize(time_averaged_solution_no_ghost);
88 dg->time_averaged_solution = time_averaged_solution_no_ghost;
91 pcout <<
"done." << std::endl;
96 dg->solution.update_ghost_values();
101 std::shared_ptr<ProperOrthogonalDecomposition::OfflinePOD<dim,nspecies>> pod = std::make_shared<ProperOrthogonalDecomposition::OfflinePOD<dim,nspecies>>(
dg);
114 if(unsteady_FOM_POD_bool && nspecies == 1){
115 std::shared_ptr<dealii::TrilinosWrappers::SparseMatrix> system_matrix(
119 time_pod = std::make_shared<ProperOrthogonalDecomposition::OnlinePOD<dim,nspecies>>(system_matrix);
120 time_pod->addSnapshot(
dg->solution);
125 pcout <<
"Writing a reference copy of the inputted parameters (.prm) file... " << std::flush;
129 pcout <<
"done." << std::endl;
138 std::string line = output_solution_fixed_times_string;
139 std::string::size_type sz1;
142 line = line.substr(sz1);
149 template <
int dim,
int nspecies,
int nstate>
156 std::istringstream iss(string_input);
160 std::vector<std::string> names;
162 names.push_back(word.c_str());
167 template <
int dim,
int nspecies,
int nstate>
170 std::string restart_index_string = std::to_string(restart_index_input);
171 const unsigned int length_of_index_with_padding = 5;
172 const unsigned int number_of_zeros = length_of_index_with_padding - restart_index_string.length();
173 restart_index_string.insert(0, number_of_zeros,
'0');
175 const std::string prefix =
"restart-";
176 const std::string restart_filename_without_extension = prefix+restart_index_string;
178 return restart_filename_without_extension;
181 template <
int dim,
int nspecies,
int nstate>
183 std::string data_table_filename,
184 const std::shared_ptr <dealii::TableHandler> data_table)
const 188 std::string::size_type sz1;
190 std::ifstream FILE (data_table_filename);
191 std::getline(FILE, line);
195 pcout <<
"Error: Trying to read empty file named " << data_table_filename << std::endl;
200 const int number_of_columns = data_column_names.size();
202 std::getline(FILE, line);
206 pcout <<
"Error: Table has no data to be read" << std::endl;
210 std::vector<double> current_line_values(number_of_columns);
211 while (!line.empty()) {
212 std::string dummy_line = line;
214 current_line_values[0] = std::stod(dummy_line,&sz1);
215 for(
int i=1; i<number_of_columns; ++i) {
216 dummy_line = dummy_line.substr(sz1);
218 current_line_values[i] = std::stod(dummy_line,&sz1);
222 for(
int i=0; i<number_of_columns; ++i) {
223 data_table->add_value(data_column_names[i], current_line_values[i]);
224 data_table->set_precision(data_column_names[i], 16);
225 data_table->set_scientific(data_column_names[i],
true);
227 std::getline(FILE, line);
232 template <
int dim,
int nspecies,
int nstate>
235 std::stringstream ss;
236 ss << std::scientific << std::setprecision(16) << value_input;
241 template <
int dim,
int nspecies,
int nstate>
243 const unsigned int restart_index_input,
244 const double time_step_input)
const {
257 std::vector<std::string> subsection_line;
258 subsection_line.push_back(
"subsection ODE solver");
259 subsection_line.push_back(
"subsection flow_solver");
261 int number_of_subsections = subsection_line.size();
268 std::vector<std::string> ODE_solver_restart_parameter_names;
269 ODE_solver_restart_parameter_names.push_back(
" initial_desired_time_for_output_solution_every_dt_time_intervals ");
270 ODE_solver_restart_parameter_names.push_back(
" initial_iteration ");
271 ODE_solver_restart_parameter_names.push_back(
" initial_time ");
272 ODE_solver_restart_parameter_names.push_back(
" initial_time_step ");
274 std::vector<std::string> ODE_solver_restart_parameter_values;
275 ODE_solver_restart_parameter_values.push_back(
double_to_string(
ode_solver->current_desired_time_for_output_solution_every_dt_time_intervals));
276 ODE_solver_restart_parameter_values.push_back(std::to_string(
ode_solver->current_iteration));
278 ODE_solver_restart_parameter_values.push_back(
double_to_string(time_step_input));
285 std::vector<std::string> flow_solver_restart_parameter_names;
286 flow_solver_restart_parameter_names.push_back(
" output_restart_files ");
287 flow_solver_restart_parameter_names.push_back(
" restart_computation_from_file ");
288 flow_solver_restart_parameter_names.push_back(
" restart_file_index ");
290 std::vector<std::string> flow_solver_restart_parameter_values;
291 flow_solver_restart_parameter_values.push_back(std::string(
"true"));
292 flow_solver_restart_parameter_values.push_back(std::string(
"true"));
293 flow_solver_restart_parameter_values.push_back(std::to_string(restart_index_input));
297 std::vector<int> number_of_subsection_parameters;
298 number_of_subsection_parameters.push_back(ODE_solver_restart_parameter_names.size());
299 number_of_subsection_parameters.push_back(flow_solver_restart_parameter_names.size());
302 int i_subsection = 0;
306 while (std::getline(CURRENT_FILE, line)) {
308 if (line == subsection_line[i_subsection]) {
309 RESTART_FILE << line <<
"\n";
313 std::string value_string;
315 if (i_subsection==0) {
316 name = ODE_solver_restart_parameter_names[i_parameter];
317 value_string = ODE_solver_restart_parameter_values[i_parameter];
318 }
else if (i_subsection==1) {
319 name = flow_solver_restart_parameter_names[i_parameter];
320 value_string = flow_solver_restart_parameter_values[i_parameter];
323 while (line!=
"end") {
324 std::getline(CURRENT_FILE, line);
325 std::string::size_type found = line.find(name);
328 if (found!=std::string::npos) {
331 std::string updated_line = line;
332 std::string::size_type position_to_replace = line.find_last_of(
"=")+2;
333 std::string part_of_line_to_replace = line.substr(position_to_replace);
334 updated_line.replace(position_to_replace,part_of_line_to_replace.length(),value_string);
337 RESTART_FILE << updated_line <<
"\n";
340 if ((i_parameter+1) < number_of_subsection_parameters[i_subsection]) ++i_parameter;
341 if (i_subsection==0) {
342 name = ODE_solver_restart_parameter_names[i_parameter];
343 value_string = ODE_solver_restart_parameter_values[i_parameter];
344 }
else if (i_subsection==1) {
345 name = flow_solver_restart_parameter_names[i_parameter];
346 value_string = flow_solver_restart_parameter_values[i_parameter];
350 RESTART_FILE << line <<
"\n";
354 if ((i_subsection+1) < number_of_subsections) ++i_subsection;
357 RESTART_FILE << line <<
"\n";
364 template <
int dim,
int nspecies,
int nstate>
366 const unsigned int current_restart_index,
367 const double time_step_input,
368 const std::shared_ptr <dealii::TableHandler> unsteady_data_table)
const 370 pcout <<
" ... Writing restart files ... " << std::endl;
374 dealii::parallel::distributed::SolutionTransfer<dim, dealii::LinearAlgebra::distributed::Vector<double>, dealii::DoFHandler<dim>> solution_transfer(
dg->dof_handler);
377 solution_transfer.prepare_for_serialization(
dg->solution);
382 dealii::parallel::distributed::SolutionTransfer<dim, dealii::LinearAlgebra::distributed::Vector<double>, dealii::DoFHandler<dim>> time_averaged_solution_transfer(
dg->dof_handler);
383 time_averaged_solution_transfer.prepare_for_serialization(
dg->time_averaged_solution);
390 unsteady_data_table->write_text(unsteady_data_table_file);
398 template <
int dim,
int nspecies,
int nstate>
401 std::unique_ptr<MeshAdaptation<dim,nspecies,double>> meshadaptation = std::make_unique<MeshAdaptation<dim,nspecies,double>>(this->
dg, &(this->
all_param.
mesh_adaptation_param));
403 double residual_norm = this->dg->get_residual_l2norm();
405 pcout<<
"Running mesh adaptation cycles..."<<std::endl;
406 while (meshadaptation->current_mesh_adaptation_cycle < total_adaptation_cycles)
411 pcout<<
"Mesh adaptation is currently implemented for steady state flows and the current residual norm isn't sufficiently low. " 412 <<
"The solution has not converged. If p or hp adaptation is being used, issues with convergence might occur when integrating face terms with lower quad points at " 413 <<
"the face of adjacent elements with different p. Try increasing overintegration in the parameters file to fix it."<<std::endl;
417 meshadaptation->adapt_mesh();
419 residual_norm = this->
ode_solver->residual_norm;
423 pcout<<
"Finished running mesh adaptation cycles."<<std::endl;
426 template <
int dim,
int nspecies,
int nstate>
429 pcout <<
"Running Flow Solver..." << std::endl;
432 pcout <<
" ... Writing vtk solution file at initial time ..." << std::endl;
435 pcout <<
" ... Writing vtk solution file at initial time ..." << std::endl;
439 pcout <<
" ... Writing vtk solution file at initial time ..." << std::endl;
449 unsigned int index_of_current_desired_fixed_time_to_output_solution = 0;
455 if(this->
ode_solver->current_time < this->output_solution_fixed_times[i]) {
456 index_of_current_desired_fixed_time_to_output_solution = i;
472 double current_desired_time_for_output_restart_files_every_dt_time_intervals =
ode_solver->current_time;
473 unsigned int current_restart_file_number = 1;
476 while(current_desired_time_for_output_restart_files_every_dt_time_intervals <= ode_solver->current_time) {
488 double current_desired_time_for_write_unsteady_data_table_file_every_dt_time_intervals =
ode_solver->current_time;
490 while(current_desired_time_for_write_unsteady_data_table_file_every_dt_time_intervals <= ode_solver->current_time) {
497 double time_step = 0.0;
499 pcout <<
"WARNING: CFL-adaptation and error-adaptation cannot be used at the same time. Aborting!" << std::endl;
503 pcout <<
"Setting initial adaptive time step... " << std::flush;
506 pcout <<
"Setting initial error adaptive time step... " << std::flush;
507 time_step =
ode_solver->get_automatic_initial_step_size(time_step,
false);
509 pcout <<
"Setting constant time step... " << std::flush;
517 if(std::abs(time_step-restart_time_step) > 1E-13) {
518 pcout <<
"WARNING: Computed initial time step does not match value in restart parameter file within the tolerance. " 519 <<
"Diff is: " << std::abs(time_step-restart_time_step) << std::endl;
523 dg->set_unsteady_model_time_step(time_step);
524 pcout <<
"done." << std::endl;
528 std::shared_ptr<dealii::TableHandler> unsteady_data_table = std::make_shared<dealii::TableHandler>();
530 pcout <<
"Initializing data table from corresponding restart file... " << std::flush;
534 pcout <<
"done." << std::endl;
540 pcout <<
"Writing unsteady data computed at initial time... " << std::endl;
542 pcout <<
"done." << std::endl;
548 double next_time_step = time_step;
549 std::shared_ptr<dealii::TableHandler> timer_values_table = std::make_shared<dealii::TableHandler>();
550 pcout <<
"Advancing solution in time... " << std::endl;
551 pcout <<
"Timer starting. " << std::endl;
556 time_step = next_time_step;
563 const double next_time =
ode_solver->current_time + time_step;
566 const bool is_output_time = ((
ode_solver->current_time<desired_time) && (next_time>desired_time));
567 if(is_output_time) time_step = desired_time -
ode_solver->current_time;
572 dg->set_unsteady_model_time_step(time_step);
576 bool do_write_unsteady_data_table_file =
false;
578 const bool is_write_time = ((
ode_solver->current_time <= current_desired_time_for_write_unsteady_data_table_file_every_dt_time_intervals) &&
579 ((
ode_solver->current_time + time_step) > current_desired_time_for_write_unsteady_data_table_file_every_dt_time_intervals))
580 || (
ode_solver->current_time > current_desired_time_for_write_unsteady_data_table_file_every_dt_time_intervals);
582 do_write_unsteady_data_table_file =
true;
586 do_write_unsteady_data_table_file =
true;
606 next_time_step =
ode_solver->get_automatic_error_adaptive_step_size(time_step,
false);
617 const bool is_output_time = ((
ode_solver->current_time <= current_desired_time_for_output_restart_files_every_dt_time_intervals) &&
618 ((
ode_solver->current_time + next_time_step) > current_desired_time_for_output_restart_files_every_dt_time_intervals))
619 || (
ode_solver->current_time > current_desired_time_for_output_restart_files_every_dt_time_intervals);
620 if (is_output_time) {
621 output_restart_files(current_restart_file_number, next_time_step, unsteady_data_table);
623 current_restart_file_number += 1;
627 if (is_output_iteration) {
629 output_restart_files(file_number, next_time_step, unsteady_data_table);
638 if (is_output_iteration) {
639 pcout <<
" ... Writing vtk solution file ..." << std::endl;
641 dg->output_results_vtk(file_number,
ode_solver->current_time);
644 const bool is_output_time = ((
ode_solver->current_time <=
ode_solver->current_desired_time_for_output_solution_every_dt_time_intervals) &&
645 ((
ode_solver->current_time + next_time_step) >
ode_solver->current_desired_time_for_output_solution_every_dt_time_intervals))
646 || (
ode_solver->current_time >
ode_solver->current_desired_time_for_output_solution_every_dt_time_intervals);
647 if (is_output_time) {
648 pcout <<
" ... Writing vtk solution file ..." << std::endl;
650 dg->output_results_vtk(file_number,
ode_solver->current_time);
654 const double next_time =
ode_solver->current_time + next_time_step;
657 bool is_output_time =
false;
659 is_output_time =
ode_solver->current_time == desired_time;
661 is_output_time = ((
ode_solver->current_time<=desired_time) && (next_time>desired_time));
664 pcout <<
" ... Writing vtk solution file ..." << std::endl;
665 const int file_number = index_of_current_desired_fixed_time_to_output_solution+1;
666 dg->output_results_vtk(file_number,
ode_solver->current_time);
669 if(index_of_current_desired_fixed_time_to_output_solution
671 index_of_current_desired_fixed_time_to_output_solution += 1;
676 if(unsteady_FOM_POD_bool && nspecies==1){
678 if(is_snapshot_iteration) time_pod->addSnapshot(
dg->solution);
683 if(unsteady_FOM_POD_bool && nspecies==1){
684 std::ofstream snapshot_file(
"solution_snapshots_iteration_" + std::to_string(
ode_solver->current_iteration) +
".txt");
685 unsigned int precision = 16;
686 time_pod->dealiiSnapshotMatrix.print_formatted(snapshot_file, precision,
true, 0,
"0");
687 snapshot_file.close();
691 pcout <<
"Timer stopped. " << std::endl;
692 const double cpu_time = timer.cpu_time();
693 const double total_wall_time = dealii::Utilities::MPI::sum(timer.wall_time(), this->
mpi_communicator);
694 const double number_of_time_steps = (double)
ode_solver->current_iteration;
695 const double avg_cpu_time_per_time_step = cpu_time/number_of_time_steps;
696 const double avg_total_wall_time_per_time_step = total_wall_time/number_of_time_steps;
697 pcout <<
"Elapsed CPU time: " << cpu_time <<
" seconds." << std::endl;
698 pcout <<
"Elapsed total wall time (mpi max): " << total_wall_time <<
" seconds." << std::endl;
699 pcout <<
"Average CPU time per time step: " << avg_cpu_time_per_time_step <<
" seconds." << std::endl;
700 pcout <<
"Average total wall time per time step: " << avg_total_wall_time_per_time_step <<
" seconds." << std::endl;
704 flow_solver_case->add_value_to_data_table(cpu_time,
"total_cpu_time",timer_values_table);
705 flow_solver_case->add_value_to_data_table(total_wall_time,
"total_wall_time",timer_values_table);
706 flow_solver_case->add_value_to_data_table(avg_cpu_time_per_time_step,
"avg_cpu_time",timer_values_table);
707 flow_solver_case->add_value_to_data_table(avg_total_wall_time_per_time_step,
"avg_wall_time",timer_values_table);
708 std::string timing_table_filename = std::string(
"timer_values.txt");
709 std::ofstream timer_values_table_file(timing_table_filename);
710 timer_values_table->write_text(timer_values_table_file);
727 if(use_isotropic_mesh_adaptation)
732 pcout <<
"done." << std::endl;
736 #if PHILIP_SPECIES==1 744 #define POSSIBLE_NSTATE (1)(2)(3)(4)(5)(6) 747 #define INSTANTIATE_FLOWSOLVER(r, data, nstate) \ 748 template class FlowSolver <PHILIP_DIM, PHILIP_SPECIES,nstate>; 749 BOOST_PP_SEQ_FOR_EACH(INSTANTIATE_FLOWSOLVER, _, POSSIBLE_NSTATE)
bool do_compute_Reynolds_stress
Flag for computing time-averaged Reynolds stresses.
Proper Orthogonal Decomposition with Galerkin projection.
double output_solution_start_time
Time at which to start outputting the solution.
void write_restart_parameter_file(const unsigned int restart_index_input, const double constant_time_step_input) const
Writes a parameter file (.prm) for restarting the computation with.
double output_restart_files_every_dt_time_intervals
Outputs the restart files at time intervals of dt.
bool error_adaptive_time_step
Computes time step based on error.
bool steady_state
Flag for solving steady state solution.
bool adaptive_time_step
Flag for computing the time step on the fly.
const unsigned int number_of_fixed_times_to_output_solution
Number of fixed times to output the solution.
const double final_time
Final time of solution.
Selects which flow case to simulate.
const MPI_Comm mpi_communicator
MPI communicator.
const Parameters::FlowSolverParam flow_solver_param
Flow solver parameters.
dealii::Table< 1, double > output_solution_fixed_times
Fixed times at which to output the solution.
const Parameters::ODESolverParam ode_param
ODE solver parameters.
const std::string input_parameters_file_reference_copy_filename
Name of the reference copy of inputted parameters file; for restart purposes.
bool restart_computation_from_file
Restart computation from restart file.
int output_solution_every_x_steps
Outputs the solution every x steps to .vtk file.
int total_mesh_adaptation_cycles
Total/maximum number of mesh adaptation cycles while solving a problem.
Proper Orthogonal Decomposition with Petrov-Galerkin projection (LSPG) and ECSW Hyper-reduction.
bool output_restart_files
Output the restart files.
Files for the baseline physics.
int run() const override
Simply runs the flow solver and returns 0 upon completion.
double time_to_start_averaging
Flag for starting time-averaged solution.
const int mpi_rank
MPI rank.
ReducedOrderModelParam reduced_order_param
Contains parameters for the Reduced-Order model.
const bool output_solution_at_exact_fixed_times
Flag for outputting the solution at exact fixed times by decreasing the time step on the fly...
Explicit RK using the relaxation Runge-Kutta method (Ketcheson, 2019)
ODESolverEnum
Types of ODE solver.
double output_solution_every_dt_time_intervals
Outputs the solution every dt time intervals to .vtk file.
Main parameter class that contains the various other sub-parameter classes.
bool allocate_matrix_dRdW
Flag to signal that automatic differentiation (AD) matrix dRdW must be allocated. ...
MeshAdaptationParam mesh_adaptation_param
Constains parameters for mesh adaptation.
bool steady_state_polynomial_ramping
Flag for steady state polynomial ramping.
double write_unsteady_data_table_file_every_dt_time_intervals
Writes the unsteady data table file at time intervals of dt.
const dealii::ParameterHandler & parameter_handler
Parameter handler for storing the .prm file being ran.
MeshAdaptationType mesh_adaptation_type
Selection of mesh adaptation type.
const unsigned int poly_degree
Polynomial order.
std::string output_solution_fixed_times_string
String of fixed solution output times.
This class creates a new DGBase object.
double initial_time_step
Time step used in ODE solver.
std::shared_ptr< FlowSolverCaseBase< dim, nspecies, nstate > > flow_solver_case
Pointer to Flow Solver Case.
unsigned int restart_file_index
Index of desired restart file for restarting the computation from.
void perform_steady_state_mesh_adaptation() const
Performs mesh adaptation.
static void set_initial_condition(std::shared_ptr< InitialConditionFunction< dim, nspecies, nstate, double > > initial_condition_function_input, std::shared_ptr< PHiLiP::DGBase< dim, nspecies, real > > dg_input, const Parameters::AllParameters *const parameters_input)
Applies the given initial condition function to the given dg object.
double nonlinear_steady_residual_tolerance
Tolerance to determine steady-state convergence.
int output_restart_files_every_x_steps
Outputs the restart files every x steps.
bool do_compute_time_averaged_solution
Flag for computing time-averaged solution.
const bool do_compute_unsteady_data_and_write_to_table
Flag for computing unsteady data and writting to table.
std::vector< std::string > get_data_table_column_names(const std::string string_input) const
bool end_exactly_at_final_time
Flag to adjust the last timestep such that the simulation ends exactly at final_time.
std::shared_ptr< DGBase< dim, nspecies, double > > dg
Pointer to dg so it can be accessed externally.
ODESolverEnum ode_solver_type
ODE solver type.
std::shared_ptr< ODE::ODESolverBase< dim, nspecies, double > > ode_solver
Pointer to ode solver so it can be accessed externally.
std::string unsteady_data_table_filename
const Parameters::AllParameters all_param
All parameters.
int output_snapshot_every_x_timesteps
Number of timesteps before putting solution in snapshot matrix.
std::string get_restart_filename_without_extension(const unsigned int restart_index_input) const
Returns the restart filename without extension given a restart index (adds padding appropriately) ...
std::string restart_files_directory_name
Name of directory for writing and reading restart files.
static std::shared_ptr< ODESolverBase< dim, nspecies, real, MeshType > > create_ODESolver(std::shared_ptr< DGBase< dim, nspecies, real, MeshType > > dg_input)
Creates either implicit or explicit ODE solver based on parameter value(no POD basis given) ...
Base class of all the flow solvers.
const bool do_output_solution_at_fixed_times
Flag for outputting solution at fixed times.
dealii::ConditionalOStream pcout
ConditionalOStream.
void initialize_data_table_from_file(std::string data_table_filename_with_extension, const std::shared_ptr< dealii::TableHandler > data_table) const
Initializes the data table from an existing file.
std::string double_to_string(const double value_input) const
Converts a double to a string with scientific format and with full precision.