Dune Core Modules (unstable)

datahandle.hh
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
CommDataHandleIF describes the features of a data handle for communication in parallel runs using the...
Definition: datahandleif.hh:78
Describes the parallel communication interface class for MessageBuffers and DataHandles.
constexpr std::integral_constant< std::size_t, sizeof...(II)> size(std::integer_sequence< T, II... >)
Return the size of the sequence.
Definition: integersequence.hh:75
constexpr std::bool_constant<((II==value)||...)> contains(std::integer_sequence< T, II... >, std::integral_constant< T, value >)
Checks whether or not a given sequence contains a value.
Definition: integersequence.hh:137
std::size_t fixedSize
The number of data items per index if it is fixed, 0 otherwise.
Definition: variablesizecommunicator.hh:264
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 22, 23:33, 2024)