libMesh
Loading...
Searching...
No Matches
edge_edge4.h
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#ifndef LIBMESH_EDGE_EDGE4_H
21#define LIBMESH_EDGE_EDGE4_H
22
23// Local includes
24#include "libmesh/libmesh_common.h"
25#include "libmesh/edge.h"
26
27namespace libMesh
28{
29
47class Edge4 final : public Edge
48{
49public:
50
54 explicit
55 Edge4 (Elem * p=nullptr) :
57
58 Edge4 (Edge4 &&) = delete;
59 Edge4 (const Edge4 &) = delete;
60 Edge4 & operator= (const Edge4 &) = delete;
61 Edge4 & operator= (Edge4 &&) = delete;
62 virtual ~Edge4() = default;
63
68 virtual Point master_point (const unsigned int i) const override
69 {
70 libmesh_assert_less(i, this->n_nodes());
71 if (i < 2)
72 return Point(2.0f*Real(i)-1.0f,0,0);
73 return Point((Real(2)*Real(i)-5)/3,0,0);
74 }
75
79 virtual unsigned int n_nodes() const override { return num_nodes; }
80
84 virtual unsigned int n_sub_elem() const override { return 2; }
85
89 virtual bool is_vertex(const unsigned int i) const override;
90
94 virtual bool is_edge(const unsigned int i) const override;
95
99 virtual bool is_face(const unsigned int i) const override;
100
105 virtual bool is_node_on_side(const unsigned int n,
106 const unsigned int s) const override;
107
112 virtual bool is_node_on_edge(const unsigned int n,
113 const unsigned int e) const override;
114
119 virtual bool has_affine_map () const override;
120
129 virtual bool has_invertible_map(Real tol) const override;
130
134 virtual ElemType type() const override { return EDGE4; }
135
139 virtual Order default_order() const override;
140
141 virtual void connectivity(const unsigned int sc,
142 const IOPackage iop,
143 std::vector<dof_id_type> & conn) const override;
144
148 virtual unsigned int n_second_order_adjacent_vertices (const unsigned int) const override
149 { libmesh_not_implemented(); return 0; }
150
154 virtual unsigned short int second_order_adjacent_vertex (const unsigned int,
155 const unsigned int) const override
156 { libmesh_not_implemented(); return 0; }
157
162 virtual BoundingBox loose_bounding_box () const override;
163
164#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
165
169 virtual bool infinite () const override { return false; }
170
171#endif
172
176 using Edge::key;
177
183 virtual dof_id_type key () const override;
184
189 virtual Real volume () const override;
190
194 static const int num_nodes = 4;
195
196 virtual void flip(BoundaryInfo *) override final;
197
198protected:
199
204
205
206
207#ifdef LIBMESH_ENABLE_AMR
208
212 virtual Real embedding_matrix (const unsigned int i,
213 const unsigned int j,
214 const unsigned int k) const override
215 { return _embedding_matrix[i][j][k]; }
216
222
224
225#endif // LIBMESH_ENABLE_AMR
226
227};
228
229} // namespace libMesh
230
231
232#endif // LIBMESH_EDGE_EDGE4_H
The BoundaryInfo class contains information relevant to boundary conditions including storing faces,...
Defines a Cartesian bounding box by the two corner extremum.
The Edge4 is an element in 1D composed of 4 nodes.
Definition edge_edge4.h:48
virtual bool is_edge(const unsigned int i) const override
Definition edge_edge4.C:63
Edge4 & operator=(const Edge4 &)=delete
virtual ElemType type() const override
Definition edge_edge4.h:134
virtual Real embedding_matrix(const unsigned int i, const unsigned int j, const unsigned int k) const override
Matrix used to create the elements children.
Definition edge_edge4.h:212
Edge4(Edge4 &&)=delete
Edge4(Elem *p=nullptr)
Constructor.
Definition edge_edge4.h:55
virtual void connectivity(const unsigned int sc, const IOPackage iop, std::vector< dof_id_type > &conn) const override
Definition edge_edge4.C:194
virtual ~Edge4()=default
virtual bool infinite() const override
Definition edge_edge4.h:169
virtual bool has_affine_map() const override
Definition edge_edge4.C:90
virtual bool is_vertex(const unsigned int i) const override
Definition edge_edge4.C:58
virtual BoundingBox loose_bounding_box() const override
Definition edge_edge4.C:264
Node * _nodelinks_data[num_nodes]
Data for links to nodes.
Definition edge_edge4.h:203
virtual dof_id_type key() const override
Definition edge_edge4.C:289
virtual unsigned short int second_order_adjacent_vertex(const unsigned int, const unsigned int) const override
FIXME: This function could be generalized to work for Edges.
Definition edge_edge4.h:154
virtual unsigned int n_second_order_adjacent_vertices(const unsigned int) const override
FIXME: This function could be generalized to work for Edges.
Definition edge_edge4.h:148
virtual unsigned int n_nodes() const override
Definition edge_edge4.h:79
Edge4(const Edge4 &)=delete
static const Real _embedding_matrix[num_children][num_nodes][num_nodes]
Matrix that computes new nodal locations/solution values from current nodes/solution.
Definition edge_edge4.h:221
virtual Order default_order() const override
Definition edge_edge4.C:187
virtual Real volume() const override
An optimized method for approximating the length of an EDGE4 using quadrature.
Definition edge_edge4.C:299
static const int num_nodes
Geometric constants for Edge4.
Definition edge_edge4.h:194
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const override
Definition edge_edge4.C:81
virtual Point master_point(const unsigned int i) const override
Definition edge_edge4.h:68
virtual unsigned int n_sub_elem() const override
Definition edge_edge4.h:84
virtual void flip(BoundaryInfo *) override final
Flips the element (by swapping node and neighbor pointers) to have a mapping Jacobian of opposite sig...
Definition edge_edge4.C:340
virtual bool has_invertible_map(Real tol) const override
Definition edge_edge4.C:104
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
Definition edge_edge4.C:73
virtual bool is_face(const unsigned int i) const override
Definition edge_edge4.C:68
The Edge is an element in 1D.
Definition edge.h:38
virtual dof_id_type key() const
Don't hide Elem::key() defined in the base class.
Definition elem.C:738
static const int num_children
Definition edge.h:66
This is the base class from which all geometric element types are derived.
Definition elem.h:96
A Node is like a Point, but with more information.
Definition node.h:55
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition point.h:40
The libMesh namespace provides an interface to certain functionality in the library.
IOPackage
libMesh interfaces with several different software packages for the purposes of creating,...
ElemType
Defines an enum for geometric element types.
uint8_t dof_id_type
Definition id_types.h:67
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real