Mesh Oriented datABase  (version 5.5.0)
An array-based unstructured mesh library
gs.cpp File Reference
#include <cstdio>
#include <cstdlib>
#include <cstdarg>
#include <cstring>
#include <cmath>
#include "moab/gs.hpp"
+ Include dependency graph for gs.cpp:

Go to the source code of this file.

Namespaces

 moab
 Class representing axis-aligned bounding box.
 

Macros

#define DO_SET(a, b)   b = a
 
#define DO_ADD(a, b)   a += b
 
#define DO_MUL(a, b)   a *= b
 
#define DO_MIN(a, b)    if( ( b ) < ( a ) ) ( a ) = b
 
#define DO_MAX(a, b)    if( ( b ) > ( a ) ) ( a ) = b
 
#define DO_BPR(a, b)
 
#define LOOP(op)
 
#define LOOP(op)
 

Functions

static void moab::local_condense (realType *u, int op, const sint *cm)
 
static void moab::local_uncondense (realType *u, const sint *cm)
 
static void moab::local_condense_vec (realType *u, uint n, int op, const sint *cm)
 
static void moab::local_uncondense_vec (realType *u, uint n, const sint *cm)
 

Macro Definition Documentation

◆ DO_ADD

#define DO_ADD (   a,
 
)    a += b

Definition at line 96 of file gs.cpp.

◆ DO_BPR

#define DO_BPR (   a,
 
)
Value:
do \
{ \
uint a_ = a; \
uint b_ = b; \
for( ;; ) \
{ \
if( a_ < b_ ) \
b_ >>= 1; \
else if( b_ < a_ ) \
a_ >>= 1; \
else \
break; \
} \
( a ) = a_; \
} while( 0 )

Definition at line 102 of file gs.cpp.

◆ DO_MAX

#define DO_MAX (   a,
 
)     if( ( b ) > ( a ) ) ( a ) = b

Definition at line 100 of file gs.cpp.

◆ DO_MIN

#define DO_MIN (   a,
 
)     if( ( b ) < ( a ) ) ( a ) = b

Definition at line 98 of file gs.cpp.

◆ DO_MUL

#define DO_MUL (   a,
 
)    a *= b

Definition at line 97 of file gs.cpp.

◆ DO_SET

#define DO_SET (   a,
 
)    b = a

Definition at line 95 of file gs.cpp.

◆ LOOP [1/2]

#define LOOP (   op)
Value:
do \
{ \
sint i, j; \
while( ( i = *cm++ ) != -1 ) \
while( ( j = *cm++ ) != -1 ) \
op( u[i], u[j] ); \
} while( 0 )

Definition at line 157 of file gs.cpp.

◆ LOOP [2/2]

#define LOOP (   op)
Value:
do \
{ \
sint i, j, k; \
while( ( i = *cm++ ) != -1 ) \
{ \
realType* pi = u + n * i; \
while( ( j = *cm++ ) != -1 ) \
{ \
realType* pj = u + n * j; \
for( k = n; k; --k ) \
{ \
op( *pi, *pj ); \
++pi; \
++pj; \
} \
} \
} \
} while( 0 )

Definition at line 157 of file gs.cpp.