libMesh
edge_inf_edge2.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2019 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
libMesh::InfEdge2::InfEdge2
InfEdge2(Elem *p=nullptr)
Constructor.
Definition: edge_inf_edge2.h:60
libMesh::InfEdge2::is_face
virtual bool is_face(const unsigned int i) const override
Definition: edge_inf_edge2.C:50
libMesh::InfEdge2::master_point
virtual Point master_point(const unsigned int i) const override
Definition: edge_inf_edge2.h:73
libMesh::IOPackage
IOPackage
libMesh interfaces with several different software packages for the purposes of creating,...
Definition: enum_io_package.h:37
libMesh
The libMesh namespace provides an interface to certain functionality in the library.
Definition: factoryfunction.C:55
libMesh::Order
Order
Definition: enum_order.h:40
libMesh::InfEdge2::LIBMESH_ENABLE_TOPOLOGY_CACHES
LIBMESH_ENABLE_TOPOLOGY_CACHES
Definition: edge_inf_edge2.h:170
libMesh::InfEdge2::_nodelinks_data
Node * _nodelinks_data[2]
Data for links to nodes.
Definition: edge_inf_edge2.h:156
libMesh::INFEDGE2
Definition: enum_elem_type.h:57
libMesh::InfEdge2::is_mid_infinite_edge_node
virtual bool is_mid_infinite_edge_node(const unsigned int i) const override
Definition: edge_inf_edge2.h:145
libMesh::Elem::point
const Point & point(const unsigned int i) const
Definition: elem.h:1955
libMesh::InfEdge2::type
virtual ElemType type() const override
Definition: edge_inf_edge2.h:118
libMesh::InfEdge2::is_vertex
virtual bool is_vertex(const unsigned int i) const override
Definition: edge_inf_edge2.C:36
libMesh::InfEdge2::connectivity
virtual void connectivity(const unsigned int se, const IOPackage iop, std::vector< dof_id_type > &conn) const override
Definition: edge_inf_edge2.C:81
libMesh::Edge
The Edge is an element in 1D.
Definition: edge.h:37
libMesh::InfEdge2::operator=
InfEdge2 & operator=(const InfEdge2 &)=delete
libMesh::InfEdge2::infinite
virtual bool infinite() const override
Definition: edge_inf_edge2.h:134
libMesh::Point
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:38
libMesh::InfEdge2::is_node_on_side
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
Definition: edge_inf_edge2.C:55
libMesh::InfEdge2::origin
virtual Point origin() const override
Definition: edge_inf_edge2.h:182
libMesh::InfEdge2
The InfEdge2 is an infinite element in 1D composed of 2 nodes.
Definition: edge_inf_edge2.h:52
libMesh::Node
A Node is like a Point, but with more information.
Definition: node.h:52
libMesh::InfEdge2::nodes_on_side
virtual std::vector< unsigned int > nodes_on_side(const unsigned int s) const override
Definition: edge_inf_edge2.C:63
libMesh::InfEdge2::embedding_matrix
virtual float embedding_matrix(const unsigned int, const unsigned int, const unsigned int) const override
Matrix used to create the elements children.
Definition: edge_inf_edge2.h:165
libMesh::InfEdge2::is_node_on_edge
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const override
Definition: edge_inf_edge2.C:69
libMesh::Edge::n_nodes
virtual unsigned int n_nodes() const override
Definition: edge.h:69
libMesh::InfEdge2::n_sub_elem
virtual unsigned int n_sub_elem() const override
Definition: edge_inf_edge2.h:82
libMesh::Elem
This is the base class from which all geometric element types are derived.
Definition: elem.h:100
libMesh::InfEdge2::is_edge
virtual bool is_edge(const unsigned int i) const override
Definition: edge_inf_edge2.C:43
libMesh::InfEdge2::default_order
virtual Order default_order() const override
Definition: edge_inf_edge2.C:76
libMesh::InfEdge2::~InfEdge2
virtual ~InfEdge2()=default
libMesh::ElemType
ElemType
Defines an enum for geometric element types.
Definition: enum_elem_type.h:33