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>
110 for (
unsigned i=0; i<Size; i++)
117 template<
class T,
unsigned Size>
127 template<
class T,
unsigned Size>
130 return NullObjectRef<FixedList<T, Size>>();
134 template<
class T,
unsigned Size>
137 return (i == Size-1 ? 0 : i+1);
141 template<
class T,
unsigned Size>
144 return (i ? i-1 : Size-1);
148 template<
class T,
unsigned Size>
151 if (start < 0 || (start &&
unsigned(start) >= Size))
154 <<
"start " << start <<
" out of range 0 ... " << (Size-1)
160 template<
class T,
unsigned Size>
163 if (
unsigned(size) != Size)
166 <<
"size " << size <<
" != " << Size
172 template<
class T,
unsigned Size>
175 if (i < 0 ||
unsigned(i) >= Size)
178 <<
"index " << i <<
" out of range 0 ... " << (Size-1)
184 template<
class T,
unsigned Size>
192 template<
class T,
unsigned Size>
200 template<
class T,
unsigned Size>
203 for (
unsigned i=0; i<Size; i++)
210 template<
class T,
unsigned Size>
218 template<
class T,
unsigned Size>
226 template<
class T,
unsigned Size>
233 template<
class T,
unsigned Size>
240 template<
class T,
unsigned Size>
247 template<
class T,
unsigned Size>
256 template<
class T,
unsigned Size>
266 template<
class T,
unsigned Size>
276 template<
class T,
unsigned Size>
279 for (
unsigned i=0; i<Size; i++)
285 template<
class T,
unsigned Size>
288 checkSize(lst.
size());
290 for (
unsigned i=0; i<Size; i++)
296 template<
class T,
unsigned Size>
299 checkSize(lst.size());
302 for (
unsigned i=0; i<Size; i++)
308 template<
class T,
unsigned Size>
311 checkSize(lst.size());
313 typename std::initializer_list<T>::iterator iter = lst.begin();
314 for (
unsigned i=0; i<Size; i++)
320 template<
class T,
unsigned Size>
323 for (
unsigned i=0; i<Size; i++)
332 template<
class T,
unsigned Size>
340 template<
class T,
unsigned Size>
348 template<
class T,
unsigned Size>
356 template<
class T,
unsigned Size>
364 template<
class T,
unsigned Size>
372 template<
class T,
unsigned Size>
380 template<
class T,
unsigned Size>
388 template<
class T,
unsigned Size>
396 template<
class T,
unsigned Size>
404 template<
class T,
unsigned Size>
412 template<
class T,
unsigned Size>
420 template<
class T,
unsigned Size>
428 template<
class T,
unsigned Size>
435 template<
class T,
unsigned Size>
442 template<
class T,
unsigned Size>
449 template<
class T,
unsigned Size>
450 template<
class HashT>
460 return Hasher(lst.v_,
sizeof(lst.v_), seed);
467 for (
unsigned i=0; i<Size; i++)
469 val = HashT()(lst[i], val);
reverse_iterator rbegin()
Return reverse_iterator to begin reverse traversing the 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.
const_reverse_iterator crbegin() const
Return const_reverse_iterator to begin reverse traversing FixedList.
Template class for non-intrusive linked lists.
An STL-conforming const_iterator.
Template function to specify if the data of a type are contiguous.
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)
reverse_iterator rend()
Return reverse_iterator to end reverse traversing the 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.
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.
const T * cdata() const
Return a const pointer to the first data element,.