Logbook  (07-04-2025)
Static problems
solver.hpp
1 /******************************************************************************
2  * Copyright (C) Siarhei Uzunbajakau, 2023.
3  *
4  * This program is free software. You can use, modify, and redistribute it under
5  * the terms of the GNU Lesser General Public License as published by the Free
6  * Software Foundation, either version 3 or (at your option) any later version.
7  * This program is distributed without any warranty.
8  *
9  * Refer to COPYING.LESSER for more details.
10  ******************************************************************************/
11 
12 #ifndef SolverCVPI_H__
13 #define SolverCVPI_H__
14 
15 #include <deal.II/base/function.h>
16 #include <deal.II/base/tensor_function.h>
17 #include <deal.II/base/vectorization.h>
18 
19 #include <deal.II/grid/grid_in.h>
20 #include <deal.II/grid/grid_tools.h>
21 #include <deal.II/grid/manifold_lib.h>
22 
23 #include <deal.II/lac/precondition.h>
24 #include <deal.II/lac/solver_cg.h>
25 #include <deal.II/lac/solver_control.h>
26 #include <deal.II/lac/sparse_direct.h>
27 
28 #include <fstream>
29 #include <string>
30 
31 #include "exact_solution.hpp"
32 #include "settings.hpp"
33 #include "static_vector_solver_i.hpp"
34 
35 using namespace StaticVectorSolver;
36 
43  : public SettingsCVPI
44  , public Solver1<3>
45 {
46 public:
47  SolverCVPI() = delete;
48 
62  SolverCVPI(unsigned int p,
63  unsigned int mapping_degree,
64  unsigned int r,
65  std::string fname)
66  : Solver1<3>(p,
67  mapping_degree,
68  2,
69  0.0,
70  fname,
71  nullptr,
72  SettingsCVPI::print_time_tables,
73  false,
74  true)
75  , fname(fname)
76  , r(r)
77  {
79  }
80 
81  ~SolverCVPI() = default;
82 
83 private:
84  const std::string fname;
85  const unsigned int r;
86 
87  SphericalManifold<3> sphere;
88 
89  const DirichletBC_CVPI dirichlet_bc;
90 
91  virtual void make_mesh() override final;
92  virtual void fill_dirichlet_stack() override final;
93  virtual void solve() override final;
94 };
95 
96 #endif
Describes the Dirichlet boundary condition in the Current vector potential (cvp-i/) numerical experim...
Global settings for the Current vector potential (cvp-i/) numerical experiment.
Definition: settings.hpp:26
Implements the solver of the Current vector potential (cvp-i/) numerical experiment.
Definition: solver.hpp:45
SolverCVPI(unsigned int p, unsigned int mapping_degree, unsigned int r, std::string fname)
Definition: solver.hpp:62
Solves static vector boundary value problem.
void run()
Runs the simulation.