32 template<
class T,
unsigned Size>
37 template<
class T,
unsigned Size>
40 for (
unsigned i=0; i<Size; i++)
47 template<
class T,
unsigned Size>
50 for (
unsigned i=0; i<Size; i++)
57 template<
class T,
unsigned Size>
58 template<
class InputIterator>
67 InputIterator iter = first;
68 for (
unsigned i=0; i<Size; i++)
75 template<
class T,
unsigned Size>
82 template<
class T,
unsigned Size>
85 checkSize(lst.
size());
87 for (
unsigned i=0; i<Size; i++)
94 template<
class T,
unsigned Size>
97 checkSize(lst.size());
100 for (
unsigned i=0; i<Size; i++)
107 template<
class T,
unsigned Size>
117 template<
class T,
unsigned Size>
120 return NullObjectRef<FixedList<T, Size>>();
124 template<
class T,
unsigned Size>
127 return (i == Size-1 ? 0 : i+1);
131 template<
class T,
unsigned Size>
134 return (i ? i-1 : Size-1);
138 template<
class T,
unsigned Size>
141 if (start < 0 || (start &&
unsigned(start) >= Size))
144 <<
"start " << start <<
" out of range 0 ... " << (Size-1)
150 template<
class T,
unsigned Size>
153 if (
unsigned(size) != Size)
156 <<
"size " << size <<
" != " << Size
162 template<
class T,
unsigned Size>
165 if (i < 0 ||
unsigned(i) >= Size)
168 <<
"index " << i <<
" out of range 0 ... " << (Size-1)
174 template<
class T,
unsigned Size>
182 template<
class T,
unsigned Size>
190 template<
class T,
unsigned Size>
193 for (
unsigned i=0; i<Size; i++)
200 template<
class T,
unsigned Size>
208 template<
class T,
unsigned Size>
216 template<
class T,
unsigned Size>
223 template<
class T,
unsigned Size>
230 template<
class T,
unsigned Size>
237 template<
class T,
unsigned Size>
246 template<
class T,
unsigned Size>
256 template<
class T,
unsigned Size>
266 template<
class T,
unsigned Size>
269 for (
unsigned i=0; i<Size; i++)
275 template<
class T,
unsigned Size>
278 checkSize(lst.
size());
280 for (
unsigned i=0; i<Size; i++)
286 template<
class T,
unsigned Size>
289 checkSize(lst.size());
292 for (
unsigned i=0; i<Size; i++)
298 template<
class T,
unsigned Size>
301 checkSize(lst.size());
303 typename std::initializer_list<T>::iterator iter = lst.begin();
304 for (
unsigned i=0; i<Size; i++)
310 template<
class T,
unsigned Size>
313 for (
unsigned i=0; i<Size; i++)
322 template<
class T,
unsigned Size>
329 template<
class T,
unsigned Size>
337 template<
class T,
unsigned Size>
345 template<
class T,
unsigned Size>
353 template<
class T,
unsigned Size>
361 template<
class T,
unsigned Size>
369 template<
class T,
unsigned Size>
377 template<
class T,
unsigned Size>
385 template<
class T,
unsigned Size>
393 template<
class T,
unsigned Size>
401 template<
class T,
unsigned Size>
409 template<
class T,
unsigned Size>
417 template<
class T,
unsigned Size>
424 template<
class T,
unsigned Size>
431 template<
class T,
unsigned Size>
438 template<
class T,
unsigned Size>
439 template<
class HashT>
449 return Hasher(lst.v_,
sizeof(lst.v_), seed);
456 for (
unsigned i=0; i<Size; i++)
458 val = HashT()(lst[i], val);
std::reverse_iterator< iterator > reverse_iterator
Reverse iterator for reverse traversal of FixedList.
static const FixedList< T, Size > & null()
Return a null FixedList.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const_iterator cend() const
Return const_iterator to end traversing the constant FixedList.
A 1D vector of objects of type <T> with a fixed size <Size>.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Template class for non-intrusive linked lists.
An STL-conforming const_iterator.
Template function to specify if the data of a type are contiguous.
reverse_iterator rbegin()
Return reverse_iterator to begin reverse traversing the FixedList.
friend Ostream & operator(Ostream &, const FixedList< T, Size > &)
Write FixedList to Ostream.
scalar distance(const vector &p1, const vector &p2)
void checkIndex(const label i) const
Check index i is within valid range (0 ... size-1)
std::reverse_iterator< const_iterator > const_reverse_iterator
Reverse iterator for reverse traversal of constant FixedList.
const_reverse_iterator crend() const
Return const_reverse_iterator to end reverse traversing FixedList.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
void operator=(const T v[Size])
Assignment to array operator. Takes linear time.
const T * const_iterator
Random access iterator for traversing FixedList.
T & operator[](const label)
Return element of FixedList.
void checkStart(const label start) const
Check start is within valid range (0 ... size-1)
void transfer(const FixedList< T, Size > &)
Copy (not transfer) the argument contents.
T & first()
Return the first element of the list.
T & last()
Return the last element of the list.
const_reverse_iterator crbegin() const
Return const_reverse_iterator to begin reverse traversing FixedList.
errorManip< error > abort(error &err)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
label fcIndex(const label i) const
Return the forward circular index, i.e. the next index.
void resize(const label)
Dummy resize function.
T * iterator
Random access iterator for traversing FixedList.
iterator end()
Return an iterator to end traversing the FixedList.
void checkSize(const label size) const
Check size is within valid range (0 ... size)
label size() const
Return the number of elements in the FixedList.
iterator begin()
Return an iterator to begin traversing the FixedList.
const_iterator cbegin() const
Return const_iterator to begin traversing the constant FixedList.
label rcIndex(const label i) const
Return the reverse circular index, i.e. the previous index.
label max_size() const
Return size of the largest possible FixedList.
FixedList()
Null constructor.
bool empty() const
Return true if the FixedList is empty (ie, size() is zero)
unsigned Hasher(const void *data, size_t len, unsigned seed=0)
Bob Jenkins's 96-bit mixer hashing function (lookup3)
autoPtr< FixedList< T, Size > > clone() const
Clone.
T * data()
Return a pointer to the first data element,.
void setSize(const label)
Dummy setSize function.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
label size() const
Return the number of elements in the UList.
Non-intrusive singly-linked list.
reverse_iterator rend()
Return reverse_iterator to end reverse traversing the FixedList.
const T * cdata() const
Return a const pointer to the first data element,.