12 #ifndef SolverMMSAXI_H__
13 #define SolverMMSAXI_H__
15 #define BOOST_ALLOW_DEPRECATED_HEADERS
17 #include <deal.II/base/function.h>
18 #include <deal.II/grid/grid_generator.h>
19 #include <deal.II/grid/grid_in.h>
20 #include <deal.II/grid/grid_out.h>
21 #include <deal.II/grid/grid_tools.h>
23 #include <deal.II/numerics/fe_field_function.h>
25 #include "exact_solution.hpp"
26 #include "settings.hpp"
27 #include "static_scalar_solver.hpp"
29 #define TMR(__name) TimerOutput::Scope timer_section(timer, __name)
31 using namespace StaticScalarSolver;
72 project_exact_solution)
77 fname_mesh =
"../../gmsh/data/cylinder_2d_r" + std::to_string(r) +
".msh";
80 fname_mesh =
"../../gmsh/data/cylinder_3d_r" + std::to_string(r) +
".msh";
83 TimerOutput::OutputFrequency tf =
84 (print_time_tables) ? TimerOutput::summary : TimerOutput::never;
86 TimerOutput timer(std::cout, tf, TimerOutput::cpu_and_wall_times_grouped);
98 const std::string fname;
101 std::string fname_mesh;
103 virtual void make_mesh() override final;
104 virtual
void fill_dirichlet_stack() override final;
105 virtual
void solve() override final;
122 std::ifstream ifs(fname_mesh);
123 gridin.read_msh(ifs);
135 if (log_cg_convergence)
136 control.enable_history_data();
138 GrowingVectorMemory<Vector<double>> memory;
139 SolverCG<Vector<double>> cg(control, memory);
141 PreconditionJacobi<SparseMatrix<double>> preconditioner;
151 if (log_cg_convergence) {
152 const std::vector<double> history_data = control.get_history_data();
154 std::ofstream ofs(fname +
"_cg_convergence.csv");
157 for (
auto item : history_data) {
158 ofs << i <<
", " << item <<
"\n";
Describes the exact solution, , of the Axisymmetric - method of manufactured solutions (mms-axi/) num...
Global settings for the Axisymmetric - method of manufactured solutions (mms-axi/) numerical experime...
Implements the Axisymmetric - method of manufactured solutions (mms-axi/) numerical experiment.
SolverMMSAXI(unsigned int p, unsigned int r, std::string fname)
Solves static scalar boundary value problem.
void run()
Runs the simulation.