Dune Core Modules (2.10.0)

metis.hh
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
15#if HAVE_METIS
16
17#if HAVE_SCOTCH_METIS
18extern "C" {
19 #include <scotch.h>
20}
21#endif
22
23extern "C" {
24 #include <metis.h>
25}
26
27#if HAVE_SCOTCH_METIS && !defined(SCOTCH_METIS_RETURN) && !defined(METIS_OK)
28 // NOTE: scotchmetis does not define a return type for METIS functions
29 #define METIS_OK 1
30#endif
31
32namespace Dune::Metis {
33
34#if defined(REALTYPEWIDTH) || defined(SCOTCH_METIS_DATATYPES)
35 using real_t = ::real_t;
36#else
37 using real_t = double;
38#endif
39
40#if defined(IDXTYPEWIDTH) || defined(SCOTCH_METIS_DATATYPES)
41 using idx_t = ::idx_t;
42#elif HAVE_SCOTCH_METIS
43 using idx_t = SCOTCH_Num;
44#else
45 using idx_t = int;
46#endif
47
48} // end namespace Dune::Metis
49
50#endif // HAVE_METIS
51#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  |  generated with Hugo v0.111.3 (Dec 27, 23:30, 2024)