dune-grid 2.10
Loading...
Searching...
No Matches
concepts/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_DATAHANDLE_HH
6#define DUNE_GRID_CONCEPTS_DATAHANDLE_HH
7
8#include <concepts>
9
13
14namespace Dune::Concept {
15
16template <class DH>
17concept CommDataHandle = requires(const DH chandle, const Archetypes::Entity<2,0>& entity)
18{
19 typename DH::DataType;
20
21 { chandle.contains(/*dim*/ 0, /*codim*/ 0) } -> std::convertible_to<bool>;
22 { chandle.fixedSize(/*dim*/ 0, /*codim*/ 0) } -> std::convertible_to<bool>;
23 { chandle.size(entity) } -> std::integral;
24
25 requires requires(DH handle, Archetypes::MessageBuffer<typename DH::DataType> buffer)
26 {
27 handle.gather(buffer, entity);
28 handle.scatter(buffer, entity, /*size*/ 0u);
29 };
30};
31
33
34} // end namespace Dune::Concept
35
36
37#endif // DUNE_GRID_CONCEPTS_DATAHANDLE_HH
Definition concepts/datahandle.hh:14
Definition concepts/datahandle.hh:17