edge_inf_edge2.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2018 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 
129 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
130 
134  virtual bool infinite () const override { return true; }
135 
139  virtual Point origin () const override;
140 
145  virtual bool is_mid_infinite_edge_node(const unsigned int i) const
146  override { return (i > 0); }
147 
148 #endif
149 
150 
151 protected:
152 
157 
158 
159 
160 #ifdef LIBMESH_ENABLE_AMR
161 
165  virtual float embedding_matrix (const unsigned int,
166  const unsigned int,
167  const unsigned int) const override
168  { libmesh_not_implemented(); return 0.; }
169 
171 
172 #endif // LIBMESH_ENABLE_AMR
173 
174 };
175 
176 
177 
178 
179 // ------------------------------------------------------------
180 // InfEdge2 class member functions
181 inline
183 {
184  return ( this->point(0)*2 - this->point(1) );
185 }
186 
187 
188 } // namespace libMesh
189 
190 #endif
191 
192 #endif // LIBMESH_EDGE_INF_EDGE2_H
A geometric point in (x,y,z) space associated with a DOF.
Definition: node.h:52
virtual float embedding_matrix(const unsigned int, const unsigned int, const unsigned int) const override
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
virtual ~InfEdge2()=default
virtual Point master_point(const unsigned int i) const override
The base class for all geometric element types.
Definition: elem.h:100
virtual unsigned int n_sub_elem() const override
A 1D infinite element with 2 nodes.
InfEdge2 & operator=(const InfEdge2 &)=delete
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
virtual Point origin() const override
InfEdge2(Elem *p=nullptr)
virtual std::vector< unsigned int > nodes_on_side(const unsigned int s) const override
virtual bool infinite() const override
virtual ElemType type() const override
virtual bool is_face(const unsigned int i) const override
The base class for all 1D geometric element types.
Definition: edge.h:37
A geometric point in (x,y,z) space.
Definition: point.h:38
const Point & point(const unsigned int i) const
Definition: elem.h:1892
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]
virtual unsigned int n_nodes() const override
Definition: edge.h:69