20 #ifndef LIBMESH_REMOTE_ELEM_H 21 #define LIBMESH_REMOTE_ELEM_H 24 #include "libmesh/elem.h" 25 #include "libmesh/libmesh_singleton.h" 30 #define remote_elem_error(func_name) \ 32 std::stringstream message_stream; \ 33 message_stream << "RemoteElem::" << func_name << " was called. A RemoteElem is not a\n" << \ 34 "real Elem, merely a shim accessible on distributed meshes via\n" << \ 35 "Elem::neighbor_ptr(), to indicate when a neighbor exists but is not\n" << \ 36 "local or ghosted on this processor. Calling this method was an\n" << \ 37 "application or library error. Investigate a stack trace for details.\n"; \ 38 libMesh::Threads::lock_singleton_spin_mutex(); \ 39 libMesh::MacroFunctions::report_error(__FILE__, __LINE__, LIBMESH_DATE, LIBMESH_TIME, message_stream); \ 40 libMesh::Threads::unlock_singleton_spin_mutex(); \ 41 LIBMESH_THROW(libMesh::LogicError(message_stream.str())); \ 78 { this->
set_id(remote_elem_id); }
99 { remote_elem_error(
"master_point");
return Point(); }
101 #ifdef LIBMESH_ENABLE_DEPRECATED 104 #endif // LIBMESH_ENABLE_DEPRECATED 107 { remote_elem_error(
"set_node"); }
115 { remote_elem_error(
"key");
return 0; }
118 { remote_elem_error(
"low_order_key");
return 0; }
121 unsigned int )
const override 122 { remote_elem_error(
"local_side_node");
return 0; }
125 unsigned int )
const override 126 { remote_elem_error(
"local_edge_node");
return 0; }
133 std::vector<dof_id_type> &)
const override 134 { remote_elem_error(
"connectivity"); }
139 virtual unsigned short dim ()
const override 140 { remote_elem_error(
"dim");
return 0; }
142 virtual unsigned int n_nodes ()
const override 143 { remote_elem_error(
"n_nodes");
return 0; }
145 virtual unsigned int n_sides ()
const override 146 { remote_elem_error(
"n_sides");
return 0; }
149 { remote_elem_error(
"n_vertices");
return 0; }
151 virtual unsigned int n_edges ()
const override 152 { remote_elem_error(
"n_edges");
return 0; }
154 virtual unsigned int n_faces ()
const override 155 { remote_elem_error(
"n_faces");
return 0; }
158 { remote_elem_error(
"n_children");
return 0; }
160 virtual bool is_vertex(
const unsigned int)
const override 161 { remote_elem_error(
"is_vertex");
return false; }
163 virtual bool is_edge(
const unsigned int)
const override 164 { remote_elem_error(
"is_edge");
return false; }
166 virtual bool is_face(
const unsigned int)
const override 167 { remote_elem_error(
"is_face");
return false; }
170 const unsigned int)
const override 171 { remote_elem_error(
"is_node_on_side");
return false; }
173 virtual std::vector<unsigned int>
nodes_on_side(
const unsigned int)
const override 174 { remote_elem_error(
"nodes_on_side");
return {0}; }
176 virtual std::vector<unsigned int>
nodes_on_edge(
const unsigned int)
const override 177 { remote_elem_error(
"nodes_on_edge");
return {0}; }
180 { remote_elem_error(
"edges_adjacent_to_node");
return {0};}
182 virtual std::vector<unsigned int>
sides_on_edge(
const unsigned int)
const override 183 { remote_elem_error(
"sides_on_edge");
return {0}; }
186 const unsigned int)
const override 187 { remote_elem_error(
"is_child_on_side");
return false; }
190 const unsigned int)
const override 191 { remote_elem_error(
"is_edge_on_side");
return false; }
194 const unsigned int)
const override 195 { remote_elem_error(
"is_node_on_edge");
return false; }
198 { remote_elem_error(
"n_sub_elem");
return 0; }
200 virtual std::unique_ptr<Elem>
side_ptr (
const unsigned int)
override 201 { remote_elem_error(
"side_ptr");
return std::unique_ptr<Elem>(); }
204 const unsigned int)
override 205 { remote_elem_error(
"side_ptr"); }
208 { remote_elem_error(
"build_side_ptr");
return std::unique_ptr<Elem>(); }
211 const unsigned int)
override 212 { remote_elem_error(
"build_side_ptr"); }
218 { remote_elem_error(
"build_edge_ptr");
return std::unique_ptr<Elem>(); }
220 virtual void build_edge_ptr (std::unique_ptr<Elem> &,
const unsigned int)
override 221 { remote_elem_error(
"build_edge_ptr"); }
224 { remote_elem_error(
"default_order");
return static_cast<Order>(1); }
226 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 229 { remote_elem_error(
"infinite");
return false; }
233 #ifdef LIBMESH_ENABLE_AMR 241 const unsigned int)
const override 242 { remote_elem_error(
"embedding_matrix");
return 0.; }
246 #endif // LIBMESH_ENABLE_AMR 249 { remote_elem_error(
"n_permutations");
return 0; }
252 { remote_elem_error(
"permute"); }
255 { remote_elem_error(
"flip"); }
258 { remote_elem_error(
"is_flipped");
return false; }
261 { remote_elem_error(
"center_node_on_side");
return invalid_uint; }
264 { remote_elem_error(
"side_type");
return INVALID_ELEM; }
268 { remote_elem_error(
"on_reference_element");
return false; }
283 #endif // LIBMESH_REMOTE_ELEM_H static const dof_id_type remote_elem_id
A unique id to distinguish remote element links.
Base class for all library singleton objects.
virtual bool on_reference_element(const Point &, const Real=TOLERANCE) const override
ElemType
Defines an enum for geometric element types.
LIBMESH_ENABLE_TOPOLOGY_CACHES
virtual std::unique_ptr< Elem > build_edge_ptr(const unsigned int) override
virtual dof_id_type key(const unsigned int) const override
Order
defines an enum for polynomial orders.
In parallel meshes where a ghost element has neighbors which do not exist on the local processor...
virtual Node *& set_node(const unsigned int i)
A Node is like a Point, but with more information.
virtual std::vector< unsigned int > nodes_on_edge(const unsigned int) const override
virtual std::vector< unsigned int > nodes_on_side(const unsigned int) const override
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value for an unsigned int...
virtual void flip(BoundaryInfo *) override final
Flips the element (by swapping node and neighbor pointers) to have a mapping Jacobian of opposite sig...
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i)=0
virtual dof_id_type key() const
static constexpr Real TOLERANCE
virtual unsigned int n_nodes() const override
virtual bool is_flipped() const override final
IOPackage
libMesh interfaces with several different software packages for the purposes of creating, reading, and writing mesh files.
This is the base class from which all geometric element types are derived.
Elem * _elemlinks_data[1]
Data for link to (nullptr!) parent.
virtual void set_node(const unsigned int, Node *) override
Sets local Node i to refer to node.
virtual unsigned int center_node_on_side(const unsigned short) const override
The libMesh namespace provides an interface to certain functionality in the library.
static const Elem & create()
Return a reference to the global RemoteElem singleton object.
virtual unsigned int n_sides() const override
virtual std::vector< unsigned int > edges_adjacent_to_node(const unsigned int) const override
virtual unsigned int n_vertices() const override
virtual unsigned int n_permutations() const override
Returns the number of independent permutations of element nodes - e.g.
virtual unsigned int local_side_node(unsigned int, unsigned int) const override
virtual bool is_node_on_edge(const unsigned int, const unsigned int) const override
virtual ~RemoteElem()
Sets remote_elem to nullptr.
virtual Point master_point(const unsigned int) const override
virtual bool is_remote() const override
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int) override
RemoteElem & operator=(const RemoteElem &)=delete
virtual void connectivity(const unsigned int, const IOPackage, std::vector< dof_id_type > &) const override
virtual ElemType type() const override
virtual bool is_face(const unsigned int) const override
The BoundaryInfo class contains information relevant to boundary conditions including storing faces...
virtual unsigned int n_faces() const override
virtual unsigned int n_sub_elem() const override
virtual std::vector< unsigned int > sides_on_edge(const unsigned int) const override
virtual bool is_node_on_side(const unsigned int, const unsigned int) const override
virtual bool is_edge_on_side(const unsigned int, const unsigned int) const override
virtual unsigned short dim() const override
virtual bool is_edge(const unsigned int) const override
virtual std::unique_ptr< Elem > side_ptr(const unsigned int) override
virtual Real embedding_matrix(const unsigned int, const unsigned int, const unsigned int) const override
Matrix that transforms the parents nodes into the children's nodes.
virtual bool is_vertex(const unsigned int) const override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void permute(unsigned int) override
Permutes the element (by swapping node and neighbor pointers) according to the specified index...
virtual Node *& set_node(const unsigned int i) override
virtual unsigned int n_edges() const override
virtual unsigned int n_children() const override
virtual void build_side_ptr(std::unique_ptr< Elem > &, const unsigned int) override
Resets the loose element side, which may currently point to a different side than i or even a differe...
virtual Order default_order() const override
virtual void build_edge_ptr(std::unique_ptr< Elem > &, const unsigned int) override
Resets the loose element edge, which may currently point to a different edge than i or even a differe...
virtual void side_ptr(std::unique_ptr< Elem > &, const unsigned int) override
Resets the loose element side, which may currently point to a different side than i or even a differe...
virtual dof_id_type low_order_key(const unsigned int) const override
virtual bool infinite() const override
A Point defines a location in LIBMESH_DIM dimensional Real space.
virtual unsigned int local_edge_node(unsigned int, unsigned int) const override
Similar to Elem::local_side_node(), but instead of a side id, takes an edge id and a node id on that ...
virtual ElemType side_type(const unsigned int) const override
virtual bool is_child_on_side(const unsigned int, const unsigned int) const override
const RemoteElem * remote_elem