version 3.11-dev
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// SPDX-FileCopyrightText: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
12#ifndef DUMUX_COMMON_GRID_CAPABILITIES_HH
13#define DUMUX_COMMON_GRID_CAPABILITIES_HH
14
15#include <dune/grid/common/capabilities.hh>
16
18
19// Default implementation
20// The grid capability gives an absolute guarantee
21// however this does not mean that multithreading is not
22// supported at all. It might still work for some special cases.
23// This knowledge is encoded in specializations for the different
24// grid managers, see dumux/grid/io/gridmanager_*.hh
25template<class Grid>
27{
28 template<class GV>
29 static bool eval(const GV&) // default is independent of the grid view
30 { return Dune::Capabilities::viewThreadSafe<Grid>::v; }
31};
32
33template<class GridView>
34inline bool supportsMultithreading(const GridView& gridView)
36
37} // namespace Dumux::Grid::Capabilities
38
39#endif
Definition: gridcapabilities.hh:17
bool supportsMultithreading(const GridView &gridView)
Definition: gridcapabilities.hh:34
Definition: gridcapabilities.hh:27
static bool eval(const GV &)
Definition: gridcapabilities.hh:29