36 #ifdef LIBMESH_ENABLE_UNIQUE_ID 37 static const unsigned int header_size = 3;
39 static const unsigned int header_size = 2;
43 static const unsigned int idtypes_per_Real =
69 header_size + LIBMESH_DIM*idtypes_per_Real +
81 const unsigned int pre_indexing_size =
85 header_size + LIBMESH_DIM*idtypes_per_Real;
87 const unsigned int indexing_size =
90 const int n_bcs = cast_int<int>
91 (*(in + pre_indexing_size + indexing_size));
92 libmesh_assert_greater_equal (n_bcs, 0);
94 return pre_indexing_size + indexing_size + 1 + n_bcs;
104 return packed_size(std::vector<largest_id_type>::const_iterator(in));
135 std::back_insert_iterator<std::vector<largest_id_type>> data_out,
138 libmesh_assert(node);
141 *data_out++ = (node_magic_header);
147 #ifdef LIBMESH_ENABLE_UNIQUE_ID 149 *data_out++ = (static_cast<largest_id_type>(node->
unique_id()));
156 static const unsigned int idtypes_per_Real =
159 for (
unsigned int i=0; i != LIBMESH_DIM; ++i)
163 for (
unsigned int j=0; j != idtypes_per_Real; ++j)
165 *data_out++ =(Real_as_idtypes[j]);
173 std::vector<boundary_id_type> bcs;
178 *data_out++ =(bcs.size());
180 for (
const auto & bid : bcs)
190 std::back_insert_iterator<std::vector<largest_id_type>> data_out,
193 pack(node, data_out, static_cast<const MeshBase*>(
mesh));
202 std::back_insert_iterator<std::vector<largest_id_type>> data_out,
205 pack(node, data_out, static_cast<const MeshBase*>(
mesh));
217 const std::vector<largest_id_type>::const_iterator original_in = in;
219 libmesh_assert_equal_to (incoming_header, node_magic_header);
224 processor_id < mesh->n_processors());
226 const dof_id_type id = cast_int<dof_id_type>(*in++);
228 #ifdef LIBMESH_ENABLE_UNIQUE_ID 236 libmesh_assert_equal_to (node->processor_id(), processor_id);
246 for (
unsigned int i=0; i != LIBMESH_DIM; ++i)
248 const Real & idtypes_as_Real = *(
reinterpret_cast<const Real *
>(&(*in)));
253 (*node)(i) = idtypes_as_Real;
254 in += idtypes_per_Real;
257 if (!node->has_dofs())
259 node->unpack_indexing(in);
261 node->packed_indexing_size());
262 in += node->packed_indexing_size();
276 for (
unsigned int i=0; i != LIBMESH_DIM; ++i)
278 const Real * idtypes_as_Real =
reinterpret_cast<const Real *
>(&(*in));
279 (*node)(i) = *idtypes_as_Real;
280 in += idtypes_per_Real;
284 #ifdef LIBMESH_ENABLE_UNIQUE_ID 285 node->set_unique_id() = unique_id;
287 node->processor_id() = processor_id;
289 node->unpack_indexing(in);
291 node->packed_indexing_size());
292 in += node->packed_indexing_size();
304 (node, cast_int<boundary_id_type>(*in++));
307 libmesh_assert (in - original_in ==
323 return unpack(in, static_cast<MeshBase*>(
mesh));
334 return unpack(in, static_cast<MeshBase*>(
mesh));
A geometric point in (x,y,z) space associated with a DOF.
static unsigned int unpackable_indexing_size(std::vector< largest_id_type >::const_iterator begin)
uint8_t processor_id_type
unique_id_type unique_id() const
static const Real TOLERANCE
const BoundaryInfo & get_boundary_info() const
long double max(long double a, double b)
std::size_t n_boundary_ids() const
std::vector< boundary_id_type > boundary_ids(const Node *node) const
void add_node(const Node *node, const boundary_id_type id)
static const unique_id_type invalid_unique_id
static const processor_id_type invalid_processor_id
virtual const Node * query_node_ptr(const dof_id_type i) const =0
bool valid_unique_id() const
Mesh data structure which is distributed across all processors.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
unsigned int packed_indexing_size() const
void pack_indexing(std::back_insert_iterator< std::vector< largest_id_type >> target) const
static unsigned int packable_size(const T &object, const Context *context)
static unsigned int packed_size(BufferIter iter)
static void pack(const T &object, OutputIter data_out, const Context *context)
processor_id_type processor_id() const
processor_id_type processor_id() const
static T unpack(BufferIter in, Context *ctx)