12 #define BOOST_ALLOW_DEPRECATED_HEADERS
14 #include "deal.II/base/multithread_info.h"
20 #include "project_PHI_to_D.hpp"
21 #include "project_PHI_to_E.hpp"
36 if (nr_threads_max > 0)
37 MultithreadInfo::set_thread_limit(nr_threads_max);
40 (CYLINDER__ == 1) ?
"Data/cylinder-axi/" :
"Data/sphere-axi/";
43 unsigned int mapping_degree = (CYLINDER__ == 1) ? 1 : 2;
45 std::cout <<
"Program: int-axi\n"
46 <<
"Dimensions: " << 2 <<
"\n"
47 <<
"Condition: Cylinder = " << CYLINDER__ <<
"\n"
48 <<
"Mapping degree = " << mapping_degree <<
"\n"
49 <<
"Writing to: " << dir <<
"\n";
55 for (
unsigned int p = 1; p < 4; p++) {
61 for (
unsigned int r = 9; r < 13; r++)
64 for (
unsigned int r = 5; r < 9; r++)
67 fname = dir +
"solution_PHI_p" + std::to_string(p) +
"_r" +
70 table_PHI.add_value(
"r", r);
71 table_PHI.add_value(
"p", p);
74 std::cout <<
"Time table PHI \n";
77 p, mapping_degree, r, fname);
78 table_PHI.add_value(
"ndofs", problem.get_n_dofs());
79 table_PHI.add_value(
"ncells", problem.get_n_cells());
80 table_PHI.add_value(
"L2", problem.get_L2_norm());
81 table_PHI.add_value(
"H1", problem.get_H1_norm());
86 fname = dir +
"solution_E" +
"_p" + std::to_string(p) +
"_r" +
89 table_E.add_value(
"r", r);
90 table_E.add_value(
"p", p);
93 std::cout <<
"Time table E \n";
97 ProjectPHItoE projector(p - 1,
98 problem.get_mapping_degree(),
100 problem.get_dof_handler(),
101 problem.get_solution(),
110 table_E.add_value(
"ndofs", projector.get_n_dofs());
111 table_E.add_value(
"ncells", projector.get_n_cells());
112 table_E.add_value(
"L2", projector.get_L2_norm());
113 table_E.add_value(
"H1", 0.0);
116 fname = dir +
"solution_D" +
"_p" + std::to_string(p) +
"_r" +
119 table_D.add_value(
"r", r);
120 table_D.add_value(
"p", p);
123 std::cout <<
"Time table D \n";
127 ProjectPHItoD projector(p - 1,
128 problem.get_mapping_degree(),
130 problem.get_dof_handler(),
131 problem.get_solution(),
140 table_D.add_value(
"ndofs", projector.get_n_dofs());
141 table_D.add_value(
"ncells", projector.get_n_cells());
142 table_D.add_value(
"L2", projector.get_L2_norm() / ep_0);
143 table_D.add_value(
"H1", 0.0);
147 std::cout <<
"Table PHI\n";
148 table_PHI.
save(dir +
"table_PHI_p" + std::to_string(p));
150 std::cout <<
"Table E\n";
151 table_E.
save(dir +
"table_E_p" + std::to_string(p));
153 std::cout <<
"Table D\n";
154 table_D.
save(dir +
"table_D_p" + std::to_string(p));
165 }
catch (std::exception& exc) {
166 std::cerr << std::endl
168 <<
"----------------------------------------------------"
170 std::cerr <<
"Exception on processing: " << std::endl
171 << exc.what() << std::endl
172 <<
"Aborting!" << std::endl
173 <<
"----------------------------------------------------"
177 std::cerr << std::endl
179 <<
"----------------------------------------------------"
181 std::cerr <<
"Unknown exception!" << std::endl
182 <<
"Aborting!" << std::endl
183 <<
"----------------------------------------------------"
This is a wrap-around class. It contains the main loop of the program that implements the Axisymmetri...
Describes exact solution, , of the Axisymmetric - interface between dielectrics (int-axi/) numerical ...
Describes exact solution, , of the Axisymmetric - interface between dielectrics (int-axi/) numerical ...
The convergence table used in multiple numerical experiments.
void save(std::string fname)
Saves the data in text and tex formats, and prints the data on screen.
Global settings for the Axisymmetric - interface between dielectrics (int-axi/) numerical experiment.
const bool print_time_tables
If set to true, the program will print time tables on the screen.
const bool project_exact_solution
If set to true, the program will project the exact solution.
const bool log_cg_convergence
If set to true, saves the residual at each iteration of the CG solver. The names of the files fit the...
const bool print_time_tables
If set to true, the program will print time tables on the screen.
Implements the Axisymmetric - interface between dielectrics (int-axi/) numerical experiment.