libMesh
edge_inf_edge2.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2024 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 
30 namespace libMesh
31 {
32 
52 class InfEdge2 : public Edge
53 {
54 public:
55 
59  explicit
60  InfEdge2 (Elem * p=nullptr) :
62 
63  InfEdge2 (InfEdge2 &&) = delete;
64  InfEdge2 (const InfEdge2 &) = delete;
65  InfEdge2 & operator= (const InfEdge2 &) = delete;
66  InfEdge2 & operator= (InfEdge2 &&) = delete;
67  virtual ~InfEdge2() = default;
68 
73  virtual Point master_point (const unsigned int i) const override
74  {
75  libmesh_assert_less(i, this->n_nodes());
76  return Point(0,i,0);
77  }
78 
82  virtual unsigned int n_sub_elem() const override { return 1; }
83 
87  virtual bool is_vertex(const unsigned int i) const override;
88 
92  virtual bool is_edge(const unsigned int i) const override;
93 
97  virtual bool is_face(const unsigned int i) const override;
98 
103  virtual bool is_node_on_side(const unsigned int n,
104  const unsigned int s) const override;
105 
106  virtual std::vector<unsigned int> nodes_on_side(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 
118  virtual ElemType type() const override { return INFEDGE2; }
119 
123  virtual Order default_order() const override;
124 
125  virtual void connectivity(const unsigned int se,
126  const IOPackage iop,
127  std::vector<dof_id_type> & conn) const override;
128 
132  virtual void flip(BoundaryInfo *) override final {};
133 
134 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
135 
139  virtual bool infinite () const override { return true; }
140 
144  virtual Point origin () const override;
145 
150  virtual bool is_mid_infinite_edge_node(const unsigned int i) const
151  override { return (i > 0); }
152 
153 #endif
154 
155 
156 protected:
157 
162 
163 
164 
165 #ifdef LIBMESH_ENABLE_AMR
166 
170  virtual Real embedding_matrix (const unsigned int,
171  const unsigned int,
172  const unsigned int) const override
173  { libmesh_not_implemented(); return 0.; }
174 
176 
177 #endif // LIBMESH_ENABLE_AMR
178 
179 };
180 
181 
182 
183 
184 // ------------------------------------------------------------
185 // InfEdge2 class member functions
186 inline
188 {
189  return ( this->point(0)*2 - this->point(1) );
190 }
191 
192 
193 } // namespace libMesh
194 
195 #endif
196 
197 #endif // LIBMESH_EDGE_INF_EDGE2_H
ElemType
Defines an enum for geometric element types.
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
A Node is like a Point, but with more information.
Definition: node.h:52
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
virtual ~InfEdge2()=default
IOPackage
libMesh interfaces with several different software packages for the purposes of creating, reading, and writing mesh files.
virtual void flip(BoundaryInfo *) override final
No such thing as a misoriented InfEdge.
virtual Point master_point(const unsigned int i) const override
This is the base class from which all geometric element types are derived.
Definition: elem.h:94
virtual unsigned int n_sub_elem() const override
The InfEdge2 is an infinite element in 1D composed of 2 nodes.
InfEdge2 & operator=(const InfEdge2 &)=delete
The libMesh namespace provides an interface to certain functionality in the library.
virtual bool is_vertex(const unsigned int i) const override
virtual Order default_order() const override
virtual bool is_mid_infinite_edge_node(const unsigned int i) const override
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const override
The BoundaryInfo class contains information relevant to boundary conditions including storing faces...
Definition: boundary_info.h:57
virtual Point origin() const override
InfEdge2(Elem *p=nullptr)
Constructor.
virtual std::vector< unsigned int > nodes_on_side(const unsigned int s) const override
virtual Real embedding_matrix(const unsigned int, const unsigned int, const unsigned int) const override
Matrix used to create the elements children.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual bool infinite() const override
virtual ElemType type() const override
virtual bool is_face(const unsigned int i) const override
The Edge is an element in 1D.
Definition: edge.h:37
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:39
const Point & point(const unsigned int i) const
Definition: elem.h:2277
virtual void connectivity(const unsigned int se, const IOPackage iop, std::vector< dof_id_type > &conn) const override
virtual bool is_edge(const unsigned int i) const override
Node * _nodelinks_data[2]
Data for links to nodes.
virtual unsigned int n_nodes() const override
Definition: edge.h:69