libMesh
Loading...
Searching...
No Matches
parallel_node.h
Go to the documentation of this file.
1// The libMesh Finite Element Library.
2// Copyright (C) 2002-2026 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#ifndef LIBMESH_PARALLEL_NODE_H
20#define LIBMESH_PARALLEL_NODE_H
21
22// libMesh includes
23#include "libmesh/id_types.h"
24#include "libmesh/libmesh_config.h"
25
26// TIMPI includes
27#include "timpi/packing.h"
28
29
30namespace libMesh
31{
32
33// Forward declarations
34class Node;
35
36namespace Parallel
37{
38
39template <>
40class Packing<const Node *>
41{
42public:
44
45 template <typename OutputIter, typename Context>
46 static void pack(const Node * const & object,
47 OutputIter data_out,
48 const Context * context);
49
50 template <typename Context>
51 static unsigned int packable_size(const Node * const & object,
52 const Context * context);
53
54 template <typename BufferIter>
55 static unsigned int packed_size(BufferIter iter);
56
57 template <typename BufferIter, typename Context>
58 static const Node * unpack(BufferIter in, Context * ctx);
59};
60
61
62template <>
63class Packing<Node *>
64{
65public:
67
68 template <typename OutputIter, typename Context>
69 static void pack(Node * const & object,
70 OutputIter data_out,
71 const Context * context)
72 { return Packing<const Node *>::pack(object, data_out, context); }
73
74 template <typename Context>
75 static unsigned int packable_size(Node * const & object,
76 const Context * context)
77 { return Packing<const Node*>::packable_size(object, context); }
78
79 template <typename BufferIter>
80 static unsigned int packed_size(BufferIter iter)
82
83 template <typename BufferIter, typename Context>
84 static Node * unpack(BufferIter in, Context * ctx);
85};
86
87
88template <typename BufferIter, typename Context>
89inline const Node *
90Packing<const Node *>::unpack(BufferIter in, Context * ctx)
91{ return Packing<Node *>::unpack(in, ctx); }
92
93
94template <>
95class Packing<Node * const>
96{
97public:
99
100 template <typename OutputIter, typename Context>
101 static void pack(Node * const & object,
102 OutputIter data_out,
103 const Context * context)
104 { return Packing<const Node *>::pack(object, data_out, context); }
105
106 template <typename Context>
107 static unsigned int packable_size(Node * const & object,
108 const Context * context)
109 { return Packing<const Node*>::packable_size(object, context); }
110
111 template <typename BufferIter>
112 static unsigned int packed_size(BufferIter iter)
113 { return Packing<const Node *>::packed_size(iter); }
114
115 template <typename BufferIter, typename Context>
116 static Node * unpack(BufferIter in, Context * ctx)
117 { return Packing<Node *>::unpack(in, ctx); }
118};
119
120
121template <>
122class Packing<const Node * const>
123{
124public:
126
127 template <typename OutputIter, typename Context>
128 static void pack(Node * const & object,
129 OutputIter data_out,
130 const Context * context)
131 { return Packing<const Node *>::pack(object, data_out, context); }
132
133 template <typename Context>
134 static unsigned int packable_size(Node * const & object,
135 const Context * context)
136 { return Packing<const Node*>::packable_size(object, context); }
137
138 template <typename BufferIter>
139 static unsigned int packed_size(BufferIter iter)
140 { return Packing<const Node *>::packed_size(iter); }
141
142 template <typename BufferIter, typename Context>
143 static Node * unpack(BufferIter in, Context * ctx)
144 { return Packing<Node *>::unpack(in, ctx); }
145};
146
147
148} // namespace Parallel
149} // namespace libMesh
150
151#endif // LIBMESH_PARALLEL_NODE_H
A Node is like a Point, but with more information.
Definition node.h:55
static Node * unpack(BufferIter in, Context *ctx)
static void pack(Node *const &object, OutputIter data_out, const Context *context)
static unsigned int packed_size(BufferIter iter)
static unsigned int packable_size(Node *const &object, const Context *context)
static Node * unpack(BufferIter in, Context *ctx)
static unsigned int packed_size(BufferIter iter)
static unsigned int packable_size(Node *const &object, const Context *context)
static void pack(Node *const &object, OutputIter data_out, const Context *context)
static unsigned int packed_size(BufferIter iter)
static void pack(const Node *const &object, OutputIter data_out, const Context *context)
static unsigned int packable_size(const Node *const &object, const Context *context)
static const Node * unpack(BufferIter in, Context *ctx)
static unsigned int packed_size(BufferIter iter)
static void pack(Node *const &object, OutputIter data_out, const Context *context)
static unsigned int packable_size(Node *const &object, const Context *context)
static Node * unpack(BufferIter in, Context *ctx)
std::pair< T1, T2 > unpack(BufferIter in, Context *ctx)
static unsigned int packed_size(BufferIter iter)
unsigned int packable_size(const std::pair< T1, T2 > &pr, const Context *ctx)
void pack(const std::pair< T1, T2 > &pr, OutputIter data_out, const Context *ctx)
The libMesh namespace provides an interface to certain functionality in the library.
uint64_t largest_id_type
Definition id_types.h:148