libMesh
remote_elem.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_REMOTE_ELEM_H
21 #define LIBMESH_REMOTE_ELEM_H
22 
23 // Local includes
24 #include "libmesh/elem.h"
25 #include "libmesh/libmesh_singleton.h"
26 
27 // C++ includes
28 #include <limits>
29 
30 namespace libMesh
31 {
32 
44 class RemoteElem : public Elem,
45  public Singleton
46 {
47 public:
48 
52  static const dof_id_type remote_elem_id = static_cast<dof_id_type>(-2);
53 
57 private:
58  RemoteElem () : Elem(0,
59  0,
63  { this->set_id(remote_elem_id); }
64 
65 public:
69  virtual ~RemoteElem();
70 
75  static const Elem & create ();
76 
77  virtual Point master_point (const unsigned int /*i*/) const libmesh_override
78  { libmesh_not_implemented(); return Point(); }
79 
80  virtual Node * & set_node (const unsigned int i) libmesh_override
81  { libmesh_not_implemented(); return Elem::set_node(i); }
82 
86  using Elem::key;
87 
88  virtual dof_id_type key (const unsigned int) const libmesh_override
89  { libmesh_not_implemented(); return 0; }
90 
91  virtual unsigned int which_node_am_i(unsigned int /*side*/,
92  unsigned int /*side_node*/) const libmesh_override
93  { libmesh_not_implemented(); return 0; }
94 
95  virtual bool is_remote () const libmesh_override
96  { return true; }
97 
98  virtual void connectivity(const unsigned int,
99  const IOPackage,
100  std::vector<dof_id_type> &) const libmesh_override
101  { libmesh_not_implemented(); }
102 
103  virtual ElemType type () const libmesh_override
104  { return REMOTEELEM; }
105 
106  virtual unsigned int dim () const libmesh_override
107  { libmesh_not_implemented(); return 0; }
108 
109  virtual unsigned int n_nodes () const libmesh_override
110  { libmesh_not_implemented(); return 0; }
111 
112  virtual unsigned int n_sides () const libmesh_override
113  { libmesh_not_implemented(); return 0; }
114 
115  virtual unsigned int n_vertices () const libmesh_override
116  { libmesh_not_implemented(); return 0; }
117 
118  virtual unsigned int n_edges () const libmesh_override
119  { libmesh_not_implemented(); return 0; }
120 
121  virtual unsigned int n_faces () const libmesh_override
122  { libmesh_not_implemented(); return 0; }
123 
124  virtual unsigned int n_children () const libmesh_override
125  { libmesh_not_implemented(); return 0; }
126 
127  virtual bool is_vertex(const unsigned int) const libmesh_override
128  { libmesh_not_implemented(); return false; }
129 
130  virtual bool is_edge(const unsigned int) const libmesh_override
131  { libmesh_not_implemented(); return false; }
132 
133  virtual bool is_face(const unsigned int) const libmesh_override
134  { libmesh_not_implemented(); return false; }
135 
136  virtual bool is_node_on_side(const unsigned int,
137  const unsigned int) const libmesh_override
138  { libmesh_not_implemented(); return false; }
139 
140  virtual bool is_child_on_side(const unsigned int,
141  const unsigned int) const libmesh_override
142  { libmesh_not_implemented(); return false; }
143 
144  virtual bool is_edge_on_side(const unsigned int,
145  const unsigned int) const libmesh_override
146  { libmesh_not_implemented(); return false; }
147 
148  virtual bool is_node_on_edge(const unsigned int,
149  const unsigned int) const libmesh_override
150  { libmesh_not_implemented(); return false; }
151 
152  virtual unsigned int n_sub_elem () const libmesh_override
153  { libmesh_not_implemented(); return 0; }
154 
155  virtual UniquePtr<Elem> side_ptr (const unsigned int) libmesh_override
156  { libmesh_not_implemented(); return UniquePtr<Elem>(); }
157 
158  virtual UniquePtr<Elem> build_side_ptr (const unsigned int,
159  bool) libmesh_override
160  { libmesh_not_implemented(); return UniquePtr<Elem>(); }
161 
162  virtual UniquePtr<Elem> build_edge_ptr (const unsigned int) libmesh_override
163  { libmesh_not_implemented(); return UniquePtr<Elem>(); }
164 
165  virtual Order default_order () const libmesh_override
166  { libmesh_not_implemented(); return FIRST; }
167 
168 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
169 
170  virtual bool infinite () const libmesh_override
171  { libmesh_not_implemented(); return false; }
172 
173 #endif
174 
175 #ifdef LIBMESH_ENABLE_AMR
176 
181  virtual float embedding_matrix (const unsigned int,
182  const unsigned int,
183  const unsigned int) const libmesh_override
184  { libmesh_not_implemented(); return 0.; }
185 
187 
188 #endif // LIBMESH_ENABLE_AMR
189 
190 
191 protected:
192 
197 };
198 
199 // Singleton RemoteElem
200 extern const RemoteElem * remote_elem;
201 
202 } // namespace libMesh
203 
204 #endif // LIBMESH_REMOTE_ELEM_H
static const dof_id_type remote_elem_id
A unique id to distinguish remote element links.
Definition: remote_elem.h:52
Base class for all library singleton objects.
virtual UniquePtr< Elem > build_edge_ptr(const unsigned int) libmesh_override
Definition: remote_elem.h:162
In parallel meshes where a ghost element has neighbors which do not exist on the local processor...
Definition: remote_elem.h:44
virtual Node *& set_node(const unsigned int i)
Definition: elem.h:1941
A Node is like a Point, but with more information.
Definition: node.h:52
virtual unsigned int n_sub_elem() const libmesh_override
Definition: remote_elem.h:152
virtual unsigned int n_sides() const libmesh_override
Definition: remote_elem.h:112
RemoteElem()
Constructor.
Definition: remote_elem.h:58
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
Elem * _elemlinks_data[1]
Data for link to (NULL!) parent.
Definition: remote_elem.h:196
const class libmesh_nullptr_t libmesh_nullptr
virtual bool is_node_on_side(const unsigned int, const unsigned int) const libmesh_override
Definition: remote_elem.h:136
virtual unsigned int which_node_am_i(unsigned int, unsigned int) const libmesh_override
Definition: remote_elem.h:91
virtual UniquePtr< Elem > build_side_ptr(const unsigned int, bool) libmesh_override
Definition: remote_elem.h:158
The libMesh namespace provides an interface to certain functionality in the library.
virtual dof_id_type key(const unsigned int) const libmesh_override
Definition: remote_elem.h:88
virtual unsigned int n_edges() const libmesh_override
Definition: remote_elem.h:118
static const Elem & create()
Return a reference to the global RemoteElem singleton object.
Definition: remote_elem.C:69
virtual bool is_remote() const libmesh_override
Definition: remote_elem.h:95
virtual Node *& set_node(const unsigned int i) libmesh_override
Definition: remote_elem.h:80
dof_id_type & set_id()
Definition: dof_object.h:641
std::unique_ptr< T > UniquePtr
Definition: auto_ptr.h:46
virtual unsigned int n_nodes() const libmesh_override
Definition: remote_elem.h:109
virtual Point master_point(const unsigned int) const libmesh_override
Definition: remote_elem.h:77
virtual dof_id_type key() const
Definition: elem.C:503
virtual ~RemoteElem()
Destructor.
Definition: remote_elem.C:60
virtual Order default_order() const libmesh_override
Definition: remote_elem.h:165
virtual bool is_edge_on_side(const unsigned int, const unsigned int) const libmesh_override
Definition: remote_elem.h:144
virtual bool is_child_on_side(const unsigned int, const unsigned int) const libmesh_override
Definition: remote_elem.h:140
virtual bool infinite() const libmesh_override
Definition: remote_elem.h:170
virtual UniquePtr< Elem > side_ptr(const unsigned int) libmesh_override
Definition: remote_elem.h:155
virtual bool is_node_on_edge(const unsigned int, const unsigned int) const libmesh_override
Definition: remote_elem.h:148
virtual ElemType type() const libmesh_override
Definition: remote_elem.h:103
virtual void connectivity(const unsigned int, const IOPackage, std::vector< dof_id_type > &) const libmesh_override
Definition: remote_elem.h:98
virtual bool is_vertex(const unsigned int) const libmesh_override
Definition: remote_elem.h:127
virtual bool is_face(const unsigned int) const libmesh_override
Definition: remote_elem.h:133
virtual unsigned int n_children() const libmesh_override
Definition: remote_elem.h:124
virtual unsigned int dim() const libmesh_override
Definition: remote_elem.h:106
Order
defines an enum for polynomial orders.
Definition: enum_order.h:32
virtual unsigned int n_faces() const libmesh_override
Definition: remote_elem.h:121
virtual bool is_edge(const unsigned int) const libmesh_override
Definition: remote_elem.h:130
IOPackage
libMesh interfaces with several different software packages for the purposes of creating, reading, and writing mesh files.
virtual unsigned int n_vertices() const libmesh_override
Definition: remote_elem.h:115
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:38
uint8_t dof_id_type
Definition: id_types.h:64
virtual float embedding_matrix(const unsigned int, const unsigned int, const unsigned int) const libmesh_override
Matrix that transforms the parents nodes into the children&#39;s nodes.
Definition: remote_elem.h:181
const RemoteElem * remote_elem
Definition: remote_elem.C:57