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-i-axi\n"
44 <<
"Dimensions: " << 2 <<
"\n"
45 <<
"Writing to: " << dir <<
"\n";
50 for (
unsigned int p = 1; p < 4; p++) {
54 for (
unsigned int r = 15; r < 19;
57 dir +
"solution_A_p" + std::to_string(p) +
"_r" + std::to_string(r);
59 table_A.add_value(
"r", r);
60 table_A.add_value(
"p", p);
63 std::cout <<
"Time table A \n";
66 table_A.add_value(
"ndofs", problem.
get_n_dofs());
68 table_A.add_value(
"L2", problem.
get_L2_norm() / mu_0);
69 table_A.add_value(
"H1", problem.
get_H1_norm() / mu_0);
74 dir +
"solution_B_p" + std::to_string(p) +
"_r" + std::to_string(r);
76 table_B.add_value(
"r", r);
77 table_B.add_value(
"p", p);
80 std::cout <<
"Time table B \n";
84 ProjectAphiToBrz projector(p - 1,
96 table_B.add_value(
"ndofs", projector.get_n_dofs());
97 table_B.add_value(
"ncells", projector.get_n_cells());
98 table_B.add_value(
"L2", projector.get_L2_norm() / mu_0);
99 table_B.add_value(
"H1", 0.0);
103 std::cout <<
"Table A\n";
104 table_A.
save(dir +
"table_A_p" + std::to_string(p));
106 std::cout <<
"Table B\n";
107 table_B.
save(dir +
"table_B_p" + std::to_string(p));
118 }
catch (std::exception& exc) {
119 std::cerr << std::endl
121 <<
"----------------------------------------------------"
123 std::cerr <<
"Exception on processing: " << std::endl
124 << exc.what() << std::endl
125 <<
"Aborting!" << std::endl
126 <<
"----------------------------------------------------"
130 std::cerr << std::endl
132 <<
"----------------------------------------------------"
134 std::cerr <<
"Unknown exception!" << std::endl
135 <<
"Aborting!" << std::endl
136 <<
"----------------------------------------------------"
This is a wrap-around class. It contains the main loop of the program that implements the Axisymmetri...
Describes exact solution, , of the Axisymmetric - thin spherical coil (ssol-i-axi) numerical experime...
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 - thin spherical coil (ssol-i-axi) numerical experiment.
const bool print_time_tables
If set to true, the program will print the time tables on the screen.
Implements the Axisymmetric - thin spherical coil (ssol-i-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 ...