12 #define BOOST_ALLOW_DEPRECATED_HEADERS
14 #include <deal.II/base/multithread_info.h>
15 #include <deal.II/base/timer.h>
21 #include "project_T_to_J.hpp"
24 #include "settings.hpp"
27 using namespace StaticVectorSolver;
39 if (nr_threads_max > 0)
40 MultithreadInfo::set_thread_limit(nr_threads_max);
43 std::string dir =
"Data/sphere-linear/";
45 std::cout <<
"Program: cvp-i\n"
48 <<
"Writing to: " << dir <<
"\n";
52 for (
unsigned int p = 0; p < 3; p++) {
55 for (
unsigned int r = 12; r < 16; r++) {
56 std::cout <<
"Solving for T. \n";
59 dir +
"solution_T_p" + std::to_string(p) +
"_r" + std::to_string(r);
62 std::cout <<
"Time table\n";
67 std::cout <<
"Converting T to J. \n";
70 dir +
"solution_J_p" + std::to_string(p) +
"_r" + std::to_string(r);
72 table_J.add_value(
"r", r);
73 table_J.add_value(
"p", p);
78 std::cout <<
"Time table\n";
92 table_J.add_value(
"ndofs", projector.
get_n_dofs());
93 table_J.add_value(
"ncells", projector.
get_n_cells());
95 table_J.add_value(
"H1", 0.0);
99 std::cout <<
"Table J\n";
100 table_J.
save(dir +
"table_J_p" + std::to_string(p));
111 }
catch (std::exception& exc) {
112 std::cerr << std::endl
114 <<
"----------------------------------------------------"
116 std::cerr <<
"Exception on processing: " << std::endl
117 << exc.what() << std::endl
118 <<
"Aborting!" << std::endl
119 <<
"----------------------------------------------------"
123 std::cerr << std::endl
125 <<
"----------------------------------------------------"
127 std::cerr <<
"Unknown exception!" << std::endl
128 <<
"Aborting!" << std::endl
129 <<
"----------------------------------------------------"
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-i/) 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 Current vector potential (cvp-i/) 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-i/) numerical experiment.
double get_L2_norm()
Returns error norm.
unsigned int get_n_cells() const
Returns the number of active cells in the mesh.
unsigned int get_n_dofs() const
Returns the total amount of the degrees of freedom.
Computes the volume free-current density as a curl of the current vector potential,...
const DoFHandler< dim > & get_dof_handler() const
Returns a reference to dof handler.
const Vector< double > & get_solution() const
Returns a reference to solution.
const Triangulation< dim > & get_tria() const
Returns a reference to triangulation.
void clear()
Releases computer memory associated with system matrix and right-hand side.