Dune Core Modules (2.4.2)

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