3 template <
int dim,
typename T>
7 std::cout <<
"\nTesting 'setOutputTimeSteps' via the public 'loadInputParameters' method...'" << std::endl;
9 dealii::ParameterHandler parameter_handler;
11 inputFileReader input_file_reader(
"parameters_test.in",variable_attributes);
12 std::vector<fieldType> var_types;
13 var_types.push_back(
SCALAR);
14 std::vector<PDEType> var_eq_types;
16 std::vector<bool> var_nucleates;
17 var_nucleates.push_back(
false);
18 input_file_reader.
declare_parameters(parameter_handler,var_types,var_eq_types,0,var_nucleates);
19 #if (DEAL_II_VERSION_MAJOR < 9 && DEAL_II_VERSION_MINOR < 5) 20 parameter_handler.read_input(
"parameters_test.in");
22 parameter_handler.parse_input(
"parameters_test.in");
28 parameter_handler.set(
"Output condition",
"EQUAL_SPACING");
36 std::vector<unsigned int> expected_result = {0, 2000, 4000, 6000, 8000, 10000, 12000, 14000, 16000, 18000, 20000};
45 sprintf (buffer,
"Subtest 1 for 'setOutputTimeSteps' (EQUAL_SPACING) result: %u\n", pass1);
49 parameter_handler.set(
"Output condition",
"LOG_SPACING");
52 expected_result = {0,3,7,20,53,141,381,1025,2759,7429,20000};
61 sprintf (buffer,
"Subtest 2 for 'setOutputTimeSteps' (LOG_SPACING) result: %u\n", pass2);
65 parameter_handler.set(
"Output condition",
"N_PER_DECADE");
68 expected_result = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100,
69 200, 300, 400, 500, 600, 700, 800, 900, 1000, 2000, 3000, 4000, 5000, 6000, 7000,
70 8000, 9000, 10000, 20000};
79 sprintf (buffer,
"Subtest 3 for 'setOutputTimeSteps' (N_PER_DECADE) result: %u\n", pass3);
83 parameter_handler.set(
"Output condition",
"LIST");
86 expected_result = {0, 3, 55, 61};
95 sprintf (buffer,
"Subtest 4 for 'setOutputTimeSteps' (LIST) result: %u\n", pass4);
99 if (pass4 && pass3 && pass2 && pass1) {
103 sprintf (buffer,
"Test result for 'setOutputTimeSteps': %u\n", pass);
bool test_setOutputTimeSteps()