00001
00002
00003 #ifndef _included_GridFunctionIndex_h
00004 #define _included_GridFunctionIndex_h
00005
00011 #include "generic.h"
00012
00013 #ifndef forall
00014 #define forall(gf, t, l, c) { \
00015 const int name2(c,_CU) = (gf).len(l); \
00016 for (int c = 0; c < name2(c,_CU); c++) { \
00017 if(!(gf).exists(t,l,c)) ; else {
00018 #endif
00019
00020 #ifndef end_forall
00021 #define end_forall } } }
00022 #endif
00023
00024
00025 #ifndef forallBB
00026 #define forallBB(gf, t, l, c, where, bb) { \
00027 const int name2(gf,_CU) = (gf).len(l); \
00028 for (int c = 0; c < name2(gf,_CU); c++) { \
00029 if(!(gf).exists(t,l,c) || \
00030 ((bb)=(where)*((gf).databbox(t,l,c))).empty()) ; else {
00031 #endif
00032
00033 #ifndef end_forallBB
00034 #define end_forallBB } } }
00035 #endif
00036
00037 #endif