https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
16namespace libMesh
17{
18namespace Parallel
19{
20
27template <>
28class Packing<std::tuple<unsigned int, unsigned int, std::shared_ptr<DenseVector<Real>>>>
29{
30
31public:
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
static std::tuple< unsigned int, unsigned int, std::shared_ptr< DenseVector< Real > > > unpack(BufferIter in, Context *)
static unsigned int packed_size(typename std::vector< Real >::const_iterator in)
Getting the sizes of the packed objects using an iterator.
static void pack(const std::tuple< unsigned int, unsigned int, std::shared_ptr< DenseVector< Real > > > &object, Iter data_out, const Context *)
static unsigned int packable_size(const std::tuple< unsigned int, unsigned int, std::shared_ptr< DenseVector< Real > > > &object, const void *)
Getting the sizes of the packed objects using the object itself.
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real