parallel_node.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2018 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 // Local Includes
23 #include "libmesh/libmesh_config.h"
24 
25 #include "libmesh/node.h"
26 #include "libmesh/id_types.h"
27 
28 namespace libMesh
29 {
30 namespace Parallel
31 {
32 
33 template <>
34 class Packing<const Node *>
35 {
36 public:
38 
39  template <typename OutputIter, typename Context>
40  static void pack(const Node * const & object,
41  OutputIter data_out,
42  const Context * context);
43 
44  template <typename Context>
45  static unsigned int packable_size(const Node * const & object,
46  const Context * context);
47 
48  template <typename BufferIter>
49  static unsigned int packed_size(BufferIter iter);
50 
51  template <typename BufferIter, typename Context>
52  static const Node * unpack(BufferIter in, Context * ctx);
53 };
54 
55 
56 template <>
57 class Packing<Node *>
58 {
59 public:
61 
62  template <typename OutputIter, typename Context>
63  static void pack(Node * const & object,
64  OutputIter data_out,
65  const Context * context)
66  { return Packing<const Node *>::pack(object, data_out, context); }
67 
68  template <typename Context>
69  static unsigned int packable_size(Node * const & object,
70  const Context * context)
71  { return Packing<const Node*>::packable_size(object, context); }
72 
73  template <typename BufferIter>
74  static unsigned int packed_size(BufferIter iter)
75  { return Packing<const Node *>::packed_size(iter); }
76 
77  template <typename BufferIter, typename Context>
78  static Node * unpack(BufferIter in, Context * ctx);
79 };
80 
81 
82 template <typename BufferIter, typename Context>
83 inline const Node *
84 Packing<const Node *>::unpack(BufferIter in, Context * ctx)
85 { return Packing<Node *>::unpack(in, ctx); }
86 
87 
88 
89 } // namespace Parallel
90 } // namespace libMesh
91 
92 #endif // LIBMESH_PARALLEL_NODE_H
A geometric point in (x,y,z) space associated with a DOF.
Definition: node.h:52
uint64_t largest_id_type
Definition: id_types.h:139
static unsigned int packed_size(BufferIter iter)
Definition: parallel_node.h:74
static unsigned int packable_size(Node *const &object, const Context *context)
Definition: parallel_node.h:69
static void pack(Node *const &object, OutputIter data_out, const Context *context)
Definition: parallel_node.h:63
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)
static T unpack(BufferIter in, Context *ctx)