Loading...
Searching...
No Matches
DynamicFieldI.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2016 OpenFOAM Foundation
9 Copyright (C) 2016-2025 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27\*---------------------------------------------------------------------------*/
28
29// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
30
31template<class T, int SizeMin>
32template<class ListType>
33inline void Foam::DynamicField<T, SizeMin>::doAssignDynList
34(
35 const ListType& list
36)
37{
38 const label len = list.size();
39
40 if (capacity_ < len)
41 {
42 // Needs more space for the copy operation
43 List<T>::setAddressableSize(capacity_);
44 List<T>::resize_nocopy(len);
45 capacity_ = List<T>::size();
46 }
47
48 // Perform copy into addressable portion
49 List<T>::setAddressableSize(len);
50 List<T>::operator=(list);
51}
52
53
54template<class T, int SizeMin>
55inline void Foam::DynamicField<T, SizeMin>::doCapacity_copy
56(
57 label count,
58 const label newCapacity
59)
60{
61 if (newCapacity == capacity_)
62 {
63 return;
64 }
65
66 // Addressable length, possibly truncated by new capacity
67 const label currLen = std::min(List<T>::size(), newCapacity);
68
69 // The count truncated by the new addressable range
70 count = std::min(count, currLen);
71
72 // Consistent allocated sizing
73 List<T>::setAddressableSize(capacity_);
74
75 if (count > 0)
76 {
77 List<T>::resize_copy(count, newCapacity);
78 }
79 else
80 {
81 List<T>::resize_nocopy(newCapacity);
82 }
83
84 capacity_ = List<T>::size();
85 List<T>::setAddressableSize(currLen);
86}
87
88
89template<class T, int SizeMin>
90inline void Foam::DynamicField<T, SizeMin>::doReserve_copy
91(
92 label count,
93 const label len
94)
95{
96 if (capacity_ < len)
97 {
98 // Preserve addressed size
99 const label currLen = List<T>::size();
100
101 // The count truncated by the new addressable range
102 count = std::min(count, currLen);
104 // Consistent allocated sizing
106
107 // Increase capacity (eg, doubling)
108 capacity_ =
110
111 if (count > 0)
112 {
113 List<T>::resize_copy(count, capacity_);
114 }
115 else
116 {
117 List<T>::resize_nocopy(capacity_);
118 }
119
120 capacity_ = List<T>::size();
121 List<T>::setAddressableSize(currLen);
123}
124
125
126// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
127
128template<class T, int SizeMin>
129inline constexpr Foam::DynamicField<T, SizeMin>::DynamicField() noexcept
131 Field<T>(),
132 capacity_(0)
133{}
134
135
136template<class T, int SizeMin>
137inline Foam::DynamicField<T, SizeMin>::DynamicField(const label initialCapacity)
138:
139 Field<T>(),
140 capacity_(0)
141{
142 reserve_nocopy(initialCapacity);
143}
144
145
146template<class T, int SizeMin>
148(
149 std::pair<label,label> sizing
150)
151:
152 Field<T>(std::max(sizing.first, sizing.second)),
153 capacity_(Field<T>::size())
154{
155 List<T>::setAddressableSize(sizing.first);
156}
157
158
159template<class T, int SizeMin>
161(
162 const label len,
163 const T& val
164)
166 Field<T>(len, val),
167 capacity_(Field<T>::size())
168{}
169
170
171template<class T, int SizeMin>
173(
174 const label len,
176)
178 Field<T>(len, Foam::zero{}),
179 capacity_(Field<T>::size())
180{}
181
182
183template<class T, int SizeMin>
185(
186 const DynamicField<T, SizeMin>& list
187)
188:
189 Field<T>(list),
190 capacity_(Field<T>::size())
191{}
192
193
194template<class T, int SizeMin>
195template<int AnySizeMin>
197(
199)
201 Field<T>(list),
202 capacity_(Field<T>::size())
203{}
204
205
206template<class T, int SizeMin>
208(
209 const UList<T>& list
210)
211:
212 Field<T>(list),
213 capacity_(Field<T>::size())
214{}
215
216
217template<class T, int SizeMin>
218template<class Addr>
220(
221 const IndirectListBase<T, Addr>& list
222)
224 Field<T>(list),
225 capacity_(Field<T>::size())
226{}
227
228
229template<class T, int SizeMin>
231(
232 List<T>&& content
233) noexcept
234:
235 Field<T>(std::move(content)),
236 capacity_(Field<T>::size())
237{}
238
239
240template<class T, int SizeMin>
241template<int AnySizeMin>
243(
245) noexcept
246:
247 Field<T>(std::move(static_cast<List<T>&>(content))),
248 capacity_(content.capacity())
249{
250 content.setCapacity_unsafe(0); // All contents moved
251}
253
254template<class T, int SizeMin>
256(
258) noexcept
259:
260 Field<T>(std::move(static_cast<List<T>&>(content))),
261 capacity_(content.capacity())
263 content.setCapacity_unsafe(0); // All contents moved
265
266
267template<class T, int SizeMin>
268template<int AnySizeMin>
270(
272) noexcept
274 Field<T>(std::move(static_cast<List<T>&>(content))),
275 capacity_(content.capacity())
277 content.setCapacity_unsafe(0); // All contents moved
278}
279
280
281template<class T, int SizeMin>
282template<int AnySizeMin>
284(
286 bool reuse
288:
289 Field<T>(),
290 capacity_(0)
291{
292 if (reuse)
293 {
294 Field<T>::transfer(static_cast<List<T>&>(content));
295 capacity_ = content.capacity();
296 content.setCapacity_unsafe(0); // All contents moved
297 }
298 else
299 {
300 Field<T>::operator=(content);
301 capacity_ = content.size();
302 }
304
305
306template<class T, int SizeMin>
307template<int AnySizeMin>
309(
311 bool reuse
312)
313:
315 capacity_(0)
316{
317 if (reuse)
318 {
319 Field<T>::transfer(static_cast<List<T>&>(content));
320 capacity_ = content.capacity();
321 content.setCapacity_unsafe(0); // All contents moved
322 }
323 else
324 {
326 capacity_ = content.size();
327 }
328}
329
330
331template<class T, int SizeMin>
333(
334 List<T>& content,
335 bool reuse
336)
337:
338 Field<T>(),
339 capacity_(0)
341 if (reuse)
342 {
343 Field<T>::transfer(content);
344 }
345 else
346 {
348 }
349 capacity_ = Field<T>::size();
350}
351
353template<class T, int SizeMin>
355(
356 const UList<T>& mapF,
357 const labelUList& mapAddressing
358)
360 Field<T>(mapF, mapAddressing),
361 capacity_(Field<T>::size())
362{}
363
364
365template<class T, int SizeMin>
367(
368 const UList<T>& mapF,
369 const labelListList& mapAddressing,
370 const scalarListList& weights
371)
373 Field<T>(mapF, mapAddressing, weights),
374 capacity_(Field<T>::size())
375{}
376
377
378template<class T, int SizeMin>
380(
381 const UList<T>& mapF,
383)
385 Field<T>(mapF, map),
386 capacity_(Field<T>::size())
387{}
388
389
390template<class T, int SizeMin>
392:
393 Field<T>(is),
394 capacity_(Field<T>::size())
395{}
396
397
398template<class T, int SizeMin>
404
405
406// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
407
408template<class T, int SizeMin>
409inline std::streamsize
411{
412 return std::streamsize(capacity_)*sizeof(T);
413}
414
415
416template<class T, int SizeMin>
418(
419 const label len
420)
422 // Preserve all content
423 doCapacity_copy(List<T>::size(), len);
424}
425
427template<class T, int SizeMin>
429(
430 const label len
431)
433 // Preserve 0 content
434 doCapacity_copy(0, len);
435}
437
438template<class T, int SizeMin>
440(
441 const label len
442)
444 // Preserve all content
445 doReserve_copy(List<T>::size(), len);
446}
447
448
449template<class T, int SizeMin>
451(
452 const label len
453)
455 // Preserve 0 content
456 doReserve_copy(0, len);
457}
458
459
460template<class T, int SizeMin>
462(
463 const label len
464)
465{
466 if (capacity_ < len)
467 {
468 // Preserve addressed size
469 const label currLen = List<T>::size();
470
471 // Consistent allocated sizing
473
474 // Exact length
475 capacity_ = len;
476
477 // if (!nocopy)
478 {
479 List<T>::resize_copy(currLen, capacity_);
480 }
481
482 capacity_ = List<T>::size();
484 }
485}
486
487
488template<class T, int SizeMin>
490(
491 const label len
492)
494 // Preserve all content
496}
497
498
499template<class T, int SizeMin>
501(
502 label count,
503 const label len
504)
505{
506 // Preserve count elements
507 doReserve_copy(count, len);
509}
510
511
512template<class T, int SizeMin>
514(
515 const label len,
516 const T& val
517)
519 resize_nocopy(len);
521}
522
523
524template<class T, int SizeMin>
526(
527 const label len
528)
530 // Preserve 0 content
531 resize_copy(0, len);
532}
533
534
535template<class T, int SizeMin>
537(
538 const label len,
539 const T& val
540)
541{
542 const label oldLen = List<T>::size();
543
544 // Preserve all content
545 resize(len);
546
547 // Fill newly exposed with constant value
548 if (oldLen < List<T>::size())
549 {
550 std::fill
551 (
552 this->begin(oldLen), this->end(), val
553 );
554 }
555}
556
557
558template<class T, int SizeMin>
560{
562}
563
564
565template<class T, int SizeMin>
567{
568 // Extra safety...?
569 if (!List<T>::cdata() && List<T>::empty()) capacity_ = 0;
570
571 // Consistent allocated sizing
574 capacity_ = 0;
575}
576
577
578template<class T, int SizeMin>
580{
581 const label currLen = List<T>::size();
582 if (currLen < capacity_)
583 {
585 List<T>::resize(currLen);
586 capacity_ = List<T>::size();
587 }
588}
589
590
591template<class T, int SizeMin>
592inline void
594{
595 if
596 (
598 (
599 static_cast<const List<T>*>(this)
600 == static_cast<const List<T>*>(&other)
601 )
602 )
603 {
604 return; // Self-swap is a no-op
605 }
606
607 // Remove unused storage
608 this->shrink_to_fit();
609
610 // Swap storage and addressable size
611 UList<T>::swap(other);
612
613 // Update capacity
614 capacity_ = List<T>::size();
615}
616
617
618template<class T, int SizeMin>
619template<int AnySizeMin>
621(
623) noexcept
624{
625 if
626 (
628 (
629 static_cast<const List<T>*>(this)
630 == static_cast<const List<T>*>(&other)
631 )
632 )
633 {
634 return; // Self-swap is a no-op
635 }
636
637 // Swap storage and addressable size
638 UList<T>::swap(other);
639
640 // Swap capacity
641 std::swap(this->capacity_, other.capacity_);
642}
643
644
645template<class T, int SizeMin>
646template<int AnySizeMin>
648(
650) noexcept
651{
652 if
653 (
655 (
656 static_cast<const List<T>*>(this)
657 == static_cast<const List<T>*>(&other)
658 )
659 )
660 {
661 return; // Self-swap is a no-op
662 }
663
664 // Swap storage and addressable size
665 UList<T>::swap(other);
666
667 // Swap capacity
668 auto old = capacity_;
669 this->setCapacity_unsafe(other.capacity());
670 other.setCapacity_unsafe(old);
671}
672
673
674template<class T, int SizeMin>
676{
677 // No check for self-assignment (different types)
678
679 // Consistent allocated sizing
682 capacity_ = Field<T>::size();
683}
684
685
686template<class T, int SizeMin>
687template<int AnySizeMin>
689(
691)
692{
693 if
694 (
696 (
697 static_cast<const UList<T>*>(this)
698 == static_cast<const UList<T>*>(&other)
699 )
700 )
701 {
702 return; // Self-assignment is a no-op
703 }
704
705 // Remove storage
706 this->clearStorage();
707
708 // Swap storage and addressable size
709 UList<T>::swap(other);
710
711 // Update capacity
712 capacity_ = other.capacity();
713 other.setCapacity_unsafe(0);
714}
715
716
717template<class T, int SizeMin>
718template<int AnySizeMin>
720(
722)
723{
724 if
725 (
727 (
728 static_cast<const UList<T>*>(this)
729 == static_cast<const UList<T>*>(&other)
730 )
731 )
732 {
733 return; // Self-assignment is a no-op
734 }
735
736 // Remove storage
737 this->clearStorage();
738
739 // Swap storage and addressable size
740 UList<T>::swap(other);
741
742 // Update capacity
743 capacity_ = other.capacity();
744 other.setCapacity_unsafe(0);
745}
746
747
748template<class T, int SizeMin>
749template<class... Args>
751{
752 // This could/should be better with inplace construction
753 // (as per std::vector), but currently lacking the methods for that
754 // so resize and move assign
755
756 const label idx = List<T>::size();
757 resize(idx + 1);
758
759 // move assign element
760 this->operator[](idx) = T(std::forward<Args>(args)...);
761 return this->operator[](idx);
762}
763
764
765template<class T, int SizeMin>
767(
768 const T& val
769)
770{
771 const label idx = List<T>::size();
772 resize(idx + 1);
773
774 this->operator[](idx) = val; // copy element
775}
776
777
778template<class T, int SizeMin>
780(
781 T&& val
782)
783{
784 const label idx = List<T>::size();
785 resize(idx + 1);
786
787 this->operator[](idx) = std::move(val); // move assign element
788}
789
790
791template<class T, int SizeMin>
793(
794 const UList<T>& list
795)
796{
797 if
798 (
800 (
801 static_cast<const UList<T>*>(this)
802 == static_cast<const UList<T>*>(&list)
803 )
804 )
805 {
807 << "Attempted push_back to self"
808 << abort(FatalError);
809 }
810
811 const label idx = List<T>::size();
812 resize(idx + list.size());
813
814 std::copy(list.begin(), list.end(), this->begin(idx));
815}
816
817
818template<class T, int SizeMin>
820(
821 List<T>&& list
822)
823{
824 if
825 (
827 (
828 static_cast<const UList<T>*>(this)
829 == static_cast<const UList<T>*>(&list)
830 )
831 )
832 {
834 << "Attempted push_back to self"
835 << abort(FatalError);
836 }
837
838 const label idx = List<T>::size();
839 resize(idx + list.size());
840
841 // Move the elements
842 std::move(list.begin(), list.end(), this->begin(idx));
843
844 list.clear();
845}
846
847
848template<class T, int SizeMin>
850{
851 if (n >= this->size())
852 {
853 this->clear();
854 }
855 else if (n > 0)
856 {
857 resize(this->size() - n);
859}
860
861
862// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
863
864template<class T, int SizeMin>
866(
867 const label i
868)
869{
870 if (i >= List<T>::size())
871 {
872 resize(i + 1);
874
875 return this->operator[](i);
876}
877
878
879template<class T, int SizeMin>
881(
882 const T& val
884{
886}
887
888
889template<class T, int SizeMin>
891(
894{
896}
897
898
899template<class T, int SizeMin>
901(
902 const UList<T>& list
904{
905 doAssignDynList(list);
906}
907
908
909template<class T, int SizeMin>
911(
912 const DynamicField<T, SizeMin>& list
913)
914{
915 if (this == &list)
916 {
917 return; // Self-assignment is a no-op
918 }
920 doAssignDynList(list);
921}
922
923
924template<class T, int SizeMin>
925template<class Addr>
927(
928 const IndirectListBase<T, Addr>& list
929)
930{
931 // NOTE: Self-assignment needs special handling
933
936 /// )
937
938 doAssignDynList(list);
939}
940
941
942template<class T, int SizeMin>
944(
945 List<T>&& list
947{
948 this->transfer(list);
949}
950
951
952template<class T, int SizeMin>
954(
956)
958 this->transfer(list);
959}
960
961
962template<class T, int SizeMin>
963template<int AnySizeMin>
965(
967)
969 this->transfer(list);
970}
971
972
973template<class T, int SizeMin>
974template<int AnySizeMin>
976(
978)
979{
980 this->transfer(list);
981}
982
983
984// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
985
986template<class T, int SizeMin>
988(
989 Istream& is
990)
991{
992 // Use DynamicList::readList for reading DynamicField.
993 // The logic should be the same and this avoids duplicate code
994
996 this->swap(list);
997
998 list.readList(is);
999 this->swap(list);
1000
1001 return is;
1002}
1003
1004
1005template<class T, int SizeMin>
1006inline Foam::Istream& Foam::operator>>
1007(
1008 Istream& is,
1009 DynamicField<T, SizeMin>& rhs
1010)
1011{
1012 return rhs.readList(is);
1013}
1014
1015
1016template<class T, int SizeMin>
1017inline Foam::Ostream& Foam::operator<<
1018(
1019 Ostream& os,
1021)
1022{
1024 return os;
1025}
1026
1027
1028// ************************************************************************* //
label n
Dynamically sized Field. Similar to DynamicList, but inheriting from a Field instead of a List.
void clear() noexcept
Clear the addressed list, i.e. set the size to zero.
void transfer(List< T > &list)
Transfer the parameter contents into this.
void pop_back(label n=1)
Reduce size by 1 or more elements. Can be called on an empty list.
void resize_nocopy(const label len)
Alter addressable list size, allocating new space if required without necessarily recovering old cont...
void setCapacity_nocopy(const label len)
Alter the size of the underlying storage, without retaining old content.
T & emplace_back(Args &&... args)
Construct an element at the end of the list, return reference to the new list element.
void setCapacity_unsafe(label len) noexcept
Change the value for the list capacity directly (ADVANCED, UNSAFE) Does not perform any memory manage...
void reserve_nocopy(const label len)
Reserve allocation space for at least this size, allocating new space if required without retaining o...
void reserve_exact(const label len)
Reserve allocation space for at least this size, allocating new space if required and retaining old c...
std::streamsize capacity_bytes() const noexcept
Number of contiguous bytes of the underlying storage.
void resize_copy(label count, const label len)
Alter addressable size, retaining the first count contents.
void shrink_to_fit()
Shrink the allocated space to the number of elements used.
void swap(List< T > &other)
Swap with plain List content. Implies shrink_to_fit().
void clearStorage()
Clear the list and delete storage.
tmp< DynamicField< T, SizeMin > > clone() const
Clone.
void push_back(const T &val)
Copy append an element to the end of the list.
constexpr DynamicField() noexcept
Default construct, an empty field without allocation.
label capacity() const noexcept
Size of the underlying storage.
void resize(const label len)
Alter addressable list size, allocating new space if required while recovering old content.
void reserve(const label len)
Reserve allocation space for at least this size, allocating new space if required and retaining old c...
void resize_fill(const label len, const T &val)
Alter addressable size and set val for all addressed entries.
void setCapacity(const label len)
Alter the size of the underlying storage.
Istream & readList(Istream &is)
Read from Istream, discarding existing contents.
friend Ostream & operator(Ostream &os, const DynamicField< T, SizeMin > &rhs)
Write to Ostream.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Definition DynamicList.H:68
void setCapacity_unsafe(label len) noexcept
Change the value for the list capacity directly (ADVANCED, UNSAFE) Does not perform any memory manage...
label capacity() const noexcept
Size of the underlying storage.
Istream & readList(Istream &is)
Read from Istream, discarding existing contents.
Abstract base class to hold the Field mapping addressing and weights.
Definition FieldMapper.H:44
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
Definition Field.H:172
tmp< Field< T > > T() const
void operator=(const Field< Type > &)
Copy assignment.
Definition Field.C:781
constexpr Field() noexcept
void map(const UList< T > &mapF, const labelUList &mapAddressing)
Base for lists with indirect addressing, templated on the list contents type and the addressing type....
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition Istream.H:60
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition List.H:72
void transfer(List< Type > &list)
void resize_nocopy(const label len)
Adjust allocated size of list without necessarily.
Definition ListI.H:171
void resize_copy(label count, const label len)
Change allocated size of list, retaining the first count elements.
Definition List.C:31
void resize(const label len)
Adjust allocated size of list.
Definition ListI.H:153
void clear()
Clear the list, i.e. set size to zero.
Definition ListI.H:133
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition UList.H:89
T & first()
Access first element of the list, position [0].
Definition UList.H:957
iterator begin() noexcept
Return an iterator to begin traversing the UList.
Definition UListI.H:410
bool empty() const noexcept
True if List is empty (ie, size() is zero).
Definition UList.H:701
iterator end() noexcept
Return an iterator to end traversing the UList.
Definition UListI.H:454
const T * cdata() const noexcept
Return pointer to the underlying array serving as data storage.
Definition UListI.H:267
void swap(UList< T > &list) noexcept
Swap content with another UList of the same type in constant time.
Definition UListI.H:524
label capacity() const noexcept
Size of the underlying storage.
Definition UList.H:711
label size() const noexcept
The number of elements in the container.
Definition UList.H:706
void size(const label n)
Older name for setAddressableSize.
Definition UList.H:118
void setAddressableSize(const label n) noexcept
Set addressed size to be inconsistent with allocated storage.
Definition UListI.H:517
T & operator[](const label i)
Return element of UList.
Definition UListI.H:363
UList< T > & operator=(const UList< T > &)=delete
No copy assignment (default: shallow copy).
A class for managing temporary objects.
Definition tmp.H:75
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
Definition zero.H:58
const volScalarField & T
patchWriters resize(patchIds.size())
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition error.H:600
OBJstream os(runTime.globalPath()/outputName)
surface1 clear()
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
Definition BitOps.H:73
IntType reserve_size(IntType requested, IntType capacity) noexcept
Calculate a reserve size (eg, doubling) based on the requested length and the current capacity.
Definition ListPolicy.H:293
Namespace for OpenFOAM.
List< scalarList > scalarListList
List of scalarList.
Definition scalarList.H:35
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition hashSets.C:40
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
List< labelList > labelListList
List of labelList.
Definition labelList.H:38
errorManip< error > abort(error &err)
Definition errorManip.H:139
void rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
const direction noexcept
Definition scalarImpl.H:265
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
UList< label > labelUList
A UList of labels.
Definition UList.H:75
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Foam::argList args(argc, argv)
#define FOAM_UNLIKELY(cond)
Definition stdFoam.H:64
A non-counting (dummy) refCount.
Definition refCount.H:55