12 #define BOOST_ALLOW_DEPRECATED_HEADERS
14 #include <deal.II/base/timer.h>
19 #include "project_A_to_B.hpp"
22 #include "deal.II/base/multithread_info.h"
36 if (nr_threads_max > 0)
37 MultithreadInfo::set_thread_limit(nr_threads_max);
39 std::string dir =
"Data/sphere/";
42 std::cout <<
"Program: ssol-i\n"
45 <<
"Writing to: " << dir <<
"\n";
49 for (
unsigned int p = 0; p < 3; p++) {
52 for (
unsigned int r = 6; r < 10; r++) {
55 std::cout <<
"Solving for A ...\n";
58 dir +
"solution_A_p" + std::to_string(p) +
"_r" + std::to_string(r);
61 std::cout <<
"Time table A \n";
68 std::cout <<
"Projecting A in H(curl) to B in H(div) ...\n";
71 dir +
"solution_B_p" + std::to_string(p) +
"_r" + std::to_string(r);
73 table_B.add_value(
"r", r);
74 table_B.add_value(
"p", p);
77 std::cout <<
"Time table B \n";
81 ProjectAtoB projector(p,
93 table_B.add_value(
"ndofs", projector.get_n_dofs());
94 table_B.add_value(
"ncells", projector.get_n_cells());
95 table_B.add_value(
"L2", projector.get_L2_norm());
96 table_B.add_value(
"H1", 0.0);
99 std::cout <<
"Table B\n";
100 table_B.
save(dir +
"table_B_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 Thin spheri...
Describes the exact solution, , of the Thin spherical coil (ssol-i/) numerical experiment.
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 Thin spherical coil (ssol-i/) numerical experiment.
const bool print_time_tables
If set to true, the program will print time tables on the screen.
Solves for the magnetic vector potential, , in the Thin spherical coil (ssol-i/) numerical experiment...
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.