12 #define BOOST_ALLOW_DEPRECATED_HEADERS
14 #include <deal.II/base/multithread_info.h>
15 #include <deal.II/base/timer.h>
21 #include "project_Tz_to_Jxy.hpp"
24 #include "settings.hpp"
27 using namespace StaticScalarSolver;
39 if (nr_threads_max > 0)
40 MultithreadInfo::set_thread_limit(nr_threads_max);
43 std::string dir =
"Data/circle-linear/";
45 std::cout <<
"Program: cvp-ii\n"
47 <<
"Writing to: " << dir <<
"\n";
52 for (
unsigned int p = 1; p < 4; p++) {
56 for (
unsigned int r = 12; r < 16; r++) {
57 std::cout <<
"Solving for T ...\n";
60 dir +
"solution_T_p" + std::to_string(p) +
"_r" + std::to_string(r);
62 table_T.add_value(
"r", r);
63 table_T.add_value(
"p", p);
66 std::cout <<
"Time table\n";
71 table_T.add_value(
"ndofs", problem.
get_n_dofs());
76 std::cout <<
"Converting T to J. \n";
79 dir +
"solution_J_p" + std::to_string(p) +
"_r" + std::to_string(r);
81 table_J.add_value(
"r", r);
82 table_J.add_value(
"p", p);
87 std::cout <<
"Time table\n";
101 table_J.add_value(
"ndofs", projector.
get_n_dofs());
102 table_J.add_value(
"ncells", projector.
get_n_cells());
104 table_J.add_value(
"H1", 0.0);
107 std::cout <<
"Table T\n";
108 table_T.
save(dir +
"table_T_p" + std::to_string(p));
110 std::cout <<
"Table J\n";
111 table_J.
save(dir +
"table_J_p" + std::to_string(p));
122 }
catch (std::exception& exc) {
123 std::cerr << std::endl
125 <<
"----------------------------------------------------"
127 std::cerr <<
"Exception on processing: " << std::endl
128 << exc.what() << std::endl
129 <<
"Aborting!" << std::endl
130 <<
"----------------------------------------------------"
134 std::cerr << std::endl
136 <<
"----------------------------------------------------"
138 std::cerr <<
"Unknown exception!" << std::endl
139 <<
"Aborting!" << std::endl
140 <<
"----------------------------------------------------"
This is a wrap-around class. It contains the main loop of the program that implements the Current vec...
Describes the given volume free-current density, , in the Current vector potential (cvp-ii/) numerica...
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 Current vector potential (cvp-ii/) 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 solver of the Current vector potential (cvp-ii/) numerical experiment.
double get_L2_norm()
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.
Computes the two-dimensional free-current density as a vector curl of the current vector potential,...
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.