| 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: LGPL-2.1-or-later |
| 5 |
|
| 6 |
/** \file |
| 7 |
\brief Provide the usual preprocessor-defines for the dimension and complain |
| 8 |
if the dimension was set incorrectly. |
| 9 |
*/ |
| 10 |
|
| 11 |
|
| 12 |
#ifndef DIMENSION_H |
| 13 |
#define DIMENSION_H |
| 14 |
|
| 15 |
|
| 16 |
#ifdef UG_DIM_2 |
| 17 |
#ifdef UG_DIM_3 |
| 18 |
#error **** define EITHER dimension UG_DIM_2 OR UG_DIM_3 **** |
| 19 |
#endif |
| 20 |
#define DIM 2 |
| 21 |
#define DIM_OF_BND 1 |
| 22 |
#endif |
| 23 |
|
| 24 |
#ifdef UG_DIM_3 |
| 25 |
#define DIM 3 |
| 26 |
#define DIM_OF_BND 2 |
| 27 |
#endif |
| 28 |
|
| 29 |
#ifndef UG_DIM_2 |
| 30 |
#ifndef UG_DIM_3 |
| 31 |
#error **** define at least dimension two OR three **** |
| 32 |
#endif |
| 33 |
#endif |
| 34 |
|
| 35 |
#endif |