1 #include "khi_robustness.h" 2 #include "flow_solver/flow_solver_factory.h" 3 #include "flow_solver/flow_solver_cases/periodic_entropy_tests.h" 8 template <
int dim,
int nstate>
11 const dealii::ParameterHandler ¶meter_handler_input)
13 , parameter_handler(parameter_handler_input)
16 template <
int dim,
int nstate>
27 template <
int dim,
int nstate>
30 const unsigned int n_runs = 2;
32 const double A_range[n_runs] = {0.8,0.9};
33 double end_times[n_runs] = {0};
35 for (
unsigned int i_run = 0; i_run < n_runs; ++i_run){
36 this->
pcout <<
"--------------------------------------------------------------------" << std::endl
37 <<
" Starting run for A = " << A_range[i_run] << std::endl
38 <<
"--------------------------------------------------------------------" << std::endl;
47 static_cast<void>(flow_solver->run());
50 this->
pcout <<
"WARNING: Flow simulation did not reach end_time. Crash at t = " << end << std::endl;
53 end_times[i_run] = flow_solver->ode_solver->current_time;
55 this->
pcout <<
"End times for all runs so far:" << std::endl;
56 for (
unsigned int j = 0; j < i_run+1; ++j){
57 this->
pcout <<
" A = " << A_range[j] <<
" end_time = " << end_times[j] << std::endl;
59 this->
pcout << std::endl << std::endl;
62 std::ofstream current_end_times;
63 current_end_times.open(
"khi_end_times.txt");
64 for (
unsigned int j = 0; j < i_run+1; ++j){
65 current_end_times << A_range[j] <<
" " << end_times[j] << std::endl;
67 current_end_times.close();
const dealii::ParameterHandler & parameter_handler
Parameter handler for storing the .prm file being ran.
KHIRobustness(const Parameters::AllParameters *const parameters_input, const dealii::ParameterHandler ¶meter_handler_input)
Constructor.
FlowSolverParam flow_solver_param
Contains the parameters for simulation cases (flow solver test)
Files for the baseline physics.
Main parameter class that contains the various other sub-parameter classes.
static std::unique_ptr< FlowSolver< dim, nstate > > select_flow_case(const Parameters::AllParameters *const parameters_input, const dealii::ParameterHandler ¶meter_handler_input)
Factory to return the correct flow solver given input file.
const Parameters::AllParameters *const all_parameters
Pointer to all parameters.
const int mpi_rank
MPI rank.
std::string unsteady_data_table_filename
double atwood_number
For KHI, the atwood number.
dealii::ConditionalOStream pcout
ConditionalOStream.
Parameters::AllParameters reinit_params(double atwood_number) const
Reinit parameters based on a specified Atwood number.
Base class of all the tests.
int run_test() const override
Run test.