dune-grid 2.10
Loading...
Searching...
No Matches
concepts/archetypes/datahandle.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4// vi: set et ts=4 sw=2 sts=2:
5#ifndef DUNE_GRID_CONCEPTS_ARCHETYPES_COMMDATAHANDLE_HH
6#define DUNE_GRID_CONCEPTS_ARCHETYPES_COMMDATAHANDLE_HH
7
8#include <cstddef>
9
11
12#ifndef DOXYGEN
13namespace Dune::Concept::Archetypes {
14
15template <class Data>
16struct CommDataHandle : public Dune::CommDataHandleIF<CommDataHandle<Data>, Data>
17{
18 using DataType = Data;
19
20 bool contains (int dim, int codim) const;
21 bool fixedSize (int dim, int codim) const;
22
23 template <class Entity>
24 std::size_t size (const Entity& entity) const;
25
26 template <class Buffer, class Entity>
27 void gather (Buffer& buffer, const Entity& entity) const;
28
29 template <class Buffer, class Entity>
30 void scatter (Buffer& buffer, const Entity& entity, std::size_t size);
31};
32
33} // end namespace Dune::Concept::Archetypes
34#endif // DOXYGEN
35
36#endif // DUNE_GRID_CONCEPTS_ARCHETYPES_COMMDATAHANDLE_HH
Describes the parallel communication interface class for MessageBuffers and DataHandles.
CommDataHandleIF describes the features of a data handle for communication in parallel runs using the...
Definition datahandleif.hh:78