12 #define BOOST_ALLOW_DEPRECATED_HEADERS
14 #include <deal.II/base/multithread_info.h>
15 #include <deal.II/base/timer.h>
21 #include "project_A_to_B.hpp"
22 #include "project_Axy_to_Bz.hpp"
23 #include "settings.hpp"
27 using namespace StaticVectorSolver;
39 if (nr_threads_max > 0)
40 MultithreadInfo::set_thread_limit(nr_threads_max);
42 Assert(DIMENSION__ < 4, ExcInternalError());
43 Assert(DIMENSION__ > 1, ExcInternalError());
48 unsigned int mapping_degree;
50 if (HYPERCUBE__ == 1) {
51 dir = (DIMENSION__ == 2) ?
"Data/square/" :
"Data/cube/";
54 dir = (DIMENSION__ == 2) ?
"Data/circle/" :
"Data/sphere/";
58 std::cout <<
"Program: mms-v\n"
59 <<
"Dimensions: " << DIMENSION__ <<
"\n"
60 <<
"Writing to: " << dir <<
"\n";
66 for (
unsigned int p = 0; p < 3; p++) {
68 for (
unsigned int r = 5; r < 9; r++) {
69 std::cout <<
"Solving for A ...\n";
72 dir +
"solution_A_p" + std::to_string(p) +
"_r" + std::to_string(r);
74 table.add_value(
"r", r);
75 table.add_value(
"p", p);
79 std::cout <<
"Projecting A in H(curl) to B in H(div) ...\n";
83 dir +
"solution_B_p" + std::to_string(p) +
"_r" + std::to_string(r);
99 dir +
"solution_B_p" + std::to_string(p) +
"_r" + std::to_string(r);
113 table.add_value(
"ndofs", problem.
get_n_dofs());
116 table.add_value(
"H1", 0.0);
118 table.
save(dir +
"main_table_p" + std::to_string(p));
129 }
catch (std::exception& exc) {
130 std::cerr << std::endl
132 <<
"----------------------------------------------------"
134 std::cerr <<
"Exception on processing: " << std::endl
135 << exc.what() << std::endl
136 <<
"Aborting!" << std::endl
137 <<
"----------------------------------------------------"
141 std::cerr << std::endl
143 <<
"----------------------------------------------------"
145 std::cerr <<
"Unknown exception!" << std::endl
146 <<
"Aborting!" << std::endl
147 <<
"----------------------------------------------------"
This is a wrap-around class. It contains the main loop of the program that implements the Method of m...
Describes exact solutions, , of the Method of manufactured solutions, vector potential (mms-v/) numer...
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 Method of manufactured solutions, vector potential (mms-v/) numerical experim...
Implements the Method of manufactured solutions, vector potential (mms-v/) numerical experiment.
Computes the magnetic field as a curl of the magnetic vector potential, , i.e., .
Computes an out-of-plane magnetic field, , as a scalar curl of an in-plane magnetic vector potential,...
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.
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.