3.4
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Loading...
Searching...
No Matches
dumux
common
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
35
namespace
Dune
{
36
template
<
int
dim>
37
class
UGGrid;
38
}
// end namespace Dumux
39
#endif
// HAVE_DUNE_UGGRID
40
41
namespace
Dumux::Temp::Capabilities
{
42
43
template
<
class
Gr
id
,
int
codim>
44
struct
canCommunicate
45
{
46
static
const
bool
v
=
false
;
47
};
48
49
#if HAVE_DUNE_UGGRID
50
template
<
int
dim,
int
codim>
51
struct
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
60
namespace
Dumux::Detail
{
61
62
template
<
class
Gr
id
,
int
dofCodim>
63
static
constexpr
bool
canCommunicate
=
64
Dune::Capabilities::canCommunicate<Grid, dofCodim>::v
65
||
Dumux::Temp::Capabilities::canCommunicate<Grid, dofCodim>::v
;
66
67
}
// namespace Dumux
68
69
#endif
Dumux::Temp::Capabilities
Definition
gridcapabilities.hh:41
Dumux::Detail
Definition
gridcapabilities.hh:60
Dumux::Detail::canCommunicate
static constexpr bool canCommunicate
Definition
gridcapabilities.hh:63
Dune
Definition
common/pdesolver.hh:36
Dumux::Temp::Capabilities::canCommunicate
Definition
gridcapabilities.hh:45
Dumux::Temp::Capabilities::canCommunicate::v
static const bool v
Definition
gridcapabilities.hh:46
Generated by
1.16.1