Dune Core Modules (unstable)

metis.hh
Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
5#ifndef DUNE_METIS_HH
6#define DUNE_METIS_HH
7
17#if HAVE_METIS
18
19#if HAVE_SCOTCH_METIS
20extern "C" {
21 #include <scotch.h>
22}
23#endif
24
25extern "C" {
26 #include <metis.h>
27}
28
29#if HAVE_SCOTCH_METIS && !defined(SCOTCH_METIS_RETURN) && !defined(METIS_OK)
30 // NOTE: scotchmetis does not define a return type for METIS functions
31 #define METIS_OK 1
32#endif
33
34#endif // HAVE_METIS
35
36namespace Dune::Metis {
37
38#if HAVE_METIS && (defined(REALTYPEWIDTH) || defined(SCOTCH_METIS_DATATYPES))
39 using real_t = ::real_t;
40#else
41 using real_t = double;
42#endif
43
44#if HAVE_METIS && (defined(IDXTYPEWIDTH) || defined(SCOTCH_METIS_DATATYPES))
45 using idx_t = ::idx_t;
46#elif HAVE_METIS && HAVE_SCOTCH_METIS
47 using idx_t = SCOTCH_Num;
48#else
49 using idx_t = int;
50#endif
51
52} // end namespace Dune::Metis
53
54#endif // DUNE_METIS_HH
typename FieldTraits< Type >::real_type real_t
Convenient access to FieldTraits<Type>::real_type.
Definition: typetraits.hh:301
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden & Uni Heidelberg  |  generated with Hugo v0.111.3 (Apr 2, 22:34, 2026)