libMesh
edge_inf_edge2.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2017 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
62 
67  virtual Point master_point (const unsigned int i) const libmesh_override
68  {
69  libmesh_assert_less(i, this->n_nodes());
70  return Point(0,i,0);
71  }
72 
76  virtual unsigned int n_sub_elem() const libmesh_override { return 1; }
77 
81  virtual bool is_vertex(const unsigned int i) const libmesh_override;
82 
86  virtual bool is_edge(const unsigned int i) const libmesh_override;
87 
91  virtual bool is_face(const unsigned int i) const libmesh_override;
92 
97  virtual bool is_node_on_side(const unsigned int n,
98  const unsigned int s) const libmesh_override;
99 
104  virtual bool is_node_on_edge(const unsigned int n,
105  const unsigned int e) const libmesh_override;
106 
110  virtual ElemType type() const libmesh_override { return INFEDGE2; }
111 
115  virtual Order default_order() const libmesh_override { return FIRST; }
116 
117  virtual void connectivity(const unsigned int se,
118  const IOPackage iop,
119  std::vector<dof_id_type> & conn) const libmesh_override;
120 
121 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
122 
126  virtual bool infinite () const libmesh_override { return true; }
127 
131  virtual Point origin () const libmesh_override;
132 
137  virtual bool is_mid_infinite_edge_node(const unsigned int i) const
138  libmesh_override { return (i > 0); }
139 
140 #endif
141 
142 
143 protected:
144 
149 
150 
151 
152 #ifdef LIBMESH_ENABLE_AMR
153 
157  virtual float embedding_matrix (const unsigned int,
158  const unsigned int,
159  const unsigned int) const libmesh_override
160  { libmesh_not_implemented(); return 0.; }
161 
163 
164 #endif // LIBMESH_ENABLE_AMR
165 
166 };
167 
168 
169 
170 
171 // ------------------------------------------------------------
172 // InfEdge2 class member functions
173 inline
175 {
176  return ( this->point(0)*2 - this->point(1) );
177 }
178 
179 
180 } // namespace libMesh
181 
182 #endif
183 
184 #endif // LIBMESH_EDGE_INF_EDGE2_H
A Node is like a Point, but with more information.
Definition: node.h:52
virtual Order default_order() const libmesh_override
virtual float embedding_matrix(const unsigned int, const unsigned int, const unsigned int) const libmesh_override
Matrix used to create the elements children.
virtual unsigned int n_nodes() const libmesh_override
Definition: edge.h:63
ElemType
Defines an enum for geometric element types.
This is the base class from which all geometric element types are derived.
Definition: elem.h:89
const class libmesh_nullptr_t libmesh_nullptr
The InfEdge2 is an infinite element in 1D composed of 2 nodes.
The libMesh namespace provides an interface to certain functionality in the library.
virtual bool is_face(const unsigned int i) const libmesh_override
virtual Point origin() const libmesh_override
virtual ElemType type() const libmesh_override
virtual unsigned int n_sub_elem() const libmesh_override
virtual bool is_mid_infinite_edge_node(const unsigned int i) const libmesh_override
virtual Point master_point(const unsigned int i) const libmesh_override
InfEdge2(Elem *p=libmesh_nullptr)
Constructor.
const Point & point(const unsigned int i) const
Definition: elem.h:1809
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const libmesh_override
Order
defines an enum for polynomial orders.
Definition: enum_order.h:32
virtual bool is_vertex(const unsigned int i) const libmesh_override
The Edge is an element in 1D.
Definition: edge.h:37
IOPackage
libMesh interfaces with several different software packages for the purposes of creating, reading, and writing mesh files.
virtual bool is_edge(const unsigned int i) const libmesh_override
virtual void connectivity(const unsigned int se, const IOPackage iop, std::vector< dof_id_type > &conn) const libmesh_override
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:38
Node * _nodelinks_data[2]
Data for links to nodes.
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const libmesh_override
virtual bool infinite() const libmesh_override