https://mooseframework.inl.gov
VectorPacker.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "libmesh/packing.h"
13 #include "libmesh/dense_vector.h"
14 #include "MooseTypes.h"
15 
16 namespace libMesh
17 {
18 namespace Parallel
19 {
20 
27 template <>
28 class Packing<std::tuple<unsigned int, unsigned int, std::shared_ptr<DenseVector<Real>>>>
29 {
30 
31 public:
32  typedef Real buffer_type;
33 
35  static unsigned int packed_size(typename std::vector<Real>::const_iterator in);
36 
38  static unsigned int packable_size(
39  const std::tuple<unsigned int, unsigned int, std::shared_ptr<DenseVector<Real>>> & object,
40  const void *);
41 
42  // Pack the objects on the sending process.
43  template <typename Iter, typename Context>
44  static void
45  pack(const std::tuple<unsigned int, unsigned int, std::shared_ptr<DenseVector<Real>>> & object,
46  Iter data_out,
47  const Context *);
48 
49  // Unpack the object on the receiving process.
50  template <typename BufferIter, typename Context>
51  static std::tuple<unsigned int, unsigned int, std::shared_ptr<DenseVector<Real>>>
52  unpack(BufferIter in, Context *);
53 };
54 
55 } // namespace Parallel
56 } // namespace libMesh
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
static T unpack(BufferIter in, Context *ctx)
static unsigned int packable_size(const T &object, const Context *context)
static unsigned int packed_size(BufferIter iter)
Context
static void pack(const T &object, OutputIter data_out, const Context *context)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real