Scippy

UG

Ubiquity Generator framework

paraDef.h File Reference

Defines for UG Framework. More...

#include <stdexcept>
#include <iostream>
#include <sstream>
#include <string>
#include <cfloat>

Go to the source code of this file.

Namespaces

namespace  UG
 

Macros

#define UG_VERSION   100
 
#define DEFAULT_NUM_EPSILON   1e-9
 
#define MINEPSILON   1e-20
 
#define THROW_LOGICAL_ERROR1(msg1)
 
#define ABORT_LOGICAL_ERROR1(msg1)
 
#define THROW_LOGICAL_ERROR2(msg1, msg2)
 
#define ABORT_LOGICAL_ERROR2(msg1, msg2)
 
#define THROW_LOGICAL_ERROR3(msg1, msg2, msg3)
 
#define ABORT_LOGICAL_ERROR3(msg1, msg2, msg3)
 
#define THROW_LOGICAL_ERROR4(msg1, msg2, msg3, msg4)
 
#define THROW_LOGICAL_ERROR5(msg1, msg2, msg3, msg4, msg5)
 
#define THROW_LOGICAL_ERROR6(msg1, msg2, msg3, msg4, msg5, msg6)
 
#define THROW_LOGICAL_ERROR7(msg1, msg2, msg3, msg4, msg5, msg6, msg7)
 
#define THROW_LOGICAL_ERROR8(msg1, msg2, msg3, msg4, msg5, msg6, msg7, msg8)
 
#define THROW_LOGICAL_ERROR9(msg1, msg2, msg3, msg4, msg5, msg6, msg7, msg8, msg9)
 
#define DELETE_TRANSFER_OBJECT_IN_THREADED_SOLVER(object)   \
 
#define REALABS(x)   (fabs(x))
 
#define EPSEQ(x, y, eps)   (REALABS((x)-(y)) <= (eps))
 
#define EPSLT(x, y, eps)   ((x)-(y) < -(eps))
 
#define EPSLE(x, y, eps)   ((x)-(y) <= (eps))
 
#define EPSGT(x, y, eps)   ((x)-(y) > (eps))
 
#define EPSGE(x, y, eps)   ((x)-(y) >= -(eps))
 
#define EPSZ(x, eps)   (REALABS(x) <= (eps))
 
#define EPSP(x, eps)   ((x) > (eps))
 
#define EPSN(x, eps)   ((x) < -(eps))
 
#define EPSFLOOR(x, eps)   (floor((x)+(eps)))
 
#define EPSCEIL(x, eps)   (ceil((x)-(eps)))
 
#define EPSFRAC(x, eps)   ((x)-EPSFLOOR(x,eps))
 
#define EPSISINT(x, eps)   (EPSFRAC(x,eps) <= (eps))
 

Variables

static const int MaxStrLen = 1024
 
static const int LpMaxNamelen = 1024
 
static const int CompTerminatedNormally = 0
 
static const int CompTerminatedByAnotherTask = 1
 
static const int CompTerminatedByInterruptRequest = 2
 
static const int CompTerminatedInRacingStage = 3
 
static const int CompInterruptedInRacingStage = 4
 
static const int CompInterruptedInMerging = 5
 
static const int CompTerminatedByTimeLimit = 6
 
static const int CompTerminatedByMemoryLimit = 7
 

Detailed Description

Defines for UG Framework.

Author
Yuji Shinano

Definition in file paraDef.h.

Macro Definition Documentation

◆ ABORT_LOGICAL_ERROR1

#define ABORT_LOGICAL_ERROR1 (   msg1)
Value:
{ \
std::cerr << "[LOGICAL ERROR:" << __FILE__ << "] func = " \
<< __func__ << ", line = " << __LINE__ << " - " \
<< ( msg1 ); \
abort(); \
}

Definition at line 61 of file paraDef.h.

◆ ABORT_LOGICAL_ERROR2

#define ABORT_LOGICAL_ERROR2 (   msg1,
  msg2 
)
Value:
{ \
std::cerr << "[LOGICAL ERROR:" << __FILE__ << "] func = " \
<< __func__ << ", line = " << __LINE__ << " - " \
<< ( msg1 ) << ( msg2 ); \
abort(); \
}

Definition at line 78 of file paraDef.h.

◆ ABORT_LOGICAL_ERROR3

#define ABORT_LOGICAL_ERROR3 (   msg1,
  msg2,
  msg3 
)
Value:
{ \
std::cerr << "[LOGICAL ERROR:" << __FILE__ << "] func = " \
<< __func__ << ", line = " << __LINE__ << " - " \
<< ( msg1 ) << ( msg2 ) << ( msg3 ); \
abort(); \
}

Definition at line 95 of file paraDef.h.

◆ DEFAULT_NUM_EPSILON

#define DEFAULT_NUM_EPSILON   1e-9

default upper bound for floating points to be considered zero

Definition at line 49 of file paraDef.h.

◆ DELETE_TRANSFER_OBJECT_IN_THREADED_SOLVER

#define DELETE_TRANSFER_OBJECT_IN_THREADED_SOLVER (   object)    \

Definition at line 158 of file paraDef.h.

◆ EPSCEIL

#define EPSCEIL (   x,
  eps 
)    (ceil((x)-(eps)))

Definition at line 175 of file paraDef.h.

◆ EPSEQ

#define EPSEQ (   x,
  y,
  eps 
)    (REALABS((x)-(y)) <= (eps))

Definition at line 166 of file paraDef.h.

◆ EPSFLOOR

#define EPSFLOOR (   x,
  eps 
)    (floor((x)+(eps)))

Definition at line 174 of file paraDef.h.

◆ EPSFRAC

#define EPSFRAC (   x,
  eps 
)    ((x)-EPSFLOOR(x,eps))

Definition at line 176 of file paraDef.h.

◆ EPSGE

#define EPSGE (   x,
  y,
  eps 
)    ((x)-(y) >= -(eps))

Definition at line 170 of file paraDef.h.

◆ EPSGT

#define EPSGT (   x,
  y,
  eps 
)    ((x)-(y) > (eps))

Definition at line 169 of file paraDef.h.

◆ EPSISINT

#define EPSISINT (   x,
  eps 
)    (EPSFRAC(x,eps) <= (eps))

Definition at line 177 of file paraDef.h.

◆ EPSLE

#define EPSLE (   x,
  y,
  eps 
)    ((x)-(y) <= (eps))

Definition at line 168 of file paraDef.h.

◆ EPSLT

#define EPSLT (   x,
  y,
  eps 
)    ((x)-(y) < -(eps))

Definition at line 167 of file paraDef.h.

◆ EPSN

#define EPSN (   x,
  eps 
)    ((x) < -(eps))

Definition at line 173 of file paraDef.h.

◆ EPSP

#define EPSP (   x,
  eps 
)    ((x) > (eps))

Definition at line 172 of file paraDef.h.

◆ EPSZ

#define EPSZ (   x,
  eps 
)    (REALABS(x) <= (eps))

Definition at line 171 of file paraDef.h.

◆ MINEPSILON

#define MINEPSILON   1e-20

minimum value for any numerical epsilon

Definition at line 50 of file paraDef.h.

◆ REALABS

#define REALABS (   x)    (fabs(x))

Definition at line 165 of file paraDef.h.

◆ THROW_LOGICAL_ERROR1

#define THROW_LOGICAL_ERROR1 (   msg1)
Value:
{ \
std::ostringstream s; \
s << "[LOGICAL ERROR:" << __FILE__ << "] func = " \
<< __func__ << ", line = " << __LINE__ << " - " \
<< ( msg1 ); \
throw std::logic_error( s.str() ); \
}

Definition at line 52 of file paraDef.h.

◆ THROW_LOGICAL_ERROR2

#define THROW_LOGICAL_ERROR2 (   msg1,
  msg2 
)
Value:
{ \
std::ostringstream s_; \
s_ << "[LOGICAL ERROR:" << __FILE__ << "] func = " \
<< __func__ << ", line = " << __LINE__ << " - " \
<< ( msg1 ) << ( msg2 ); \
throw std::logic_error( s_.str() ); \
}

Definition at line 69 of file paraDef.h.

◆ THROW_LOGICAL_ERROR3

#define THROW_LOGICAL_ERROR3 (   msg1,
  msg2,
  msg3 
)
Value:
{ \
std::ostringstream s_; \
s_ << "[LOGICAL ERROR:" << __FILE__ << "] func = " \
<< __func__ << ", line = " << __LINE__ << " - " \
<< ( msg1 ) << ( msg2 ) << ( msg3 ); \
throw std::logic_error( s_.str() ); \
}

Definition at line 86 of file paraDef.h.

◆ THROW_LOGICAL_ERROR4

#define THROW_LOGICAL_ERROR4 (   msg1,
  msg2,
  msg3,
  msg4 
)
Value:
{ \
std::ostringstream s_; \
s_ << "[LOGICAL ERROR:" << __FILE__ << "] func = " \
<< __func__ << ", line = " << __LINE__ << " - " \
<< ( msg1 ) << ( msg2 ) << ( msg3 ) << ( msg4 ); \
throw std::logic_error( s_.str() ); \
}

Definition at line 103 of file paraDef.h.

◆ THROW_LOGICAL_ERROR5

#define THROW_LOGICAL_ERROR5 (   msg1,
  msg2,
  msg3,
  msg4,
  msg5 
)
Value:
{ \
std::ostringstream s_; \
s_ << "[LOGICAL ERROR:" << __FILE__ << "] func = " \
<< __func__ << ", line = " << __LINE__ << " - " \
<< ( msg1 ) << ( msg2 ) << ( msg3 ) << ( msg4 ) << ( msg5 ); \
throw std::logic_error( s_.str() ); \
}

Definition at line 112 of file paraDef.h.

◆ THROW_LOGICAL_ERROR6

#define THROW_LOGICAL_ERROR6 (   msg1,
  msg2,
  msg3,
  msg4,
  msg5,
  msg6 
)
Value:
{ \
std::ostringstream s_; \
s_ << "[LOGICAL ERROR:" << __FILE__ << "] func = " \
<< __func__ << ", line = " << __LINE__ << " - " \
<< ( msg1 ) << ( msg2 ) << ( msg3 ) << ( msg4 ) << ( msg5 ) << ( msg6 ); \
throw std::logic_error( s_.str() ); \
}

Definition at line 121 of file paraDef.h.

◆ THROW_LOGICAL_ERROR7

#define THROW_LOGICAL_ERROR7 (   msg1,
  msg2,
  msg3,
  msg4,
  msg5,
  msg6,
  msg7 
)
Value:
{ \
std::ostringstream s_; \
s_ << "[LOGICAL ERROR:" << __FILE__ << "] func = " \
<< __func__ << ", line = " << __LINE__ << " - " \
<< ( msg1 ) << ( msg2 ) << ( msg3 ) << ( msg4 ) << ( msg5 ) << ( msg6 ) << ( msg7 ); \
throw std::logic_error( s_.str() ); \
}

Definition at line 130 of file paraDef.h.

◆ THROW_LOGICAL_ERROR8

#define THROW_LOGICAL_ERROR8 (   msg1,
  msg2,
  msg3,
  msg4,
  msg5,
  msg6,
  msg7,
  msg8 
)
Value:
{ \
std::ostringstream s_; \
s_ << "[LOGICAL ERROR:" << __FILE__ << "] func = " \
<< __func__ << ", line = " << __LINE__ << " - " \
<< ( msg1 ) << ( msg2 ) << ( msg3 ) << ( msg4 ) << ( msg5 ) << ( msg6 ) << ( msg7 ) << ( msg8 ); \
throw std::logic_error( s_.str() ); \
}

Definition at line 139 of file paraDef.h.

◆ THROW_LOGICAL_ERROR9

#define THROW_LOGICAL_ERROR9 (   msg1,
  msg2,
  msg3,
  msg4,
  msg5,
  msg6,
  msg7,
  msg8,
  msg9 
)
Value:
{ \
std::ostringstream s_; \
s_ << "[LOGICAL ERROR:" << __FILE__ << "] func = " \
<< __func__ << ", line = " << __LINE__ << " - " \
<< ( msg1 ) << ( msg2 ) << ( msg3 ) << ( msg4 ) << ( msg5 ) << ( msg6 ) << ( msg7 ) << ( msg8 ) << ( msg9 ); \
throw std::logic_error( s_.str() ); \
}

Definition at line 148 of file paraDef.h.

◆ UG_VERSION

#define UG_VERSION   100

UG version number (multiplied by 100 to get integer number)

Definition at line 48 of file paraDef.h.