libMesh
Loading...
Searching...
No Matches
edge_edge3.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_EDGE3_H
21#define LIBMESH_EDGE_EDGE3_H
22
23// Local includes
24#include "libmesh/libmesh_common.h"
25#include "libmesh/edge.h"
26
27namespace libMesh
28{
29
46class Edge3 : public Edge
47{
48public:
49
53 explicit
54 Edge3 (Elem * p=nullptr) :
56
57 Edge3 (Edge3 &&) = delete;
58 Edge3 (const Edge3 &) = delete;
59 Edge3 & operator= (const Edge3 &) = delete;
60 Edge3 & operator= (Edge3 &&) = delete;
61 virtual ~Edge3() = default;
62
67 virtual Point master_point (const unsigned int i) const override
68 {
69 libmesh_assert_less(i, this->n_nodes());
70 if (i < 2)
71 return Point(2.0f*Real(i)-1.0f,0,0);
72 return Point(0,0,0);
73 }
74
78 virtual unsigned int n_nodes() const override { return num_nodes; }
79
83 virtual unsigned int n_sub_elem() const override { return 2; }
84
88 virtual bool is_vertex(const unsigned int i) const override;
89
93 virtual bool is_edge(const unsigned int i) const override;
94
98 virtual bool is_face(const unsigned int i) const override;
99
104 virtual bool is_node_on_side(const unsigned int n,
105 const unsigned int s) const override;
106
111 virtual bool is_node_on_edge(const unsigned int n,
112 const unsigned int e) const override;
113
118 virtual bool has_affine_map () const override;
119
126 virtual bool has_invertible_map(Real tol) const override;
127
131 virtual ElemType type() const override { return EDGE3; }
132
136 virtual Order default_order() const override;
137
138 virtual void connectivity(const unsigned int sc,
139 const IOPackage iop,
140 std::vector<dof_id_type> & conn) const override;
141
145 virtual unsigned int n_second_order_adjacent_vertices (const unsigned int) const override
146 { return 2; }
147
152 virtual unsigned short int second_order_adjacent_vertex (const unsigned int,
153 const unsigned int v) const override
154 { return static_cast<unsigned short int>(v); }
155
161 virtual std::pair<unsigned short int, unsigned short int>
162 second_order_child_vertex (const unsigned int n) const override;
163
167 virtual Real volume () const override;
168
173 virtual BoundingBox loose_bounding_box () const override;
174
175#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
176
180 virtual bool infinite () const override { return false; }
181
182#endif
183
187 using Edge::key;
188
195 virtual dof_id_type key () const override;
196
200 static const int num_nodes = 3;
201
202 virtual void flip(BoundaryInfo *) override final;
203
204protected:
205
210
211
212
213#ifdef LIBMESH_ENABLE_AMR
214
218 virtual Real embedding_matrix (const unsigned int i,
219 const unsigned int j,
220 const unsigned int k) const override
221 { return _embedding_matrix[i][j][k]; }
222
228
230
231#endif // LIBMESH_ENABLE_AMR
232
233};
234
235} // namespace libMesh
236
237
238#endif // LIBMESH_EDGE_EDGE3_H
The BoundaryInfo class contains information relevant to boundary conditions including storing faces,...
Defines a Cartesian bounding box by the two corner extremum.
The Edge3 is an element in 1D composed of 3 nodes.
Definition edge_edge3.h:47
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
Definition edge_edge3.C:74
Edge3(Edge3 &&)=delete
virtual void connectivity(const unsigned int sc, const IOPackage iop, std::vector< dof_id_type > &conn) const override
Definition edge_edge3.C:147
virtual bool is_vertex(const unsigned int i) const override
Definition edge_edge3.C:55
virtual bool is_face(const unsigned int i) const override
Definition edge_edge3.C:69
virtual unsigned int n_second_order_adjacent_vertices(const unsigned int) const override
Definition edge_edge3.h:145
virtual Order default_order() const override
Definition edge_edge3.C:140
virtual ElemType type() const override
Definition edge_edge3.h:131
static const int num_nodes
Geometric constants for Edge3.
Definition edge_edge3.h:200
virtual bool is_edge(const unsigned int i) const override
Definition edge_edge3.C:62
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_edge3.h:218
virtual std::pair< unsigned short int, unsigned short int > second_order_child_vertex(const unsigned int n) const override
Definition edge_edge3.C:217
virtual unsigned int n_sub_elem() const override
Definition edge_edge3.h:83
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const override
Definition edge_edge3.C:82
virtual dof_id_type key() const override
Compute a unique key for this element which is suitable for hashing (not necessarily unique,...
Definition edge_edge3.C:295
virtual ~Edge3()=default
virtual bool infinite() const override
Definition edge_edge3.h:180
virtual bool has_invertible_map(Real tol) const override
Definition edge_edge3.C:100
virtual unsigned short int second_order_adjacent_vertex(const unsigned int, const unsigned int v) const override
Definition edge_edge3.h:152
Edge3(const Edge3 &)=delete
virtual BoundingBox loose_bounding_box() const override
Definition edge_edge3.C:273
Node * _nodelinks_data[num_nodes]
Data for links to nodes.
Definition edge_edge3.h:209
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_edge3.h:227
Edge3 & operator=(const Edge3 &)=delete
virtual Point master_point(const unsigned int i) const override
Definition edge_edge3.h:67
virtual bool has_affine_map() const override
Definition edge_edge3.C:91
virtual unsigned int n_nodes() const override
Definition edge_edge3.h:78
virtual Real volume() const override
An optimized method for computing the length of a 3-node edge.
Definition edge_edge3.C:224
Edge3(Elem *p=nullptr)
Constructor.
Definition edge_edge3.h:54
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_edge3.C:301
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