184{
185#ifndef NDEBUG
186 const std::vector<largest_id_type>::const_iterator original_in = in;
188 libmesh_assert_equal_to (incoming_header, node_magic_header);
189#endif
190
193 processor_id < mesh->n_processors());
194
195 const dof_id_type id = cast_int<dof_id_type>(*in++);
196
197#ifdef LIBMESH_ENABLE_UNIQUE_ID
199#endif
200
202
203 if (node)
204 {
205 libmesh_assert_equal_to (node->
processor_id(), processor_id);
206
207
208
209
210
211
212
213
214
215 for (unsigned int i=0; i != LIBMESH_DIM; ++i)
216 {
217 Real idtypes_as_Real;
218 std::memcpy(&idtypes_as_Real, &(*in),
sizeof(
Real));
219 in += idtypes_per_Real;
220 libmesh_assert_less_equal ((*node)(i), idtypes_as_Real + (std::max(
Real(1),idtypes_as_Real)*
TOLERANCE*
TOLERANCE));
221 libmesh_assert_greater_equal ((*node)(i), idtypes_as_Real - (std::max(
Real(1),idtypes_as_Real)*
TOLERANCE*
TOLERANCE));
222
224 (*node)(i) = idtypes_as_Real;
225 }
226
228 {
233 }
234 else
235 {
236
237
239 }
240 }
241 else
242 {
243
244
245
246 auto unode = std::make_unique<Node>();
247
248 for (unsigned int i=0; i != LIBMESH_DIM; ++i)
249 {
250 Real idtypes_as_Real;
251 std::memcpy(&idtypes_as_Real, &(*in),
sizeof(
Real));
252 (*unode)(i) = idtypes_as_Real;
253 in += idtypes_per_Real;
254 }
255
256 unode->set_id() = id;
257#ifdef LIBMESH_ENABLE_UNIQUE_ID
258 unode->set_unique_id(unique_id);
259#endif
260 unode->processor_id() = processor_id;
261
262 unode->unpack_indexing(in);
264 unode->packed_indexing_size());
265 in += unode->packed_indexing_size();
266
268 }
269
270
271
272
273
275
276
279 (node, cast_int<boundary_id_type>(*in++));
280
281#ifndef NDEBUG
283 cast_int<int>
285#endif
286
287 return node;
288}
void add_node(const Node *node, const boundary_id_type id)
Add Node node with boundary id id to the boundary information data structures.
static unsigned int unpackable_indexing_size(std::vector< largest_id_type >::const_iterator begin)
If we have indices packed into an buffer for communications, how much of that buffer applies to this ...
processor_id_type processor_id() const
static constexpr processor_id_type invalid_processor_id
An invalid processor_id to distinguish DoFs that have not been assigned to a processor.
unsigned int packed_indexing_size() const
If we pack our indices into an buffer for communications, how many ints do we need?
void unpack_indexing(std::vector< largest_id_type >::const_iterator begin)
A method for creating our index buffer from packed data - basically with our current implementation w...
bool has_dofs(const unsigned int s=libMesh::invalid_uint) const
const BoundaryInfo & get_boundary_info() const
The information about boundary ids on the mesh.
virtual const Node * query_node_ptr(const dof_id_type i) const =0
virtual Node * add_node(Node *n)=0
Add Node n to the end of the vertex array.
A Node is like a Point, but with more information.
processor_id_type processor_id() const
static constexpr Real TOLERANCE
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
uint8_t processor_id_type