Logbook  (07-04-2025)
Static problems
solver.cpp
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 #include "solver.hpp"
13 
14 template<>
15 void
17 {
18  GridIn<2> gridin;
19 
20  gridin.attach_triangulation(triangulation);
21  std::ifstream ifs("../../gmsh/data/square_r" + std::to_string(r) + ".msh");
22  gridin.read_msh(ifs);
23 }
24 
25 template<>
26 void
28 {
29  GridIn<3> gridin;
30 
31  gridin.attach_triangulation(triangulation);
32  std::ifstream ifs("../../gmsh/data/cube_r" + std::to_string(r) + ".msh");
33  gridin.read_msh(ifs);
34 }
35 
36 template<>
37 void
39 {
40  Solver<2>::dirichlet_stack = { { bid_dirichlet, &exact_solution } };
41 }
42 
43 template<>
44 void
46 {
47  Solver<3>::dirichlet_stack = { { bid_dirichlet, &exact_solution } };
48 }
Implements the Planes of symmetry (pls/) numerical experiment.
Definition: solver.hpp:39
std::map< types::boundary_id, const Function< dim > * > dirichlet_stack
A map that contains pairs of boundary IDs and the corresponding Dirichlet boundary conditions.