DUNE PDELab (git)

albertaheader.hh
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4// vi: set et ts=4 sw=2 sts=2:
5#ifndef DUNE_ALBERTAHEADER_HH
6#define DUNE_ALBERTAHEADER_HH
7
8#if HAVE_ALBERTA
9
10#if not (ALBERTA_DIM > 0)
11 #if HEADERCHECK
12 #undef ALBERTA_DIM
13 #define ALBERTA_DIM 2
14 #else
15 #error ALBERTA_DIM should be 1, 2, or 3
16 #endif
17#endif
18
19// Set ALBERTA's DIM_OF_WORLD preprocessor variable
20#ifndef ALBERTA_DIM
21#error "ALBERTA_DIM needed to use AlbertaGrid."
22#endif
23#define DIM_OF_WORLD ALBERTA_DIM
24
25// if we have ALBERTA C++ lib define namespace for ALBERTA
26#ifdef __ALBERTApp__
27#define ALBERTA Alberta::
28#else
29#define ALBERTA ::
30#endif
31
32#ifndef ALBERTA_DEBUG
33#define ALBERTA_DEBUG 0
34#endif
35
36// MAX, MIN, and ABS are defined macros of ALBERTA
37// if they are not defined elsewhere, they are undefined here
38#ifndef MAX
39#define _MAX_NOT_DEFINED_
40#endif
41
42#ifndef MIN
43#define _MIN_NOT_DEFINED_
44#endif
45
46#ifndef ABS
47#define _ABS_NOT_DEFINED_
48#endif
49
50#ifndef DIM_OF_WORLD
51#error "DIM_OF_WORLD not defined."
52#endif
53
54#ifdef HAVE_CONFIG_H
55#define ALBERTASAVE_HAVE_CONFIG_H HAVE_CONFIG_H
56#undef HAVE_CONFIG_H
57#endif
58
59#include <alberta/alberta.h>
60
61#ifdef ALBERTASAVE_HAVE_CONFIG_H
62#define HAVE_CONFIG_H ALBERTASAVE_HAVE_CONFIG_H
63#undef ALBERTASAVE_HAVE_CONFIG_H
64#endif
65
66#ifndef _ALBERTA_H_
67#error "Unable to include alberta.h."
68#endif
69
70// Macro nil may be defined by alberta_util.h. If so, undefine it.
71#ifdef nil
72#undef nil
73#endif
74
75#endif // #if HAVE_ALBERTA
76
77#endif // #ifndef DUNE_ALBERTAHEADER_HH
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 13, 23:29, 2024)