forked from ecell/epdp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OldDefs.hpp
50 lines (35 loc) · 1.11 KB
/
OldDefs.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#if !defined( __OLDDEFS_HPP )
#define __OLDDEFS_HPP
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif /* HAVE_CONFIG_H */
#include <vector>
#include <boost/multi_array.hpp>
#include <cmath>
#include "Defs.hpp"
// This file is needed temporarily by GreensFunction1DAbsAbs.cpp
// and GreensFunction1DRadAbs.cpp
//
// At some point it should be taken out of the new code version.
// This requires some major refurbishment of the above functions, so postponed for later.
//
// All passages conflicting with analogous definitions in the new Defs.hpp are taken out.
//
typedef std::vector< Real > RealVector;
typedef boost::multi_array<Real, 2>
Real2DArray;
typedef boost::multi_array<Real, 3>
Real3DArray;
typedef boost::multi_array<Real, 4>
Real4DArray;
// stringifiers. see preprocessor manual
#define XSTR( S ) STR( S )
#define STR( S ) #S
#define THROW_UNLESS( CLASS, EXPRESSION ) \
if( ! ( EXPRESSION ) )\
{\
throw CLASS( "Check [" + std::string( STR( EXPRESSION ) ) +\
"] failed." );\
}\
#define IGNORE_RETURN (void)
#endif // __OLDDEFS_HPP