libMesh
Loading...
Searching...
No Matches
fe_lagrange_gll_shape_3D.C
Go to the documentation of this file.
1// The libMesh Finite Element Library.
2// Copyright (C) 2002-2026 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3
4// This library is free software; you can redistribute it and/or
5// modify it under the terms of the GNU Lesser General Public
6// License as published by the Free Software Foundation; either
7// version 2.1 of the License, or (at your option) any later version.
8
9// This library is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12// Lesser General Public License for more details.
13
14// You should have received a copy of the GNU Lesser General Public
15// License along with this library; if not, write to the Free Software
16// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
18
19
20// Local includes
21#include "libmesh/fe.h"
22#include "libmesh/elem.h"
23#include "libmesh/fe_lagrange_gll_shape.h"
24
25
26namespace libMesh
27{
28
29
31
32
33template <>
35 const Order order,
36 const unsigned int i,
37 const Point & p)
38{
39 return fe_lagrange_gll_tensor_product<L2_LAGRANGE_GLL, 3>
40 (nullptr, order, i, p, nullptr, 0);
41}
42
43
44template <>
46 const Order order,
47 const unsigned int i,
48 const Point & p,
49 const bool add_p_level)
50{
51 libmesh_assert(elem);
52
53 return fe_lagrange_gll_tensor_product<L2_LAGRANGE_GLL, 3>
54 (elem, order + add_p_level*elem->p_level(), i, p, nullptr, 0);
55}
56
57
58template <>
60 const Elem * elem,
61 const unsigned int i,
62 const Point & p,
63 const bool add_p_level)
64{
65 libmesh_assert(elem);
66
67 return fe_lagrange_gll_tensor_product<L2_LAGRANGE_GLL, 3>
68 (elem, fet.order + add_p_level*elem->p_level(), i, p, nullptr, 0);
69}
70
71
72template <>
74 const Order order,
75 const unsigned int i,
76 const unsigned int j,
77 const Point & p)
78{
79 libmesh_assert_less (j, 3);
80
81 return fe_lagrange_gll_tensor_product<L2_LAGRANGE_GLL, 3>
82 (nullptr, order, i, p, &j, 1);
83}
84
85
86template <>
88 const Order order,
89 const unsigned int i,
90 const unsigned int j,
91 const Point & p,
92 const bool add_p_level)
93{
94 libmesh_assert(elem);
95 libmesh_assert_less (j, 3);
96
97 return fe_lagrange_gll_tensor_product<L2_LAGRANGE_GLL, 3>
98 (elem, order + add_p_level*elem->p_level(), i, p, &j, 1);
99}
100
101
102template <>
104 const Elem * elem,
105 const unsigned int i,
106 const unsigned int j,
107 const Point & p,
108 const bool add_p_level)
109{
110 libmesh_assert(elem);
111 libmesh_assert_less (j, 3);
112
113 return fe_lagrange_gll_tensor_product<L2_LAGRANGE_GLL, 3>
114 (elem, fet.order + add_p_level*elem->p_level(), i, p, &j, 1);
115}
116
117
118#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
119
120template <>
122 const Order order,
123 const unsigned int i,
124 const unsigned int j,
125 const Point & p)
126{
127 libmesh_assert_less (j, fe_lagrange_gll_n_second_derivs<3>());
128
129 return fe_lagrange_gll_tensor_product<L2_LAGRANGE_GLL, 3>
130 (nullptr, order, i, p, fe_lagrange_gll_second_deriv_pairs[j], 2);
131}
132
133
134template <>
136 const Order order,
137 const unsigned int i,
138 const unsigned int j,
139 const Point & p,
140 const bool add_p_level)
141{
142 libmesh_assert(elem);
143 libmesh_assert_less (j, fe_lagrange_gll_n_second_derivs<3>());
144
145 return fe_lagrange_gll_tensor_product<L2_LAGRANGE_GLL, 3>
146 (elem, order + add_p_level*elem->p_level(), i, p, fe_lagrange_gll_second_deriv_pairs[j], 2);
147}
148
149
150template <>
152 const Elem * elem,
153 const unsigned int i,
154 const unsigned int j,
155 const Point & p,
156 const bool add_p_level)
157{
158 libmesh_assert(elem);
159 libmesh_assert_less (j, fe_lagrange_gll_n_second_derivs<3>());
160
161 return fe_lagrange_gll_tensor_product<L2_LAGRANGE_GLL, 3>
162 (elem, fet.order + add_p_level*elem->p_level(), i, p, fe_lagrange_gll_second_deriv_pairs[j], 2);
163}
164
165
166#endif // LIBMESH_ENABLE_SECOND_DERIVATIVES
167
168} // namespace libMesh
This is the base class from which all geometric element types are derived.
Definition elem.h:96
unsigned int p_level() const
Definition elem.h:3246
class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialize...
Definition fe_type.h:197
OrderWrapper order
The approximation order of the element (at 0 p-refinement level).
Definition fe_type.h:203
static OutputShape shape(const ElemType t, const Order o, const unsigned int i, const Point &p)
static OutputShape shape_second_deriv(const ElemType t, const Order o, const unsigned int i, const unsigned int j, const Point &p)
static OutputShape shape_deriv(const ElemType t, const Order o, const unsigned int i, const unsigned int j, const Point &p)
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition point.h:41
The libMesh namespace provides an interface to certain functionality in the library.
LIBMESH_DEFAULT_VECTORIZED_FE(template<>Real FE< 0, BERNSTEIN)
constexpr unsigned int fe_lagrange_gll_second_deriv_pairs[6][2]
The pair of coordinates differentiated by each second derivative index j of FE::shape_second_deriv().
ElemType
Defines an enum for geometric element types.
libmesh_assert(ctx)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real