mod_fem_viewer/include/defs.h File Reference

Go to the source code of this file.

Classes

struct  nodule_params

Defines

#define FV_STRING(str)   #str
#define FV_STR(str)   FV_STRING(str)
#define FV_SIZEOF_ARR(arr)   (sizeof(arr)/sizeof((arr)[0]))
#define COUNT_BITS(w)   (sizeof(w) << 3)
#define BOUNDARY_BIT_POS(w)   (COUNT_BITS(w) -1)
#define ACTIVE_BIT_POS(w)   (COUNT_BITS(w) -2)
#define STFACE_BIT_POS(w)   (COUNT_BITS(w) -7)
#define ELTYPE_BIT_POS(w)   (COUNT_BITS(w) -8)
#define EL_ID_BIT_COUNT(w)   (COUNT_BITS(w) -9)
#define FACE_TYPE_POS(w)   (COUNT_BITS(w) -1)
#define IS_BIT_SET(w, b)   ((w) & (1U << (b)))
#define SET_BIT(w, b)   ((w) |= (1U << (b)))
#define RESET_BIT(w, b)   ((w) &= ~(1U << (b)))
#define SET_OFFSET_BIT(w, b, o)   SET_BIT(w,(b + o))
#define USET_OFFSET_BIT(w, b, o)   RSET_BIT(w,(b + o))
#define SET_ACTIVE(w)   SET_BIT(w, ACTIVE_BIT_POS(w))
#define UNSET_ACTIVE(w)   RESET_BIT(w, ACTIVE_BIT_POS(w))
#define IS_ACTIVE(w)   IS_BIT_SET(w, ACTIVE_BIT_POS(w))
#define SET_BOUND(w)   SET_BIT(w, BOUNDARY_BIT_POS(w))
#define UNSET_BOUND(w)   RESET_BIT(w, BOUNDARY_BIT_POS(w))
#define IS_BOUND(w)   IS_BIT_SET(w, BOUNDARY_BIT_POS(w))
#define SET_STFACE0(w)   SET_OFFSET_BIT(w, STFACE_BIT_POS(w), 0)
#define SET_STFACE1(w)   SET_OFFSET_BIT(w, STFACE_BIT_POS(w), 1)
#define SET_STFACE2(w)   SET_OFFSET_BIT(w, STFACE_BIT_POS(w), 2)
#define SET_STFACE3(w)   SET_OFFSET_BIT(w, STFACE_BIT_POS(w), 3)
#define SET_STFACE4(w)   SET_OFFSET_BIT(w, STFACE_BIT_POS(w), 4)
#define SET_STFACEN(w, n)   SET_OFFSET_BIT(w, STFACE_BIT_POS(w), n)
#define UNSET_STFACE0(w)   USET_OFFSET_BIT(w, STFACE_BIT_POS(w), 0)
#define UNSET_STFACE1(w)   USET_OFFSET_BIT(w, STFACE_BIT_POS(w), 1)
#define UNSET_STFACE2(w)   USET_OFFSET_BIT(w, STFACE_BIT_POS(w), 2)
#define UNSET_STFACE3(w)   USET_OFFSET_BIT(w, STFACE_BIT_POS(w), 3)
#define UNSET_STFACE4(w)   USET_OFFSET_BIT(w, STFACE_BIT_POS(w), 4)
#define IS_SET_FACEN(w, n)   IS_BIT_SET(w, STFACE_BIT_POS(w) + (n))
#define SET_TETRA(w)   RESET_BIT(w, ELTYPE_BIT_POS(w))
#define SET_PRISM(w)   SET_BIT(w, ELTYPE_BIT_POS(w))
#define IS_PRISM(w)   IS_BIT_SET(w, ELTYPE_BIT_POS(w))
#define ATTRIB_MASK   0xFF
#define ELEM_ID(w)   (w & ~(ATTRIB_MASK << EL_ID_BIT_COUNT(w)))
#define ATTRIBS(w)   (w >> EL_ID_BIT_COUNT(w))
#define MIN(a, b)   ((a) < (b)) ? (a) : (b)
#define MAX(a, b)   ((a) > (b)) ? (a) : (b)
#define INVALID_LOCATION   0xFFFFFFFF
#define FV_SMALL   1e-10
#define FV_LARGE   10e10
#define FV_LARGE_FLOAT   FV_LARGE##f
#define fv_abs(x)   ((x) < 0) ? -(x) : (x)
#define LARGE_F   10e10
#define MAX_ISO_VALUES   32

Functions

template<typename T >
const Tfv_min (const T &lh, const T &rh)
template<typename T >
const Tfv_max (const T &lh, const T &rh)
template<typename T >
void FV_FREE_ARR (T *ptr)
template<typename T >
void FV_FREE_PTR (T *&ptr)
template<typename T >
void FV_FREE_MALOC (T *&ptr)

Define Documentation

#define ACTIVE_BIT_POS (  )     (COUNT_BITS(w) -2)
#define ATTRIB_MASK   0xFF
#define ATTRIBS (  )     (w >> EL_ID_BIT_COUNT(w))
#define BOUNDARY_BIT_POS (  )     (COUNT_BITS(w) -1)
#define COUNT_BITS (  )     (sizeof(w) << 3)
#define EL_ID_BIT_COUNT (  )     (COUNT_BITS(w) -9)
#define ELEM_ID (  )     (w & ~(ATTRIB_MASK << EL_ID_BIT_COUNT(w)))
#define ELTYPE_BIT_POS (  )     (COUNT_BITS(w) -8)
#define FACE_TYPE_POS (  )     (COUNT_BITS(w) -1)
#define fv_abs (  )     ((x) < 0) ? -(x) : (x)
#define FV_LARGE   10e10
#define FV_LARGE_FLOAT   FV_LARGE##f
#define FV_SIZEOF_ARR ( arr   )     (sizeof(arr)/sizeof((arr)[0]))
#define FV_SMALL   1e-10
#define FV_STR ( str   )     FV_STRING(str)
#define FV_STRING ( str   )     #str
#define INVALID_LOCATION   0xFFFFFFFF
#define IS_ACTIVE (  )     IS_BIT_SET(w, ACTIVE_BIT_POS(w))
#define IS_BIT_SET ( w,
 )     ((w) & (1U << (b)))
#define IS_BOUND (  )     IS_BIT_SET(w, BOUNDARY_BIT_POS(w))
#define IS_PRISM (  )     IS_BIT_SET(w, ELTYPE_BIT_POS(w))
#define IS_SET_FACEN ( w,
 )     IS_BIT_SET(w, STFACE_BIT_POS(w) + (n))
#define LARGE_F   10e10
#define MAX ( a,
 )     ((a) > (b)) ? (a) : (b)
#define MAX_ISO_VALUES   32
#define MIN ( a,
 )     ((a) < (b)) ? (a) : (b)
#define RESET_BIT ( w,
 )     ((w) &= ~(1U << (b)))
#define SET_ACTIVE (  )     SET_BIT(w, ACTIVE_BIT_POS(w))
#define SET_BIT ( w,
 )     ((w) |= (1U << (b)))
#define SET_BOUND (  )     SET_BIT(w, BOUNDARY_BIT_POS(w))
#define SET_OFFSET_BIT ( w,
b,
 )     SET_BIT(w,(b + o))
#define SET_PRISM (  )     SET_BIT(w, ELTYPE_BIT_POS(w))
#define SET_STFACE0 (  )     SET_OFFSET_BIT(w, STFACE_BIT_POS(w), 0)
#define SET_STFACE1 (  )     SET_OFFSET_BIT(w, STFACE_BIT_POS(w), 1)
#define SET_STFACE2 (  )     SET_OFFSET_BIT(w, STFACE_BIT_POS(w), 2)
#define SET_STFACE3 (  )     SET_OFFSET_BIT(w, STFACE_BIT_POS(w), 3)
#define SET_STFACE4 (  )     SET_OFFSET_BIT(w, STFACE_BIT_POS(w), 4)
#define SET_STFACEN ( w,
 )     SET_OFFSET_BIT(w, STFACE_BIT_POS(w), n)
#define SET_TETRA (  )     RESET_BIT(w, ELTYPE_BIT_POS(w))
#define STFACE_BIT_POS (  )     (COUNT_BITS(w) -7)
#define UNSET_ACTIVE (  )     RESET_BIT(w, ACTIVE_BIT_POS(w))
#define UNSET_BOUND (  )     RESET_BIT(w, BOUNDARY_BIT_POS(w))
#define UNSET_STFACE0 (  )     USET_OFFSET_BIT(w, STFACE_BIT_POS(w), 0)
#define UNSET_STFACE1 (  )     USET_OFFSET_BIT(w, STFACE_BIT_POS(w), 1)
#define UNSET_STFACE2 (  )     USET_OFFSET_BIT(w, STFACE_BIT_POS(w), 2)
#define UNSET_STFACE3 (  )     USET_OFFSET_BIT(w, STFACE_BIT_POS(w), 3)
#define UNSET_STFACE4 (  )     USET_OFFSET_BIT(w, STFACE_BIT_POS(w), 4)
#define USET_OFFSET_BIT ( w,
b,
 )     RSET_BIT(w,(b + o))

Function Documentation

template<typename T >
void FV_FREE_ARR ( T ptr  )  [inline]

Here is the caller graph for this function:

template<typename T >
void FV_FREE_MALOC ( T *&  ptr  )  [inline]
template<typename T >
void FV_FREE_PTR ( T *&  ptr  )  [inline]

Here is the caller graph for this function:

template<typename T >
const T& fv_max ( const T lh,
const T rh 
) [inline]
template<typename T >
const T& fv_min ( const T lh,
const T rh 
) [inline]

Here is the caller graph for this function:

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 3 Jun 2020 for ModFEM by  doxygen 1.6.1