12 #define BOOST_ALLOW_DEPRECATED_HEADERS
14 #include "deal.II/base/multithread_info.h"
20 #include "project_Aphi_to_Brz.hpp"
21 #include "project_Aphi_to_Hrz.hpp"
37 if (nr_threads_max > 0)
38 MultithreadInfo::set_thread_limit(nr_threads_max);
40 std::string dir =
"Data/circle/";
43 std::cout <<
"Program: ssol-ii-axi\n"
44 <<
"Dimensions: " << 2 <<
"\n"
45 <<
"Writing to: " << dir <<
"\n";
51 for (
unsigned int p = 1; p < 4; p++) {
56 for (
unsigned int r = 15; r < 19; r++) {
58 dir +
"solution_A_p" + std::to_string(p) +
"_r" + std::to_string(r);
60 table_A.add_value(
"r", r);
61 table_A.add_value(
"p", p);
64 std::cout <<
"Time table A \n";
67 table_A.add_value(
"ndofs", problem.
get_n_dofs());
69 table_A.add_value(
"L2", problem.
get_L2_norm() / mu_0);
70 table_A.add_value(
"H1", problem.
get_H1_norm() / mu_0);
75 dir +
"solution_H_p" + std::to_string(p) +
"_r" + std::to_string(r);
77 table_H.add_value(
"r", r);
78 table_H.add_value(
"p", p);
81 std::cout <<
"Time table H \n";
85 ProjectAphiToHrz projector(p - 1,
97 table_H.add_value(
"ndofs", projector.get_n_dofs());
98 table_H.add_value(
"ncells", projector.get_n_cells());
99 table_H.add_value(
"L2", projector.get_L2_norm());
100 table_H.add_value(
"H1", 0.0);
104 dir +
"solution_B_p" + std::to_string(p) +
"_r" + std::to_string(r);
106 table_B.add_value(
"r", r);
107 table_B.add_value(
"p", p);
110 std::cout <<
"Time table D \n";
114 ProjectAphiToBrz projector(p - 1,
126 table_B.add_value(
"ndofs", projector.get_n_dofs());
127 table_B.add_value(
"ncells", projector.get_n_cells());
128 table_B.add_value(
"L2", projector.get_L2_norm() / mu_0);
129 table_B.add_value(
"H1", 0.0);
133 std::cout <<
"Table A\n";
134 table_A.
save(dir +
"table_A_p" + std::to_string(p));
136 std::cout <<
"Table H\n";
137 table_H.
save(dir +
"table_H_p" + std::to_string(p));
139 std::cout <<
"Table B\n";
140 table_B.
save(dir +
"table_B_p" + std::to_string(p));
151 }
catch (std::exception& exc) {
152 std::cerr << std::endl
154 <<
"----------------------------------------------------"
156 std::cerr <<
"Exception on processing: " << std::endl
157 << exc.what() << std::endl
158 <<
"Aborting!" << std::endl
159 <<
"----------------------------------------------------"
163 std::cerr << std::endl
165 <<
"----------------------------------------------------"
167 std::cerr <<
"Unknown exception!" << std::endl
168 <<
"Aborting!" << std::endl
169 <<
"----------------------------------------------------"
This is a wrap-around class. It contains the main loop of the program that implements the Axisymmetri...
Describes exact solutions, , of the Axisymmetric - thick spherical coil (ssol-ii-axi) numerical exper...
Describes exact solution, , of the Axisymmetric - thick spherical coil (ssol-ii-axi) numerical experi...
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.
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.
Global settings for the Axisymmetric - thick spherical coil (ssol-ii-axi) numerical experiment.
const bool print_time_tables
If set to true, the program will print time tables on the screen.
Implements the Axisymmetric - thick spherical coil (ssol-ii-axi) numerical experiment.
const Triangulation< dim > & get_tria() const
Returns a reference to triangulation.
const Vector< double > & get_solution() const
Returns a reference to the solution.
double get_L2_norm() const
Returns error norm.
void clear()
Releases computer memory associated with the system matrix and right-hand side.
const DoFHandler< dim > & get_dof_handler() const
Returns a reference to dof handler.
double get_H1_norm() const
Returns error norm.
unsigned int get_n_dofs() const
Returns the total amount of the degrees of freedom.
unsigned int get_n_cells() const
Returns the number of active cells in the mesh.
unsigned int get_mapping_degree() const
Returns degree of the interpolating Lagrange polynomials used for mapping from the reference cell to ...