20 #ifndef LIBMESH_NODE_H 21 #define LIBMESH_NODE_H 24 #include "libmesh/point.h" 25 #include "libmesh/dof_object.h" 26 #include "libmesh/reference_counted_object.h" 76 #ifdef LIBMESH_ENABLE_DEPRECATED 94 explicit Node (
const T x) :
115 #ifdef LIBMESH_ENABLE_DEPRECATED 116 static std::unique_ptr<Node>
build (
const Node & n);
122 static std::unique_ptr<Node>
build (
const Point & p,
129 static std::unique_ptr<Node>
build (
const Real x,
158 #ifdef LIBMESH_HAVE_MPI 161 const unsigned int header_size = 2;
164 static const unsigned int idtypes_per_Real =
167 return header_size + LIBMESH_DIM*idtypes_per_Real +
171 #endif // #ifdef LIBMESH_HAVE_MPI 180 #ifdef LIBMESH_ENABLE_NODE_VALENCE 183 libmesh_not_implemented();
208 #ifdef LIBMESH_ENABLE_NODE_VALENCE 245 #ifdef LIBMESH_ENABLE_NODE_VALENCE
254 #ifdef LIBMESH_ENABLE_DEPRECATED 260 #ifdef LIBMESH_ENABLE_NODE_VALENCE
265 libmesh_deprecated();
267 #endif // LIBMESH_ENABLE_DEPRECATED 275 #ifdef LIBMESH_ENABLE_NODE_VALENCE
313 #ifdef LIBMESH_ENABLE_DEPRECATED 317 libmesh_deprecated();
318 return std::make_unique<Node>(n);
328 return std::make_unique<Node>(p,
id);
339 return std::make_unique<Node>(x,y,z,
id);
352 #ifdef LIBMESH_ENABLE_NODE_VALENCE 357 _valence = cast_int<valence_idx_t>(val);
365 libmesh_not_implemented();
368 #endif // #ifdef LIBMESH_ENABLE_NODE_VALENCE 373 #endif // LIBMESH_NODE_H A Node is like a Point, but with more information.
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value for an unsigned int...
unsigned int packed_size() const
Node(const T x)
Disambiguate constructing from non-Real scalars.
Node & operator=(const Point &p)
Assign to a node from a point.
valence_idx_t _valence
The number of nodes connected with this node.
void set_valence(unsigned int val)
Sets the number of nodes connected with this node.
This is the base class from which all geometric element types are derived.
std::ostream & operator<<(std::ostream &os, const OrderWrapper &order)
Overload stream operators.
The libMesh namespace provides an interface to certain functionality in the library.
processor_id_type choose_processor_id(processor_id_type pid1, processor_id_type pid2) const
Return which of pid1 and pid2 would be preferred by the current load-balancing heuristic applied to t...
uint8_t processor_id_type
unsigned char valence_idx_t
Type used to store node valence.
Node(const Real x=0, const Real y=0, const Real z=0, const dof_id_type id=invalid_id)
Constructor.
void print_info(std::ostream &os=libMesh::out) const
Prints relevant information about the node.
Implements (adaptive) mesh refinement algorithms for a MeshBase.
bool operator==(const Node &rhs) const
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
unsigned int valence() const
This class implements reference counting.
static std::unique_ptr< Node > build(const Node &n)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
unsigned int packed_indexing_size() const
If we pack our indices into an buffer for communications, how many ints do we need?
The DofObject defines an abstract base class for objects that have degrees of freedom associated with...
A Point defines a location in LIBMESH_DIM dimensional Real space.
std::string get_info() const
Prints relevant information about the node to a string.