Go to the documentation of this file.
44 int main(
int argc,
char *argv[])
46 Info<<
"Test the implementation of a circular iterator" <<
nl <<
endl;
48 Info<<
"Test const circulator. First go forwards, then backwards."
57 Info<<
"Iterate forwards over face (prev/curr/next) : "
58 << cStart.
prev() <<
" / " << cStart() <<
" / " << cStart.
next()
65 Info<<
"Iterate backwards over face : " << cStart() <<
endl;
76 if (cStart2.
size())
do
78 Info<<
"Iterate forwards over face (prev/curr/next) : "
79 << cStart2.
prev() <<
" / " << cStart2() <<
" / " << cStart2.
next()
84 if (cStart2.
size())
do
86 Info<<
"Iterate forwards over face, adding 1 to each element : "
131 Info<<
"Compare " << face1 <<
" and " << face1
135 Info<<
"Compare " << face1 <<
" and " << face2
145 Info<<
"Iterate forwards over face : " << cZero() <<
endl;
156 Info<<
"Iterate forwards over face : " << cZero() <<
endl;
161 Info<<
nl <<
nl <<
"Simultaneously go forwards/backwards over face " <<
f
167 if (circForward.
size() && circBackward.
size())
do
169 Info<<
"Iterate over face forwards : " << circForward()
170 <<
", backwards : " << circBackward() <<
endl;
bool circulate(const CirculatorBase::direction dir=NONE)
Circulate around the list in the given direction.
ListType reverseList(const ListType &list)
Reverse a list. First element becomes last element etc.
List< label > labelList
A List of labels.
Walks over a container as if it were circular. The container must have the following members defined:
Walks over a container as if it were circular. The container must have the following members defined:
const dimensionedVector & g
Ostream & endl(Ostream &os)
Add newline and flush stream.
reference prev() const
Dereference the previous iterator and return.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
const dimensionedScalar h
Planck constant.
size_type size() const
Return the range of the iterator.
labelList identity(const label len)
Create identity map (map[i] == i) of given length.
ListType rotateList(const ListType &list, const label n)
Rotate a list by n places. If n is positive rotate clockwise/right/down.
reference next() const
Dereference the next iterator and return.
int main(int argc, char *argv[])
size_type size() const
Return the range of the iterator.
const dimensionedScalar c
Speed of light in a vacuum.
A face is a list of labels corresponding to mesh vertices.
static int compare(const face &, const face &)
Compare faces.
Various functions to operate on Lists.
const_reference next() const
Dereference the next iterator and return.
bool circulate(const CirculatorBase::direction dir=NONE)
Circulate around the list in the given direction.
const_reference prev() const
Dereference the previous iterator and return.