AMROC Main     Blockstructured Adaptive Mesh Refinement in object-oriented C++


Main Page   Class Hierarchy   Compound List   File List  

IndexGridData2.h File Reference

Provide macros for array looping and indexing for GridData. More...

#include <generic.h>

Include dependency graph for IndexGridData2.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define for_2(i, j, r, s)
#define end_for   } }
#define BeginFastIndex2(a, b, d, type)
#define FastIndex2(a, i, j)   name2(a,_D)[name2(a,_B)+((i)/name2(a,_s0))+name2(a,_e0)*((j)/name2(a,_s1))]
#define EndFastIndex2(a)   }


Detailed Description

Provide macros for array looping and indexing for GridData.

Adaptation from LPARX developed by Scott Kohn (skohn-at-cs.ucsd.edu)

Author:
Manish Parashar, Ralf Deiterding (minor changes)

Definition in file IndexGridData2.h.


Define Documentation

#define BeginFastIndex2 a,
b,
d,
type   
 

Value:

{                               \
const int   name2(a,_B)  = b.bottom();                                  \
type *const name2(a,_D)  = d;                                           \
const int   name2(a,_e0) = b.extents(0);                                \
const int   name2(a,_s0) = b.stepsize(0);                               \
const int   name2(a,_s1) = b.stepsize(1)

Definition at line 61 of file IndexGridData2.h.

#define for_2 i,
j,
r,
 
 

Value:

{                                               \
   const int name2(j,_L) = (((r).lower(1)+((r).lower(1)<0?-s(1)+1:s(1)-1))/s(1))*s(1);     \
   const int name2(j,_U) = (r).upper(1);                                \
   const int name2(i,_L) = (((r).lower(0)+((r).lower(0)<0?-s(0)+1:s(0)-1))/s(0))*s(0);      \
   const int name2(i,_U) = (r).upper(0);                                \
   const int name2(sj,_S) = (s(1));                                     \
   const int name2(si,_S) = (s(0));                                     \
   for (register int j = name2(j,_L); j <= name2(j,_U); j+=name2(sj,_S))                \
   for (register int i = name2(i,_L); i <= name2(i,_U); i+=name2(si,_S)) {

Definition at line 25 of file IndexGridData2.h.


Quickstart     Users Guide     Programmers Reference     Installation      Examples     Download



AMROC Main      Home      Contact
last update: 06/01/04