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>
65 checkSize(std::distance(
first, last));
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);
Non-intrusive singly-linked list.
A 1D vector of objects of type <T> with a fixed size <Size>.
const_reverse_iterator crbegin() const
Return const_reverse_iterator to begin reverse traversing FixedList.
static const FixedList< T, Size > & null()
Return a null FixedList.
reverse_iterator rbegin()
Return reverse_iterator to begin reverse traversing the FixedList.
T & first()
Return the first element of the list.
label max_size() const
Return size of the largest possible FixedList.
label rcIndex(const label i) const
Return the reverse circular index, i.e. the previous index.
const T * const_iterator
Random access iterator for traversing FixedList.
void checkIndex(const label i) const
Check index i is within valid range (0 ... size-1)
const_iterator cend() const
Return const_iterator to end traversing the constant FixedList.
T * iterator
Random access iterator for traversing FixedList.
std::reverse_iterator< const_iterator > const_reverse_iterator
Reverse iterator for reverse traversal of constant FixedList.
friend Ostream & operator(Ostream &, const FixedList< T, Size > &)
Write FixedList to Ostream.
label size() const
Return the number of elements in the FixedList.
void resize(const label)
Dummy resize function.
iterator end()
Return an iterator to end traversing the FixedList.
label fcIndex(const label i) const
Return the forward circular index, i.e. the next index.
bool empty() const
Return true if the FixedList is empty (ie, size() is zero)
const_iterator cbegin() const
Return const_iterator to begin traversing the constant FixedList.
T & operator[](const label)
Return element of FixedList.
std::reverse_iterator< iterator > reverse_iterator
Reverse iterator for reverse traversal of FixedList.
const T * cdata() const
Return a const pointer to the first data element,.
void checkSize(const label size) const
Check size is within valid range (0 ... size)
const_reverse_iterator crend() const
Return const_reverse_iterator to end reverse traversing FixedList.
iterator begin()
Return an iterator to begin traversing the FixedList.
void transfer(const FixedList< T, Size > &)
Copy (not transfer) the argument contents.
void operator=(const T v[Size])
Assignment to array operator. Takes linear time.
T * data()
Return a pointer to the first data element,.
reverse_iterator rend()
Return reverse_iterator to end reverse traversing the FixedList.
void setSize(const label)
Dummy setSize function.
T & last()
Return the last element of the list.
FixedList()
Null constructor.
autoPtr< FixedList< T, Size > > clone() const
Clone.
void checkStart(const label start) const
Check start is within valid range (0 ... size-1)
An STL-conforming const_iterator.
Template class for non-intrusive linked lists.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
label size() const
Return the number of elements in the UList.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Template function to specify if the data of a type are contiguous.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
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.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManip< error > abort(error &err)
unsigned Hasher(const void *data, size_t len, unsigned seed=0)
Bob Jenkins's 96-bit mixer hashing function (lookup3)
labelList first(const UList< labelPair > &p)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)