3.4
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
gridcapabilities.hh
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3/*****************************************************************************
4 * See the file COPYING for full copying permissions. *
5 * *
6 * This program is free software: you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation, either version 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
24#ifndef DUMUX_COMMON_GRID_CAPABILITIES_HH
25#define DUMUX_COMMON_GRID_CAPABILITIES_HH
26
27#include <dune/grid/common/capabilities.hh>
28
29// TODO: The following is a temporary solution to make canCommunicate work.
30// Once it is resolved upstream
31// (https://gitlab.dune-project.org/core/dune-grid/issues/78),
32// it should be guarded by a DUNE_VERSION macro and removed later.
33
34#if HAVE_DUNE_UGGRID
35namespace Dune {
36template<int dim>
37class UGGrid;
38} // end namespace Dumux
39#endif // HAVE_DUNE_UGGRID
40
42
43template<class Grid, int codim>
45{
46 static const bool v = false;
47};
48
49#if HAVE_DUNE_UGGRID
50template<int dim, int codim>
51struct canCommunicate<Dune::UGGrid<dim>, codim>
52{
53 static const bool v = true;
54};
55#endif // HAVE_DUNE_UGGRID
56
57} // namespace Dumux::Temp::Capabilities
58// end workaround
59
60namespace Dumux::Detail {
61
62template<class Grid, int dofCodim>
63static constexpr bool canCommunicate =
64 Dune::Capabilities::canCommunicate<Grid, dofCodim>::v
66
67} // namespace Dumux
68
69#endif
Definition: gridcapabilities.hh:41
Definition: gridcapabilities.hh:60
static constexpr bool canCommunicate
Definition: gridcapabilities.hh:63
Definition: common/pdesolver.hh:36
Definition: gridcapabilities.hh:45
static const bool v
Definition: gridcapabilities.hh:46