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


Main Page   Class Hierarchy   Compound List   File List  

GridData3.h

Go to the documentation of this file.
00001 #ifndef _included_GridData_3_h
00002 #define _included_GridData_3_h
00003 
00009 #include "DAGHParams.h"
00010 #include "GridDataParams.h"
00011 
00012 #ifdef DEBUG_PRINT_GD_MEMORY
00013 #include "DAGHMemoryTrace.h"
00014 #endif
00015 
00016 #include "BBox.h"
00017 #include "Coords.h"
00018 #include "PackedGridDataBucket.h"
00019 
00020 #ifdef DEBUG_PRINT
00021 #include "CommServer.h"
00022 #endif
00023 
00024 #include "IndexGridData3.h"
00025 
00026 #ifndef GridData
00027 #define GridData(dim)           name2(GridData,dim)
00028 #endif
00029 
00030 #ifndef gd_OperateRegion
00031 #define gd_OperateRegion(op)    name2(gd_OperateRegion,op)
00032 #endif
00033 
00034 #include "GDIterator.h"
00035 
00045 template <class Type> class GridData(3)
00046   {
00047    BBox _bbox;
00048    Coords _extents;
00049    Coords _step;
00050    int _size;
00051    int _bottom; 
00052    Type *_data;
00053 
00054 public:
00055    GridData(3)(void);
00056    GridData(3)(BBox const &bbox);
00057    GridData(3)(int const i, int const j, int const k,
00058                int const ii, int const jj, int const kk);
00059    GridData(3)(int const i, int const j, int const k,
00060                int const ii, int const jj, int const kk, int const s);
00061    GridData(3)(int const i, int const j, int const k,
00062                int const ii, int const jj, int const kk, 
00063                int const s, int const ss, int const sss);
00064    GridData(3)(BBox const &bbox, Type *databuf);
00065    GridData(3)(GridDataBucket<Type> &gdbkt);
00066    GridData(3)(GridDataBucket<Type> &gdbkt, int const n);
00067    /* A "psuedo" copy-constructor */
00068    GridData(3) (GridData(3)<Type> const &other);
00069 
00070    inline ~GridData(3)(void)
00071         { 
00072          if (_data) {
00073            delete [] _data; 
00074 #ifdef DEBUG_PRINT_GD_MEMORY
00075            DAGHMemoryTrace::free(sizeof(Type)*_size);
00076 #endif
00077          }
00078         }
00079 
00080    void allocate(BBox const &bbox);
00081    void allocate(BBox const &bbox, Type *databuf);
00082 
00083    inline void allocate(Type *databuf)
00084         {
00085          if (_data) {
00086            delete [] _data; _data = (Type*)0;
00087 #ifdef DEBUG_PRINT_GD_MEMORY
00088            DAGHMemoryTrace::free(sizeof(Type)*_size);
00089 #endif
00090          }
00091          _data = databuf;
00092         }
00093 
00094    inline void deallocate() 
00095         {
00096          if (_data) {
00097            delete [] _data; _data = (Type*)0;
00098 #ifdef DEBUG_PRINT_GD_MEMORY
00099            DAGHMemoryTrace::free(sizeof(Type)*_size);
00100 #endif
00101          }
00102         }
00103    inline void deallocate(Type*& databuf) 
00104         { databuf = _data; _data = (Type*) 0; }
00105    
00106    void* databuffer() { return ((void*) _data); }
00107 
00108    /* Query funtions */
00109 
00110    inline const Coords& lower() const { return(_bbox.lower()); }
00111    inline const Coords& upper() const { return(_bbox.upper()); }
00112    inline const Coords& extents() const { return(_extents); }
00113    inline const Coords& stepsize() const { return(_step); }
00114    inline Coords lower() { return(_bbox.lower()); }
00115    inline Coords upper() { return(_bbox.upper()); }
00116    inline Coords extents() { return(_extents); }
00117    inline Coords stepsize() { return(_step); }
00118    inline int bottom() const { return(_bottom); }
00119    inline int lower(const int i) const { return(_bbox.lower(i)); }
00120    inline int upper(const int i) const { return(_bbox.upper(i)); }
00121    inline int extents(const int i) const { return(_extents(i)); }
00122    inline int stepsize(int const i) const { return(_step(i)); }
00123    inline const BBox& bbox() const { return(_bbox); }
00124 
00125    inline int ok_to_index() { return(_data != (Type *) NULL); }
00126    inline int size() const { return(_size); }
00127 
00128    inline int idx(const int i, const int j, const int k) const
00129    { return( _bottom+(i/_step(0)+_extents(0)*(j/_step(1)+_extents(1)*k/_step(2))) ); }
00130 
00131    inline const Type& operator () (const int i, const int j, const int k) const
00132    { assert(idx(i,j,k) >= 0 && idx(i,j,k) < _size); return(_data[idx(i,j,k)]); }
00133    inline Type& operator () (const int i,  const int j,  const int k)
00134    { assert(idx(i,j,k) >= 0 && idx(i,j,k) < _size); return(_data[idx(i,j,k)]); }
00135 
00136    inline const Type& operator () (const Coords& c) const
00137    { assert(idx(c(0),c(1),c(2)) >= 0 && idx(c(0),c(1),c(2)) < _size);
00138         return(_data[idx(c(0),c(1),c(2))]); }
00139    inline Type& operator () (const Coords& c)
00140    { assert(idx(c(0),c(1),c(2)) >= 0 && idx(c(0),c(1),c(2)) < _size);
00141         return(_data[idx(c(0),c(1),c(2))]); }
00142 
00143    inline const Type *ptr(const int i,  const int j,  const int k) const
00144    { assert(idx(i,j,k) >= 0 && idx(i,j,k) < _size); return(_data + idx(i,j,k)); }
00145    inline Type *ptr(const int i,  const int j,  const int k)
00146    { assert(idx(i,j,k) >= 0 && idx(i,j,k) < _size); return(_data + idx(i,j,k)); }
00147 
00148    inline const Type *ptr(const Coords& c) const
00149      { assert(idx(c(0),c(1),c(2)) >= 0 && idx(c(0),c(1),c(2)) < _size);
00150           return(_data + idx(c(0),c(1),c(2))); }
00151    inline Type *ptr(const Coords& c)
00152      { assert(idx(c(0),c(1),c(2)) >= 0 && idx(c(0),c(1),c(2)) < _size);
00153           return(_data + idx(c(0),c(1),c(2))); }
00154 
00155    inline const Type *data() const { return(_data); }
00156    inline Type *data() { return(_data); }
00157 
00158    void fill(Type const &val);
00159 
00160    /* Define the copy functions for communication between objects */
00161    void copy(GridData(3)<Type> const &gd);
00162    void copy(GridData(3)<Type> const &gd, BBox const &where);
00163    void copy(GridData(3)<Type> const &gd, BBox const &to, BBox const &from);
00164 
00165    void copy(GridDataBucket<Type> const &gdbkt);
00166    void copy(GridDataBucket<Type> const &gdbkt, BBox const &where);
00167    void copy(GridDataBucket<Type> const &gdbkt, BBox const &to, 
00168                                                 BBox const &from);
00169 
00170    void copy(GridDataBucket<Type> const &gdbkt, int const n);
00171    void copy(GridDataBucket<Type> const &gdbkt, int const n, BBox const &where);
00172    void copy(GridDataBucket<Type> const &gdbkt, int const n, BBox const &to, 
00173                                                              BBox const &from);
00174 
00175    /* Linear interpolation */
00176    void lin_interp(GridData(3)<Type> const &gd1, double const frac1,
00177                    GridData(3)<Type> const &gd2, double const frac2,
00178                    BBox const &where);
00179    inline void lin_interp(GridData(3)<Type> const &gd1, double const frac1,
00180                           GridData(3)<Type> const &gd2, double const frac2)
00181         { GridData(3)<Type>::lin_interp(gd1,frac1,gd2,frac2,_bbox); }
00182 
00183   /* first moment (i think) sum(q(i,j,k)*i) */
00184   Type moment1(int const axis, BBox const &where);
00185   inline Type moment1(int const axis)
00186         { return (GridData(3)<Type>::moment1(axis,_bbox)); }
00187 
00188   /* sum of squares - for calculating L2-norm */
00189   double sumsqrd(BBox const &where);
00190   inline double sumsqrd()
00191         { return (GridData(3)<Type>::sumsqrd(_bbox)); }
00192 
00193   /* sum of absolute values - for calculating L1-norm */
00194   double sumabs(BBox const &where);
00195   inline double sumabs()
00196         { return (GridData(3)<Type>::sumabs(_bbox)); }
00197 
00198   /* Maximum of absolute values - for calculating Loo-norm */
00199   double maxabs(BBox const &where);
00200   inline double maxabs()
00201         { return (GridData(3)<Type>::maxabs(_bbox)); }
00202 
00203    /* operator == */
00204    BBox is_eq(Type const &val, BBox const &where);
00205    inline BBox is_eq(Type const &val) 
00206         { return (GridData(3)<Type>::is_eq(val, _bbox)); }
00207 
00208    BBox is_eq(GridData(3)<Type> const &gd, BBox const &to, BBox const &from);
00209    inline BBox is_eq(GridData(3)<Type> const &gd)
00210         { return (GridData(3)<Type>::is_eq(gd, gd._bbox, gd._bbox)); }
00211    inline BBox is_eq(GridData(3)<Type> const &gd, BBox const &where)
00212         { return (GridData(3)<Type>::is_eq(gd, where, where)); }
00213 
00214    /* operator != */
00215    BBox is_neq(Type const &val, BBox const &where);
00216    inline BBox is_neq(Type const &val) 
00217         { return (GridData(3)<Type>::is_neq(val, _bbox)); }
00218 
00219    BBox is_neq(GridData(3)<Type> const &gd, BBox const &to, BBox const &from);
00220    inline BBox is_neq(GridData(3)<Type> const &gd)
00221         { return (GridData(3)<Type>::is_neq(gd, gd._bbox, gd._bbox)); }
00222    inline BBox is_neq(GridData(3)<Type> const &gd, BBox const &where)
00223         { return (GridData(3)<Type>::is_neq(gd, where, where)); }
00224 
00225    /* operator > */
00226     BBox is_gt(Type const &val, BBox const &where);
00227    inline BBox is_gt(Type const &val) 
00228         { return (GridData(3)<Type>::is_gt(val, _bbox)); }
00229 
00230    BBox is_gt(GridData(3)<Type> const &gd, BBox const &to, BBox const &from);
00231    inline BBox is_gt(GridData(3)<Type> const &gd)
00232         { return (GridData(3)<Type>::is_gt(gd, gd._bbox, gd._bbox)); }
00233    inline BBox is_gt(GridData(3)<Type> const &gd, BBox const &where)
00234         { return (GridData(3)<Type>::is_gt(gd, where, where)); }
00235 
00236    /* operator >= */
00237     BBox is_ge(Type const &val, BBox const &where);
00238    inline BBox is_ge(Type const &val) 
00239         { return (GridData(3)<Type>::is_ge(val, _bbox)); }
00240 
00241    BBox is_ge(GridData(3)<Type> const &gd, BBox const &to, BBox const &from);
00242    inline BBox is_ge(GridData(3)<Type> const &gd)
00243         { return (GridData(3)<Type>::is_ge(gd, gd._bbox, gd._bbox)); }
00244    inline BBox is_ge(GridData(3)<Type> const &gd, BBox const &where)
00245         { return (GridData(3)<Type>::is_ge(gd, where, where)); }
00246 
00247    /* operator < */
00248     BBox is_lt(Type const &val, BBox const &where);
00249    inline BBox is_lt(Type const &val) 
00250         { return (GridData(3)<Type>::is_lt(val, _bbox)); }
00251 
00252    BBox is_lt(GridData(3)<Type> const &gd, BBox const &to, BBox const &from);
00253    inline BBox is_lt(GridData(3)<Type> const &gd)
00254         { return (GridData(3)<Type>::is_lt(gd, gd._bbox, gd._bbox)); }
00255    inline BBox is_lt(GridData(3)<Type> const &gd, BBox const &where)
00256         { return (GridData(3)<Type>::is_lt(gd, where, where)); }
00257 
00258    /* operator <= */
00259     BBox is_le(Type const &val, BBox const &where);
00260    inline BBox is_le(Type const &val) 
00261         { return (GridData(3)<Type>::is_le(val, _bbox)); }
00262 
00263    BBox is_le(GridData(3)<Type> const &gd, BBox const &to, BBox const &from);
00264    inline BBox is_le(GridData(3)<Type> const &gd)
00265         { return (GridData(3)<Type>::is_le(gd, gd._bbox, gd._bbox)); }
00266    inline BBox is_le(GridData(3)<Type> const &gd, BBox const &where)
00267         { return (GridData(3)<Type>::is_le(gd, where, where)); }
00268 
00269    /* operator = */
00270    void equals(Type const &val, BBox const &where);
00271    inline void equals(Type const &val) 
00272         { GridData(3)<Type>::equals(val, _bbox); }
00273 
00274    void equals(GridData(3)<Type> const &gd, BBox const &to, BBox const &from);
00275    inline void equals(GridData(3)<Type> const &gd)
00276         { GridData(3)<Type>::equals(gd, gd._bbox, gd._bbox); }
00277    inline void equals(GridData(3)<Type> const &gd, BBox const &where)
00278         { GridData(3)<Type>::equals(gd, where, where); }
00279 
00280    /* operator += */
00281    void plus (Type const &val, BBox const &where);
00282    inline void plus (Type const &val) 
00283         { GridData(3)<Type>::plus(val, _bbox); }
00284 
00285    void plus (GridData(3)<Type> const &gd, BBox const &to, BBox const &from);
00286    inline void plus (GridData(3)<Type> const &gd)
00287         { GridData(3)<Type>::plus(gd, gd._bbox, gd._bbox); }
00288    inline void plus (GridData(3)<Type> const &gd, BBox const &where)
00289         { GridData(3)<Type>::plus(gd, where, where); }
00290 
00291    /* operator -= */
00292    void minus (Type const &val, BBox const &where);
00293    inline void minus (Type const &val) 
00294         { GridData(3)<Type>::minus(val, _bbox); }
00295 
00296    void minus (GridData(3)<Type> const &gd, BBox const &to, BBox const &from);
00297    inline void minus (GridData(3)<Type> const &gd)
00298         { GridData(3)<Type>::minus(gd, gd._bbox, gd._bbox); }
00299    inline void minus (GridData(3)<Type> const &gd, BBox const &where)
00300         { GridData(3)<Type>::minus(gd, where, where); }
00301 
00302    /* operator *= */
00303    void multiply(Type const &val, BBox const &where);
00304    inline void multiply(Type const &val) 
00305         { GridData(3)<Type>::multiply(val, _bbox); }
00306 
00307    void multiply (GridData(3)<Type> const &gd, BBox const &to, BBox const &from);
00308    inline void multiply (GridData(3)<Type> const &gd)
00309         { GridData(3)<Type>::multiply(gd, gd._bbox, gd._bbox); }
00310    inline void multiply (GridData(3)<Type> const &gd, BBox const &where)
00311         { GridData(3)<Type>::multiply(gd, where, where); }
00312 
00313    /* operator /= */
00314    void divide (Type const &val, BBox const &where);
00315    inline void divide (Type const &val) 
00316         { GridData(3)<Type>::divide(val, _bbox); }
00317 
00318    void divide (GridData(3)<Type> const &gd, BBox const &to, BBox const &from);
00319    inline void divide (GridData(3)<Type> const &gd)
00320         { GridData(3)<Type>::divide(gd, gd._bbox, gd._bbox); }
00321    inline void divide (GridData(3)<Type> const &gd, BBox const &where)
00322         { GridData(3)<Type>::divide(gd, where, where); }
00323 
00324    /**********************************************************************/
00325    inline BBox operator == (Type const &val)
00326         { return (GridData(3)<Type>::is_eq(val, _bbox)); }
00327    inline BBox operator == (GridData(3)<Type> const &gd)
00328         { return (GridData(3)<Type>::is_eq(gd, gd._bbox, gd._bbox)); }
00329 
00330    inline BBox operator != (Type const &val)
00331         { return (GridData(3)<Type>::is_neq(val, _bbox)); }
00332    inline BBox operator != (GridData(3)<Type> const &gd)
00333         { return (GridData(3)<Type>::is_neq(gd, gd._bbox, gd._bbox)); }
00334 
00335    inline BBox operator > (Type const &val)
00336         { return (GridData(3)<Type>::is_gt(val, _bbox)); }
00337    inline BBox operator > (GridData(3)<Type> const &gd)
00338         { return (GridData(3)<Type>::is_gt(gd, gd._bbox, gd._bbox)); }
00339 
00340    inline BBox operator >= (Type const &val)
00341         { return (GridData(3)<Type>::is_ge(val, _bbox)); }
00342    inline BBox operator >= (GridData(3)<Type> const &gd)
00343         { return (GridData(3)<Type>::is_ge(gd, gd._bbox, gd._bbox)); }
00344 
00345    inline BBox operator < (Type const &val)
00346         { return (GridData(3)<Type>::is_lt(val, _bbox)); }
00347    inline BBox operator < (GridData(3)<Type> const &gd)
00348         { return (GridData(3)<Type>::is_lt(gd, gd._bbox, gd._bbox)); }
00349 
00350    inline BBox operator <= (Type const &val)
00351         { return (GridData(3)<Type>::is_le(val, _bbox)); }
00352    inline BBox operator <= (GridData(3)<Type> const &gd)
00353         { return (GridData(3)<Type>::is_le(gd, gd._bbox, gd._bbox)); }
00354 
00355    inline void operator = (Type const &val)
00356         { GridData(3)<Type>::equals(val, _bbox); }
00357    inline void operator = (GridData(3)<Type> const &gd)
00358         { GridData(3)<Type>::equals(gd, gd._bbox, gd._bbox); }
00359 
00360    inline void operator += (Type const &val)
00361         { GridData(3)<Type>::plus(val, _bbox); }
00362    inline void operator += (GridData(3)<Type> const &gd)
00363         { GridData(3)<Type>::plus(gd, gd._bbox, gd._bbox); }
00364 
00365    inline void operator -= (Type const &val)
00366         { GridData(3)<Type>::minus(val, _bbox); }
00367    inline void operator -= (GridData(3)<Type> const &gd)
00368         { GridData(3)<Type>::minus(gd, gd._bbox, gd._bbox); }
00369 
00370    inline void operator *= (Type const &val)
00371         { GridData(3)<Type>::multiply(val, _bbox); }
00372    inline void operator *= (GridData(3)<Type> const &gd)
00373         { GridData(3)<Type>::multiply(gd, gd._bbox, gd._bbox); }
00374 
00375    inline void operator /= (Type const &val)
00376         { GridData(3)<Type>::divide(val, _bbox); }
00377    inline void operator /= (GridData(3)<Type> const &gd)
00378         { GridData(3)<Type>::divide(gd, gd._bbox, gd._bbox); }
00379    /**********************************************************************/
00380 
00381 
00382    /**********************************************************************/
00383    // Reduction Operations 
00384    /**********************************************************************/
00385    Type maxval (BBox const &where);
00386    inline Type maxval (void)
00387         { return (GridData(3)<Type>::maxval(_bbox)); }
00388 
00389    Type minval (BBox const &where);
00390    inline Type minval (void)
00391         { return (GridData(3)<Type>::minval(_bbox)); }
00392 
00393    Type sum (BBox const &where);
00394    inline Type sum (void)
00395         { return (GridData(3)<Type>::sum(_bbox)); }
00396 
00397    Type product (BBox const &where);
00398    inline Type product (void)
00399         { return (GridData(3)<Type>::product(_bbox)); }
00400    /**********************************************************************/
00401 
00402    /**********************************************************************/
00403 private:
00404    void gd_CopyRegion(GridData(3)<Type> const &gd, BBox const &to,
00405                                           BBox const &from, Coords const &step);
00406    void gdb_CopyRegion(GridDataBucket<Type> const &gdbkt, BBox const &to,
00407                                           BBox const &from, Coords const &step);
00408    void gdb_CopyRegion(GridDataBucket<Type> const &gdbkt, int const n, BBox const &to,
00409                                           BBox const &from, Coords const &step);
00410 
00411    void gd_OperateRegion(is_eq)(Type const &val, BBox const &to,
00412                                           BBox const &from, Coords const &step, BBox &bb);
00413    void gd_OperateRegion(is_eq)(GridData(3)<Type> const &gd, BBox const &to,
00414                                           BBox const &from, Coords const &step, BBox &bb);
00415 
00416    void gd_OperateRegion(is_neq)(Type const &val, BBox const &to,
00417                                           BBox const &from, Coords const &step, BBox &bb);
00418    void gd_OperateRegion(is_neq)(GridData(3)<Type> const &gd, BBox const &to,
00419                                           BBox const &from, Coords const &step, BBox &bb);
00420 
00421    void gd_OperateRegion(is_gt)(Type const &val, BBox const &to,
00422                                           BBox const &from, Coords const &step, BBox &bb);
00423    void gd_OperateRegion(is_gt)(GridData(3)<Type> const &gd, BBox const &to,
00424                                           BBox const &from, Coords const &step, BBox &bb);
00425 
00426    void gd_OperateRegion(is_ge)(Type const &val, BBox const &to,
00427                                           BBox const &from, Coords const &step, BBox &bb);
00428    void gd_OperateRegion(is_ge)(GridData(3)<Type> const &gd, BBox const &to,
00429                                           BBox const &from, Coords const &step, BBox &bb);
00430 
00431    void gd_OperateRegion(is_lt)(Type const &val, BBox const &to,
00432                                           BBox const &from, Coords const &step, BBox &bb);
00433    void gd_OperateRegion(is_lt)(GridData(3)<Type> const &gd, BBox const &to,
00434                                           BBox const &from, Coords const &step, BBox &bb);
00435 
00436    void gd_OperateRegion(is_le)(Type const &val, BBox const &to,
00437                                           BBox const &from, Coords const &step, BBox &bb);
00438    void gd_OperateRegion(is_le)(GridData(3)<Type> const &gd, BBox const &to,
00439                                           BBox const &from, Coords const &step, BBox &bb);
00440 
00441    void gd_OperateRegion(equal)(Type const &val, BBox const &to,
00442                                           BBox const &from, Coords const &step);
00443    void gd_OperateRegion(equal)(GridData(3)<Type> const &gd, BBox const &to,
00444                                           BBox const &from, Coords const &step);
00445 
00446    void gd_OperateRegion(plus)(Type const &val, BBox const &to,
00447                                           BBox const &from, Coords const &step);
00448    void gd_OperateRegion(plus)(GridData(3)<Type> const &gd, BBox const &to,
00449                                           BBox const &from, Coords const &step);
00450 
00451    void gd_OperateRegion(minus)(Type const &val, BBox const &to,
00452                                           BBox const &from, Coords const &step);
00453    void gd_OperateRegion(minus)(GridData(3)<Type> const &gd, BBox const &to,
00454                                           BBox const &from, Coords const &step);
00455 
00456    void gd_OperateRegion(mult)(Type const &val, BBox const &to,
00457                                           BBox const &from, Coords const &step);
00458    void gd_OperateRegion(mult)(GridData(3)<Type> const &gd, BBox const &to,
00459                                           BBox const &from, Coords const &step);
00460 
00461    void gd_OperateRegion(div)(Type const &val, BBox const &to,
00462                                           BBox const &from, Coords const &step);
00463    void gd_OperateRegion(div)(GridData(3)<Type> const &gd, BBox const &to,
00464                                           BBox const &from, Coords const &step);
00465 
00466 public:
00467    /* Perform efficient buffer packing/unpacking and data movement */
00468    void PackRegion(Type *sendbuf, BBox const &from) const;
00469    void UnPackRegion(Type const *recvbuf, BBox const &to);
00470 
00471 #if (!defined(Want_c_files) && (defined(RS6000) || defined(SPX)))
00472    friend ostream& operator << (ostream&, const GridData(3)<Type>&);
00473    friend ofstream& operator << (ofstream&, const GridData(3)<Type>&);
00474    friend ifstream& operator >> (ifstream&, GridData(3)<Type>&);
00475    friend strstream& operator << (strstream&, const GridData(3)<Type>&);
00476    friend strstream& operator >> (strstream&, GridData(3)<Type>&);
00477 #endif
00478 
00479   };
00480 
00481 #if defined(Want_c_files) || (!defined(RS6000) && !defined(SPX))
00482   #include "GridData3.c"
00483 #endif
00484 
00485  /*********************************************************************/
00486  template <class Type>
00487  inline Coords lower(GridData(3)<Type> &gd) { return(gd.lower()); }
00488  template <class Type>
00489  inline Coords upper(GridData(3)<Type> &gd) { return(gd.upper()); }
00490  template <class Type>
00491  inline Coords extents(GridData(3)<Type> &gd) { return(gd.extents()); }
00492  template <class Type>
00493  inline int lower(GridData(3)<Type> &gd, const int i) { return(gd.lower(i)); }
00494  template <class Type>
00495  inline int upper(GridData(3)<Type> &gd, const int i) { return(gd.upper(i)); }
00496  template <class Type>
00497  inline int extents(GridData(3)<Type> &gd, const int i) { return(gd.extents(i)); }
00498  template <class Type>
00499  inline BBox bbox(GridData(3)<Type> &gd) { return(gd.bbox()); }
00500  template <class Type>
00501  inline int size(GridData(3)<Type> &gd) { return(gd.size()); }
00502  template <class Type>
00503  inline Coords stepsize(GridData(3)<Type> &gd) { return(gd.stepsize()); }
00504   
00505 #endif


Quickstart     Users Guide     Programmers Reference     Installation      Examples     Download



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