| 1 |
// ------------------------------------------------------------------------ |
| 2 |
// |
| 3 |
// SPDX-License-Identifier: LGPL-2.1-or-later |
| 4 |
// Copyright (C) 2023 - 2024 by the deal.II authors |
| 5 |
// |
| 6 |
// This file is part of the deal.II library. |
| 7 |
// |
| 8 |
// Part of the source code is dual licensed under Apache-2.0 WITH |
| 9 |
// LLVM-exception OR LGPL-2.1-or-later. Detailed license information |
| 10 |
// governing the source code and code contributions can be found in |
| 11 |
// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II. |
| 12 |
// |
| 13 |
// ------------------------------------------------------------------------ |
| 14 |
|
| 15 |
#ifndef dealii_sundials_types_h |
| 16 |
#define dealii_sundials_types_h |
| 17 |
|
| 18 |
#include <deal.II/base/config.h> |
| 19 |
|
| 20 |
#ifdef DEAL_II_WITH_SUNDIALS |
| 21 |
# include <sundials/sundials_types.h> |
| 22 |
|
| 23 |
DEAL_II_NAMESPACE_OPEN |
| 24 |
|
| 25 |
namespace SUNDIALS |
| 26 |
{ |
| 27 |
/** |
| 28 |
* Alias for the bool and real types used by SUNDIALS. |
| 29 |
*/ |
| 30 |
# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0) |
| 31 |
using booltype = sunbooleantype; |
| 32 |
using realtype = ::sunrealtype; |
| 33 |
# else |
| 34 |
using booltype = booleantype; |
| 35 |
using realtype = ::realtype; |
| 36 |
# endif |
| 37 |
} // namespace SUNDIALS |
| 38 |
|
| 39 |
DEAL_II_NAMESPACE_CLOSE |
| 40 |
|
| 41 |
#else |
| 42 |
|
| 43 |
// Make sure the scripts that create the C++20 module input files have |
| 44 |
// something to latch on if the preprocessor #ifdef above would |
| 45 |
// otherwise lead to an empty content of the file. |
| 46 |
DEAL_II_NAMESPACE_OPEN |
| 47 |
DEAL_II_NAMESPACE_CLOSE |
| 48 |
|
| 49 |
#endif // DEAL_II_WITH_SUNDIALS |
| 50 |
#endif // dealii_sundials_types_h |