NiHu  2.0
lib_shape.cpp
Go to the documentation of this file.
1 // This file is a part of NiHu, a C++ BEM template library.
2 //
3 // Copyright (C) 2012-2019 Peter Fiala <fiala@hit.bme.hu>
4 // Copyright (C) 2012-2019 Peter Rucz <rucz@hit.bme.hu>
5 //
6 // This program is free software: you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation, either version 3 of the License, or
9 // (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program. If not, see <http://www.gnu.org/licenses/>.
18 
23 #include "lib_shape.hpp"
24 
25 namespace NiHu
26 {
27 
28 namespace shape_set_traits
29 {
30  template <>
31  const std::string name<line_0_shape_set>::value = "Line 0 shape set";
32 
33  template <>
34  const std::string name<line_1_shape_set>::value = "Line 1 shape set";
35 
36  template <>
37  const std::string name<line_2_shape_set>::value = "Line 2 shape set";
38 
39  template <>
40  const std::string name<tria_0_shape_set>::value = "Tria 0 shape set";
41 
42  template <>
43  const std::string name<tria_1_shape_set>::value = "Tria 1 shape set";
44 
45  template <>
46  const std::string name<tria_2_shape_set>::value = "Tria 2 shape set";
47 
48  template <>
49  const std::string name<quad_0_shape_set>::value = "Quad 0 shape set";
50 
51  template <>
52  const std::string name<quad_1_shape_set>::value = "Quad 1 shape set";
53 
54  template <>
55  const std::string name<quad_2_shape_set>::value = "Quad 2 shape set";
56 
57  template <>
58  const std::string name<quad_28_shape_set>::value = "Quad 28 shape set";
59 
60  template <>
61  const std::string name<brick_0_shape_set>::value = "Brick 0 shape set";
62 
63  template <>
64  const std::string name<brick_1_shape_set>::value = "Brick 1 shape set";
65 
66  template <>
67  const std::string name<line_1_gauss_shape_set>::value = "Line 1 Gauss shape set";
68 
69  template <>
70  const std::string name<quad_1_gauss_shape_set>::value = "Quad 1 Gauss shape set";
71 
72  template <>
73  const std::string name<tria_1_gauss_shape_set>::value = "Tria 1 Gauss shape set";
74 }
75 
76 
77 line_2_shape_set::corners_t
79  line_2_shape_set::xi_t::Constant(-1.0),
80  line_2_shape_set::xi_t::Constant(0.0),
81  line_2_shape_set::xi_t::Constant(1.0),
82 };
83 
84 
85 tria_2_shape_set::corners_t
87  tria_2_shape_set::xi_t(0.0, 0.0),
88  tria_2_shape_set::xi_t(0.5, 0.0),
89  tria_2_shape_set::xi_t(1.0, 0.0),
90  tria_2_shape_set::xi_t(0.5, 0.5),
91  tria_2_shape_set::xi_t(0.0, 1.0),
92  tria_2_shape_set::xi_t(0.0, 0.5)
93 };
94 
95 
96 quad_2_shape_set::corners_t
98  quad_2_shape_set::xi_t(-1.0, -1.0),
99  quad_2_shape_set::xi_t(0.0, -1.0),
100  quad_2_shape_set::xi_t(+1.0, -1.0),
101  quad_2_shape_set::xi_t(+1.0, 0.0),
102  quad_2_shape_set::xi_t(+1.0, +1.0),
103  quad_2_shape_set::xi_t(0.0, +1.0),
104  quad_2_shape_set::xi_t(-1.0, +1.0),
105  quad_2_shape_set::xi_t(-1.0, 0.0),
106  quad_2_shape_set::xi_t(0.0, 0.0)
107 };
108 
109 
110 quad_28_shape_set::corners_t
112  quad_28_shape_set::xi_t(-1.0, -1.0),
113  quad_28_shape_set::xi_t(0.0, -1.0),
114  quad_28_shape_set::xi_t(+1.0, -1.0),
115  quad_28_shape_set::xi_t(+1.0, 0.0),
116  quad_28_shape_set::xi_t(+1.0, +1.0),
117  quad_28_shape_set::xi_t(0.0, +1.0),
118  quad_28_shape_set::xi_t(-1.0, +1.0),
119  quad_28_shape_set::xi_t(-1.0, 0.0)
120 };
121 
122 
123 line_1_gauss_shape_set::corners_t
124  const line_1_gauss_shape_set::m_corners = {
125  line_1_gauss_shape_set::xi_t::Constant(-std::sqrt(3.0)/3.0),
126  line_1_gauss_shape_set::xi_t::Constant(+std::sqrt(3.0)/3.0)
127 };
128 
129 quad_1_gauss_shape_set::corners_t
130  const quad_1_gauss_shape_set::m_corners = {
131  quad_1_gauss_shape_set::xi_t(-std::sqrt(3.0)/3.0, -std::sqrt(3.0)/3.0),
132  quad_1_gauss_shape_set::xi_t(+std::sqrt(3.0)/3.0, -std::sqrt(3.0)/3.0),
133  quad_1_gauss_shape_set::xi_t(-std::sqrt(3.0)/3.0, +std::sqrt(3.0)/3.0),
134  quad_1_gauss_shape_set::xi_t(+std::sqrt(3.0)/3.0, +std::sqrt(3.0)/3.0)
135 };
136 
137 tria_1_gauss_shape_set::corners_t
138  const tria_1_gauss_shape_set::m_corners = {
139  tria_1_gauss_shape_set::xi_t(1.0/6.0, 1.0/6.0),
140  tria_1_gauss_shape_set::xi_t(4.0/6.0, 1.0/6.0),
141  tria_1_gauss_shape_set::xi_t(1.0/6.0, 4.0/6.0)
142 };
143 
144 
145 } // end of namespace NiHu
NiHu::quad_28_shape_set::m_corners
static const corners_t m_corners
the corner nodes of the shape set
Definition: lib_shape.hpp:913
NiHu::line_2_shape_set::m_corners
static const corners_t m_corners
the corner nodes of the shape set
Definition: lib_shape.hpp:486
NiHu::quad_2_shape_set::m_corners
static const corners_t m_corners
the corner nodes of the shape set
Definition: lib_shape.hpp:759
lib_shape.hpp
definition of shape function sets
NiHu::shape_set_traits::name::value
static const std::string value
the textual name
Definition: shapeset.hpp:101
NiHu::tria_2_shape_set::m_corners
static const corners_t m_corners
the corner nodes of the shape set
Definition: lib_shape.hpp:616
NiHu::shape_set_base< tria_2_shape_set >::xi_t
domain_t::xi_t xi_t
Definition: shapeset.hpp:216