3 template <
int dim,
typename T>
9 std::cout <<
"\nTesting 'load_BC_list'... " << std::endl;
13 inputFileReader input_file_reader(
"parameters_test.in",variable_attributes);
17 std::vector<std::string> list_of_BCs;
18 list_of_BCs.push_back(
"DIRICHLET: 2.5");
19 list_of_BCs.push_back(
"PERIODIC,PERIODIC,NATURAL,NATURAL");
20 list_of_BCs.push_back(
"DIRICHLET: 2.5,DIRICHLET: 1.5,NATURAL,NATURAL");
26 pass1 = userInputs.
BC_list.size() == 3;
27 pass1 = pass1 && (userInputs.
BC_list[0].var_BC_type.size() == 4);
28 for (
unsigned int i=0; i<userInputs.
BC_list[0].var_BC_type.size(); i++){
30 pass1 = pass1 && (userInputs.
BC_list[0].var_BC_val[i] == 2.5);
32 sprintf (buffer,
"Subtest 1 result for 'load_BC_list': %u\n", pass1);
38 pass2 = pass2 && (userInputs.
BC_list[1].var_BC_type[2] ==
NATURAL);
39 pass2 = pass2 && (userInputs.
BC_list[1].var_BC_type[3] ==
NATURAL);
40 sprintf (buffer,
"Subtest 2 result for 'load_BC_list': %u\n", pass2);
45 pass3 = pass3 && (userInputs.
BC_list[2].var_BC_val[0] == 2.5);
47 pass3 = pass3 && (userInputs.
BC_list[2].var_BC_val[1] == 1.5);
48 pass3 = pass3 && (userInputs.
BC_list[2].var_BC_type[2] ==
NATURAL);
49 pass3 = pass3 && (userInputs.
BC_list[2].var_BC_type[3] ==
NATURAL);
50 sprintf (buffer,
"Subtest 3 result for 'load_BC_list': %u\n", pass3);
56 list_of_BCs.push_back(
"DIRICHLET: 2.5");
57 list_of_BCs.push_back(
"PERIODIC,PERIODIC,NATURAL,NATURAL,PERIODIC,PERIODIC");
62 pass4 = userInputs_3D.
BC_list.size() == 2;
63 pass4 = pass4 && (userInputs_3D.
BC_list[0].var_BC_type.size() == 6);
64 for (
unsigned int i=0; i<userInputs_3D.
BC_list[0].var_BC_type.size(); i++){
66 pass4 = pass4 && (userInputs_3D.
BC_list[0].var_BC_val[i] == 2.5);
68 sprintf (buffer,
"Subtest 4 result for 'load_BC_list': %u\n", pass4);
74 pass5 = pass5 && (userInputs_3D.
BC_list[1].var_BC_type[2] ==
NATURAL);
75 pass5 = pass5 && (userInputs_3D.
BC_list[1].var_BC_type[3] ==
NATURAL);
78 sprintf (buffer,
"Subtest 5 result for 'load_BC_list': %u\n", pass5);
82 pass = pass1 && pass2 && pass3 && pass4 && pass5;
84 sprintf (buffer,
"Test result for 'load_BC_list': %u\n", pass);