15 #include <deal.II/grid/grid_in.h>
16 #include <deal.II/grid/grid_out.h>
17 #include <deal.II/grid/grid_tools.h>
19 #include "exact_solution.hpp"
20 #include "settings.hpp"
21 #include "static_scalar_solver.hpp"
23 using namespace StaticScalarSolver;
53 unsigned int mapping_degree,
64 project_exact_solution)
67 if (DIMENSION__ == 2) {
68 if (HYPERCUBE__ == 1) {
69 fname_mesh =
"../../gmsh/data/square_r" + std::to_string(r) +
".msh";
71 fname_mesh =
"../../gmsh/data/circle_r" + std::to_string(r) +
".msh";
74 if (HYPERCUBE__ == 1) {
75 fname_mesh =
"../../gmsh/data/cube_r" + std::to_string(r) +
".msh";
77 fname_mesh =
"../../gmsh/data/sphere_r" + std::to_string(r) +
".msh";
87 const std::string fname;
89 std::string fname_mesh;
93 virtual void make_mesh() override final;
94 virtual
void fill_dirichlet_stack() override final;
95 virtual
void solve() override final;
114 if (log_cg_convergence)
115 control.enable_history_data();
117 GrowingVectorMemory<Vector<double>> memory;
118 SolverCG<Vector<double>> cg(control, memory);
120 PreconditionJacobi<SparseMatrix<double>> preconditioner;
130 if (log_cg_convergence) {
131 const std::vector<double> history_data = control.get_history_data();
133 std::ofstream ofs(fname +
"_cg_convergence.csv");
136 for (
auto item : history_data) {
137 ofs << i <<
", " << item <<
"\n";
151 std::ifstream ifs(fname_mesh);
152 gridin.read_msh(ifs);
Describes exact solution, , of the Method of manufactured solutions (mms/) numerical experiment in tw...
Global settings for the Method of manufactured solutions (mms/) numerical experiment.
Implements the solver of the Method of manufactured solutions (mms/) numerical experiment.
SolverMMS(unsigned int p, unsigned int mapping_degree, unsigned int r, std::string fname)
Solves static scalar boundary value problem.
void run()
Runs the simulation.