49#define DEFAULT_NUM_EPSILON 1e-9
50#define MINEPSILON 1e-20
52#define THROW_LOGICAL_ERROR1( msg1 ) \
54 std::ostringstream s; \
55 s << "[LOGICAL ERROR:" << __FILE__ << "] func = " \
56 << __func__ << ", line = " << __LINE__ << " - " \
58 throw std::logic_error( s.str() ); \
61#define ABORT_LOGICAL_ERROR1( msg1 ) \
63 std::cerr << "[LOGICAL ERROR:" << __FILE__ << "] func = " \
64 << __func__ << ", line = " << __LINE__ << " - " \
69#define THROW_LOGICAL_ERROR2( msg1, msg2 ) \
71 std::ostringstream s_; \
72 s_ << "[LOGICAL ERROR:" << __FILE__ << "] func = " \
73 << __func__ << ", line = " << __LINE__ << " - " \
74 << ( msg1 ) << ( msg2 ); \
75 throw std::logic_error( s_.str() ); \
78#define ABORT_LOGICAL_ERROR2( msg1, msg2 ) \
80 std::cerr << "[LOGICAL ERROR:" << __FILE__ << "] func = " \
81 << __func__ << ", line = " << __LINE__ << " - " \
82 << ( msg1 ) << ( msg2 ); \
86#define THROW_LOGICAL_ERROR3( msg1, msg2, msg3 ) \
88 std::ostringstream s_; \
89 s_ << "[LOGICAL ERROR:" << __FILE__ << "] func = " \
90 << __func__ << ", line = " << __LINE__ << " - " \
91 << ( msg1 ) << ( msg2 ) << ( msg3 ); \
92 throw std::logic_error( s_.str() ); \
95#define ABORT_LOGICAL_ERROR3( msg1, msg2, msg3 ) \
97 std::cerr << "[LOGICAL ERROR:" << __FILE__ << "] func = " \
98 << __func__ << ", line = " << __LINE__ << " - " \
99 << ( msg1 ) << ( msg2 ) << ( msg3 ); \
103#define THROW_LOGICAL_ERROR4( msg1, msg2, msg3, msg4 ) \
105 std::ostringstream s_; \
106 s_ << "[LOGICAL ERROR:" << __FILE__ << "] func = " \
107 << __func__ << ", line = " << __LINE__ << " - " \
108 << ( msg1 ) << ( msg2 ) << ( msg3 ) << ( msg4 ); \
109 throw std::logic_error( s_.str() ); \
112#define THROW_LOGICAL_ERROR5( msg1, msg2, msg3, msg4, msg5) \
114 std::ostringstream s_; \
115 s_ << "[LOGICAL ERROR:" << __FILE__ << "] func = " \
116 << __func__ << ", line = " << __LINE__ << " - " \
117 << ( msg1 ) << ( msg2 ) << ( msg3 ) << ( msg4 ) << ( msg5 ); \
118 throw std::logic_error( s_.str() ); \
121#define THROW_LOGICAL_ERROR6( msg1, msg2, msg3, msg4, msg5, msg6) \
123 std::ostringstream s_; \
124 s_ << "[LOGICAL ERROR:" << __FILE__ << "] func = " \
125 << __func__ << ", line = " << __LINE__ << " - " \
126 << ( msg1 ) << ( msg2 ) << ( msg3 ) << ( msg4 ) << ( msg5 ) << ( msg6 ); \
127 throw std::logic_error( s_.str() ); \
130#define THROW_LOGICAL_ERROR7( msg1, msg2, msg3, msg4, msg5, msg6, msg7) \
132 std::ostringstream s_; \
133 s_ << "[LOGICAL ERROR:" << __FILE__ << "] func = " \
134 << __func__ << ", line = " << __LINE__ << " - " \
135 << ( msg1 ) << ( msg2 ) << ( msg3 ) << ( msg4 ) << ( msg5 ) << ( msg6 ) << ( msg7 ); \
136 throw std::logic_error( s_.str() ); \
139#define THROW_LOGICAL_ERROR8( msg1, msg2, msg3, msg4, msg5, msg6, msg7, msg8) \
141 std::ostringstream s_; \
142 s_ << "[LOGICAL ERROR:" << __FILE__ << "] func = " \
143 << __func__ << ", line = " << __LINE__ << " - " \
144 << ( msg1 ) << ( msg2 ) << ( msg3 ) << ( msg4 ) << ( msg5 ) << ( msg6 ) << ( msg7 ) << ( msg8 ); \
145 throw std::logic_error( s_.str() ); \
148#define THROW_LOGICAL_ERROR9( msg1, msg2, msg3, msg4, msg5, msg6, msg7, msg8, msg9) \
150 std::ostringstream s_; \
151 s_ << "[LOGICAL ERROR:" << __FILE__ << "] func = " \
152 << __func__ << ", line = " << __LINE__ << " - " \
153 << ( msg1 ) << ( msg2 ) << ( msg3 ) << ( msg4 ) << ( msg5 ) << ( msg6 ) << ( msg7 ) << ( msg8 ) << ( msg9 ); \
154 throw std::logic_error( s_.str() ); \
157#ifdef _COMM_MPI_WORLD
158#define DELETE_TRANSFER_OBJECT_IN_THREADED_SOLVER( object ) \
161#define DELETE_TRANSFER_OBJECT_IN_THREADED_SOLVER( object ) \
162 if( object ) delete object
165#define REALABS(x) (fabs(x))
166#define EPSEQ(x,y,eps) (REALABS((x)-(y)) <= (eps))
167#define EPSLT(x,y,eps) ((x)-(y) < -(eps))
168#define EPSLE(x,y,eps) ((x)-(y) <= (eps))
169#define EPSGT(x,y,eps) ((x)-(y) > (eps))
170#define EPSGE(x,y,eps) ((x)-(y) >= -(eps))
171#define EPSZ(x,eps) (REALABS(x) <= (eps))
172#define EPSP(x,eps) ((x) > (eps))
173#define EPSN(x,eps) ((x) < -(eps))
174#define EPSFLOOR(x,eps) (floor((x)+(eps)))
175#define EPSCEIL(x,eps) (ceil((x)-(eps)))
176#define EPSFRAC(x,eps) ((x)-EPSFLOOR(x,eps))
177#define EPSISINT(x,eps) (EPSFRAC(x,eps) <= (eps))
static const int CompTerminatedByInterruptRequest
static const int MaxStrLen
static const int CompInterruptedInRacingStage
static const int CompTerminatedByAnotherTask
static const int LpMaxNamelen
static const int CompTerminatedByMemoryLimit
static const int CompTerminatedByTimeLimit
static const int CompTerminatedNormally
static const int CompInterruptedInMerging
static const int CompTerminatedInRacingStage