28 #include "NamespaceHeader.H" 63 D_EXPR6(vect[0]=vi[0], vect[1]=vi[1], vect[2] = vi[2],
64 vect[3]=vi[3], vect[4]=vi[4], vect[5] = vi[5]);
81 int l,
int m,
int n));
88 explicit IntVect (
const int* a);
114 int& operator[] (
int i);
121 int operator[] (
int i)
const;
142 const int* getVect ()
const;
148 const int* dataPtr()
const;
168 bool operator== (
const IntVect& p)
const;
175 bool operator!= (
const IntVect& p)
const;
195 bool operator<= (
const IntVect& p)
const;
205 bool operator> (
const IntVect& p)
const;
216 bool operator>= (
const IntVect& p)
const;
232 bool lexLT (
const IntVect& s)
const;
248 bool lexGT (
const IntVect& s)
const;
279 int product ()
const;
578 void printOn (std::ostream& os)
const;
590 void dumpOn (std::ostream& os)
const;
596 friend std::ostream&
operator<< (std::ostream& os,
603 friend std::istream&
operator>> (std::istream& os,
637 static int InitStatics();
650 friend class BLfacade::IntVect;
688 int l,
int m,
int n))
690 D_EXPR6(vect[0] = i, vect[1] = j, vect[2] = k, vect[3] = l, vect[4] = m, vect[5] = n);
696 D_EXPR6(vect[0] = a[0], vect[1] = a[1], vect[2] = a[2],
697 vect[3] = a[3], vect[4] = a[4], vect[5] = a[5]);
704 memcpy(vect, iv.
vect, IntVectSize);
711 D_EXPR6(vect[0]=iv.
vect[0], vect[1]=iv.
vect[1], vect[2]=iv.
vect[2],
712 vect[3]=iv.
vect[3], vect[4]=iv.
vect[4], vect[5]=iv.
vect[5]);
767 return D_TERM6(vect[0] == p[0], && vect[1] == p[1], && vect[2] == p[2],
768 && vect[3] == p[3], && vect[4] == p[4], && vect[5] == p[5]);
775 return D_TERM6(vect[0] != p[0], || vect[1] != p[1], || vect[2] != p[2],
776 || vect[3] != p[3], || vect[4] != p[4], || vect[5] != p[5]);
783 return D_TERM6(vect[0] < p[0], && vect[1] < p[1], && vect[2] < p[2],
784 && vect[3] < p[3], && vect[4] < p[4], && vect[5] < p[5]);
791 return D_TERM6(vect[0] <= p[0], && vect[1] <= p[1], && vect[2] <= p[2],
792 && vect[3] <= p[3], && vect[4] <= p[4], && vect[5] <= p[5]);
800 return D_TERM6(vect[0] > p[0], && vect[1] > p[1], && vect[2] > p[2],
801 && vect[3] > p[3], && vect[4] > p[4], && vect[5] > p[5]);
808 return D_TERM6(vect[0] >= p[0], && vect[1] >= p[1], && vect[2] >= p[2],
809 && vect[3] >= p[3], && vect[4] >= p[4], && vect[5] >= p[5]);
817 if (vect[0] < s[0])
return true;
819 if (vect[0] > s[0])
return false;
820 if (vect[1] < s[1])
return true;
823 if (vect[1] > s[1])
return false;
824 if (vect[2] < s[2])
return true;
827 if (vect[2] > s[2])
return false;
828 if (vect[3] < s[3])
return true;
831 if (vect[3] > s[3])
return false;
832 if (vect[4] < s[4])
return true;
835 if (vect[4] > s[4])
return false;
836 if (vect[5] < s[5])
return true;
847 if (vect[0] > s[0])
return true;
849 if (vect[0] < s[0])
return false;
850 if (vect[1] > s[1])
return true;
853 if (vect[1] < s[1])
return false;
854 if (vect[2] > s[2])
return true;
857 if (vect[2] < s[2])
return false;
858 if (vect[3] > s[3])
return true;
861 if (vect[3] < s[3])
return false;
862 if (vect[4] > s[4])
return true;
865 if (vect[4] < s[4])
return false;
866 if (vect[5] > s[5])
return true;
884 -vect[3], -vect[4], -vect[5] ));
891 return D_TERM6(vect[0], + vect[1], + vect[2],
892 + vect[3], + vect[4], + vect[5]);
899 return D_TERM6(vect[0], * vect[1], * vect[2],
900 * vect[3], * vect[4], * vect[5]);
907 D_EXPR6(vect[0] += s, vect[1] += s, vect[2] += s,
908 vect[3] += s, vect[4] += s, vect[5] += s);
916 D_EXPR6(vect[0] += p[0], vect[1] += p[1], vect[2] += p[2],
917 vect[3] += p[3], vect[4] += p[4], vect[5] += p[5]);
925 D_EXPR6(vect[0] *= s, vect[1] *= s, vect[2] *= s,
926 vect[3] *= s, vect[4] *= s, vect[5] *= s);
934 D_EXPR6(vect[0] *= p[0], vect[1] *= p[1], vect[2] *= p[2],
935 vect[3] *= p[3], vect[4] *= p[4], vect[5] *= p[5]);
943 D_EXPR6(vect[0] /= s, vect[1] /= s, vect[2] /= s,
944 vect[3] /= s, vect[4] /= s, vect[5] /= s);
952 D_EXPR6(vect[0] /= p[0], vect[1] /= p[1], vect[2] /= p[2],
953 vect[3] /= p[3], vect[4] /= p[4], vect[5] /= p[5]);
961 D_EXPR6(vect[0] -= s, vect[1] -= s, vect[2] -= s,
962 vect[3] -= s, vect[4] -= s, vect[5] -= s);
970 D_EXPR6(vect[0] -= p[0], vect[1] -= p[1], vect[2] -= p[2],
971 vect[3] -= p[3], vect[4] -= p[4], vect[5] -= p[5]);
979 return IntVect(
D_DECL6(vect[0] + p[0], vect[1] + p[1], vect[2] + p[2],
980 vect[3] + p[3], vect[4] + p[4], vect[5] + p[5]));
988 vect[3] + s, vect[4] + s, vect[5] + s));
995 return IntVect(
D_DECL6(vect[0] - p[0], vect[1] - p[1], vect[2] - p[2],
996 vect[3] - p[3], vect[4] - p[4], vect[5] - p[5]));
1004 vect[3] - s, vect[4] - s, vect[5] - s));
1011 return IntVect(
D_DECL6(vect[0] * p[0], vect[1] * p[1], vect[2] * p[2],
1012 vect[3] * p[3], vect[4] * p[4], vect[5] * p[5]));
1020 vect[3] * s, vect[4] * s, vect[5] * s));
1027 return IntVect(
D_DECL6(vect[0] / p[0], vect[1] / p[1], vect[2] / p[2],
1028 vect[3] / p[3], vect[4] / p[4], vect[5] / p[5]));
1036 vect[3] / s, vect[4] / s, vect[5] / s));
1043 D_EXPR6(vect[0] =
Min(vect[0], p.
vect[0]),
1044 vect[1] =
Min(vect[1], p.
vect[1]),
1045 vect[2] =
Min(vect[2], p.
vect[2]),
1046 vect[3] =
Min(vect[3], p.
vect[3]),
1047 vect[4] =
Min(vect[4], p.
vect[4]),
1048 vect[5] =
Min(vect[5], p.
vect[5]));
1056 D_EXPR6(vect[0] =
Max(vect[0], p.
vect[0]),
1057 vect[1] =
Max(vect[1], p.
vect[1]),
1058 vect[2] =
Max(vect[2], p.
vect[2]),
1059 vect[3] =
Max(vect[3], p.
vect[3]),
1060 vect[4] =
Max(vect[4], p.
vect[4]),
1061 vect[5] =
Max(vect[5], p.
vect[5]));
1069 D_EXPR6(vect[0] *= s, vect[1] *= s, vect[2] *= s,
1070 vect[3] *= s, vect[4] *= s, vect[5] *= s);
1080 vect[idir] = -vect[idir] + 2*ref_ix;
1106 D_EXPR6(vect[0] += s, vect[1] += s, vect[2] += s,
1107 vect[3] += s, vect[4] += s, vect[5] += s);
1117 p[3] + s, p[4] + s, p[5] + s));
1126 s - p[3], s - p[4], s - p[5]));
1135 s * p[3], s * p[4], s * p[5]));
1144 s * p[3], s * p[4], s * p[5]));
1152 abs(p[3]), abs(p[4]), abs(p[5])));
1160 p[3] + s, p[4] + s, p[5] + s));
1199 b.
vect[idir] = -b.
vect[idir] + 2*ref_ix;
1215 (p.
vect[5]<0) ? -abs(p.
vect[5]+1)/s-1 : p.
vect[5]/s ));
1241 vect[i] = ((vect[i]<0) ? -abs(vect[i]+1)/s-1 : vect[i]/s);
1252 const int s = p.
vect[i];
1253 vect[i] = ((vect[i]<0) ? -abs(vect[i]+1)/s-1 : vect[i]/s);
1260 #include "NamespaceFooter.H" IntVect min(const IntVect &p1, const IntVect &p2)
Definition: IntVect.H:1165
IntVect & operator*=(int s)
Definition: IntVect.H:923
#define D_DECL6(a, b, c, d, e, f)
Definition: CHArray.H:39
IntVect & min(const IntVect &p)
Definition: IntVect.H:1041
const int * getVect() const
Definition: IntVect.H:758
#define D_TERM6(a, b, c, d, e, f)
Definition: CHArray.H:40
static const size_t IntVectSize
Definition: IntVect.H:660
#define CH_assert(cond)
Definition: CHArray.H:37
IntVect & scale(int s)
Definition: IntVect.H:1067
IntVect scale(const IntVect &p, int s)
Definition: IntVect.H:1140
IntVect operator*(const IntVect &p) const
Definition: IntVect.H:1009
Definition: FaceIndex.H:28
IntVect operator*(int s, const IntVect &p)
Definition: IntVect.H:1131
static int s_dummyForIntVectH
Definition: IntVect.H:670
IntVect & operator/=(int s)
Definition: IntVect.H:941
IntVect max(const IntVect &p1, const IntVect &p2)
Definition: IntVect.H:1174
IntVect BASISV(int dir)
Definition: IntVect.H:1183
IntVect & operator-=(int s)
Definition: IntVect.H:959
bool operator<(const IntVect &p) const
Definition: IntVect.H:781
IntVect diagShift(const IntVect &p, int s)
Definition: IntVect.H:1157
const int SpaceDim
Definition: SPACE.H:39
void setVal(int i, int val)
Definition: IntVect.H:734
IntVect coarsen(const IntVect &p, int s)
Definition: IntVect.H:1205
std::ostream & operator<<(std::ostream &a_os, const IndexTM< T, N > &a_iv)
IntVect & shift(int coord, int s)
Definition: IntVect.H:1086
static const IntVect Unit
Definition: IntVect.H:632
bool operator==(const IntVect &p) const
Definition: IntVect.H:765
std::istream & operator>>(std::istream &a_os, IndexTM< T, N > &a_iv)
IntVect & operator=(const IntVect &rhs)
Definition: IntVect.H:709
bool operator<(const FaceIndex &f1, const FaceIndex &f2)
Definition: FaceIndex.H:204
IntVect & reflect(int ref_ix, int idir)
Definition: IntVect.H:1076
IntVect & max(const IntVect &p)
Definition: IntVect.H:1054
IntVect operator/(const IntVect &p) const
Definition: IntVect.H:1025
bool operator!=(const IntVect &p) const
Definition: IntVect.H:773
IntVect & operator+=(int s)
Definition: IntVect.H:905
int & operator[](const int i)
Definition: CHArray.H:56
IntVect(const Vector< int > &vi)
Definition: IntVect.H:61
IntVect operator+() const
Definition: IntVect.H:874
static const IntVect Zero
Definition: IntVect.H:627
C::self_type operator/(const C &, const C &)
Definition: GenericArithmeticI.H:136
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:465
IntVect & diagShift(int s)
Definition: IntVect.H:1104
IntVect reflect(const IntVect &a, int ref_ix, int idir)
Definition: IntVect.H:1193
int product() const
Definition: CHArray.H:64
const IntVect absolute(const IntVect &p)
Definition: IntVect.H:1149
bool operator<=(const IntVect &p) const
Definition: IntVect.H:789
bool operator>(const IntVect &p) const
Definition: IntVect.H:798
Handle to a particular group in an HDF file.
Definition: CH_HDF5.H:267
int vect[SpaceDim]
Definition: IntVect.H:655
T Min(const T &a_a, const T &a_b)
Definition: Misc.H:26
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
IntVect operator-(int s, const IntVect &p)
Definition: IntVect.H:1122
int sum() const
Definition: IntVect.H:889
Volume of Fluid Index.
Definition: VolIndex.H:31
const int * dataPtr() const
Definition: IntVect.H:744
T Max(const T &a_a, const T &a_b)
Definition: Misc.H:39
~IntVect()
Definition: IntVect.H:71
IntVect & coarsen(const IntVect &p)
Definition: IntVect.H:1247
IntVect operator-() const
Definition: IntVect.H:881
bool lexGT(const IntVect &s) const
Definition: IntVect.H:845
IntVect operator+(int s, const IntVect &p)
Definition: IntVect.H:1113
IntVect copy() const
Definition: IntVect.H:98
bool lexLT(const IntVect &s) const
Definition: IntVect.H:814
IntVect()
Definition: IntVect.H:58
bool operator>=(const IntVect &p) const
Definition: IntVect.H:806