libMesh
Loading...
Searching...
No Matches
edge_inf_edge2.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_INF_EDGE2_H
21#define LIBMESH_EDGE_INF_EDGE2_H
22
23#include "libmesh/libmesh_common.h"
24
25#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
26
27// Local includes
28#include "libmesh/edge.h"
29
30namespace libMesh
31{
32
52class InfEdge2 : public Edge
53{
54public:
55
59 explicit
60 InfEdge2 (Elem * p=nullptr) :
62
63 InfEdge2 (InfEdge2 &&) = delete;
64 InfEdge2 (const InfEdge2 &) = delete;
65 InfEdge2 & operator= (const InfEdge2 &) = delete;
67 virtual ~InfEdge2() = default;
68
72 static const int num_nodes = 2;
73
78 virtual Point master_point (const unsigned int i) const override
79 {
80 libmesh_assert_less(i, this->n_nodes());
81 return Point(0,i,0);
82 }
83
87 virtual unsigned int n_sub_elem() const override { return 1; }
88
92 virtual bool is_vertex(const unsigned int i) const override;
93
97 virtual bool is_edge(const unsigned int i) const override;
98
102 virtual bool is_face(const unsigned int i) const override;
103
108 virtual bool is_node_on_side(const unsigned int n,
109 const unsigned int s) const override;
110
111 virtual std::vector<unsigned int> nodes_on_side(const unsigned int s) const override;
112
117 virtual bool is_node_on_edge(const unsigned int n,
118 const unsigned int e) const override;
119
123 virtual ElemType type() const override { return INFEDGE2; }
124
128 virtual Order default_order() const override;
129
130 virtual void connectivity(const unsigned int se,
131 const IOPackage iop,
132 std::vector<dof_id_type> & conn) const override;
133
137 virtual void flip(BoundaryInfo *) override final {};
138
139#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
140
144 virtual bool infinite () const override { return true; }
145
149 virtual Point origin () const override;
150
155 virtual bool is_mid_infinite_edge_node(const unsigned int i) const
156 override { return (i > 0); }
157
158#endif
159
160
161protected:
162
167
168
169
170#ifdef LIBMESH_ENABLE_AMR
171
175 virtual Real embedding_matrix (const unsigned int,
176 const unsigned int,
177 const unsigned int) const override
178 { libmesh_not_implemented(); return 0.; }
179
181
182#endif // LIBMESH_ENABLE_AMR
183
184};
185
186
187
188
189// ------------------------------------------------------------
190// InfEdge2 class member functions
191inline
193{
194 return ( this->point(0)*2 - this->point(1) );
195}
196
197
198} // namespace libMesh
199
200#endif
201
202#endif // LIBMESH_EDGE_INF_EDGE2_H
The BoundaryInfo class contains information relevant to boundary conditions including storing faces,...
The Edge is an element in 1D.
Definition edge.h:38
virtual unsigned int n_nodes() const override
Definition edge.h:78
This is the base class from which all geometric element types are derived.
Definition elem.h:96
const Point & point(const unsigned int i) const
Definition elem.h:2462
The InfEdge2 is an infinite element in 1D composed of 2 nodes.
InfEdge2(const InfEdge2 &)=delete
virtual bool is_vertex(const unsigned int i) const override
virtual unsigned int n_sub_elem() const override
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
static const int num_nodes
Geometric constants for InfEdge2.
virtual Point master_point(const unsigned int i) const override
virtual bool is_mid_infinite_edge_node(const unsigned int i) const override
virtual Order default_order() const override
virtual bool is_edge(const unsigned int i) const override
virtual ElemType type() const override
InfEdge2(Elem *p=nullptr)
Constructor.
virtual void connectivity(const unsigned int se, const IOPackage iop, std::vector< dof_id_type > &conn) const override
virtual bool infinite() const override
InfEdge2 & operator=(const InfEdge2 &)=delete
virtual ~InfEdge2()=default
Node * _nodelinks_data[2]
Data for links to nodes.
InfEdge2(InfEdge2 &&)=delete
virtual bool is_face(const unsigned int i) const override
virtual Real embedding_matrix(const unsigned int, const unsigned int, const unsigned int) const override
Matrix used to create the elements children.
virtual void flip(BoundaryInfo *) override final
No such thing as a misoriented InfEdge.
virtual Point origin() const override
virtual std::vector< unsigned int > nodes_on_side(const unsigned int s) const override
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const override
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.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real