Loading...
Searching...
No Matches
PackedListI.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) 2017-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#include "error.H"
30
31// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
32
33template<unsigned Width>
34inline unsigned int Foam::PackedList<Width>::repeated_value(unsigned val)
35{
37}
38
39
40template<unsigned Width>
41inline unsigned int Foam::PackedList<Width>::readValue(Istream& is)
42{
43 const unsigned int val = readLabel(is);
44
45 if (val > max_value)
46 {
48 << "Out-of-range value " << val << " for PackedList<" << Width
49 << ">. Maximum permitted value is " << max_value << "."
51 }
52
53 return val;
54}
55
56
57template<unsigned Width>
58inline void Foam::PackedList<Width>::setPair(Istream& is)
59{
60 is.readBegin("Tuple2<label,uint32>");
61
62 const label ind = readLabel(is);
63 const unsigned int val = readLabel(is);
64
65 is.readEnd("Tuple2<label,uint32>");
66
67 if (val > max_value)
68 {
70 << "Out-of-range value " << val << " for PackedList<" << Width
71 << "> at index " << ind
72 << ". Maximum permitted value is " << max_value << "."
73 << exit(FatalIOError);
74 }
75
76 set(ind, val);
77
78 is.check(FUNCTION_NAME);
79}
80
81
82template<unsigned Width>
84{
85 // Mask off any partial rubbish in final block
86 const unsigned int blk = size() / elem_per_block;
87 const unsigned int off = size() % elem_per_block;
88
89 if (off)
90 {
91 blocks_[blk] &= mask_lower(off);
92 }
93}
94
95
96template<unsigned Width>
97inline bool Foam::PackedList<Width>::trim(label minpos)
98{
99 if (empty())
100 {
101 return false; // Trivial case
102 }
103
104 const label orig = size();
105 if (orig < minpos)
106 {
107 minpos = orig; // Don't allow allow accidental growth!
108 }
109
110 for (label blocki = num_blocks(size())-1; blocki >= 0; --blocki)
111 {
112 // Truncate to the block begin
113 size_ = blocki * elem_per_block;
114
115 unsigned int blockval = blocks_[blocki];
116
117 // Some bits were found in the block, increment size again
118 if (blockval)
119 {
120 for (; blockval; ++size_)
121 {
122 blockval >>= Width;
123 }
124 break;
125 }
126 else if (size_ < minpos)
127 {
128 break;
129 }
130 }
131
132 if (size_ < minpos)
133 {
134 size_ = minpos;
136
137 return (size() != orig);
138}
139
140
141template<unsigned Width>
142inline void Foam::PackedList<Width>::copyAssign(const PackedList<Width>& rhs)
143{
144 // Self-assignment silently ignored
145 blocks_ = rhs.blocks_;
146 size_ = rhs.size_;
147}
148
149
150template<unsigned Width>
151inline Foam::label Foam::PackedList<Width>::first_block() const
152{
153 if (size())
154 {
155 const label nblocks = num_blocks(size());
156
157 for (label blocki=0; blocki < nblocks; ++blocki)
158 {
159 if (blocks_[blocki])
160 {
161 return blocki;
162 }
163 }
165
166 return -1;
167}
168
169
170template<unsigned Width>
171inline Foam::label Foam::PackedList<Width>::first_not_block() const
172{
173 if (!size())
174 {
175 return -1;
176 }
177
178 // Check on complement (changes 0 <-> 1).
179 // If any 1's now appear, there was a 0 bit before
180
181 const label nblocks = num_blocks(size());
182
183 // Extra bits in the final block?
184 const unsigned int off = size() % elem_per_block;
185
186 if (!off)
187 {
188 for (label blocki=0; blocki < nblocks; ++blocki)
189 {
190 if (~(blocks_[blocki]))
191 {
192 return blocki;
193 }
194 }
195 }
196 else
197 {
198 for (label blocki=0; blocki < nblocks-1; ++blocki)
199 {
200 if (~(blocks_[blocki]))
201 {
202 return blocki;
203 }
204 }
205
206 // The final block needs masking
207 if (~(blocks_[nblocks-1]) & mask_lower(off))
208 {
209 return nblocks-1;
210 }
211 }
212
213 return -1;
214}
215
217// * * * * * * * * * * * * * * * Specializations * * * * * * * * * * * * * * //
218
219namespace Foam
220{
222// constexpr noexcept
223template<> inline unsigned int PackedList<1>::repeated_value(unsigned val)
224{
225 return (val ? ~0u : 0u);
227
228template<> inline unsigned int PackedList<1>::readValue(Istream& is)
229{
230 return readBool(is);
231}
232
233template<> inline void PackedList<1>::setPair(Istream& is)
234{
235 set(readLabel(is), true);
236}
238} // End namespace Foam
239
240
241// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
242
243template<unsigned Width>
246 blocks_(),
247 size_(0)
248{}
249
250
251template<unsigned Width>
252inline Foam::PackedList<Width>::PackedList(const label numElem)
254 blocks_(num_blocks(numElem), 0u),
255 size_(numElem)
256{}
257
258
259template<unsigned Width>
261(
262 const label numElem,
263 const unsigned int val
264)
265:
266 blocks_(num_blocks(numElem), 0u),
267 size_(numElem)
268{
269 if (val)
271 operator=(val);
272 }
273}
274
276template<unsigned Width>
278:
279 blocks_(),
281{
282 readList(is);
283}
284
285
286template<unsigned Width>
289 blocks_(list.blocks_),
290 size_(list.size_)
291{}
292
293
294template<unsigned Width>
296:
297 blocks_(std::move(list.blocks_)),
299{
300 list.size_ = 0;
301}
302
303
304template<unsigned Width>
306:
307 blocks_(num_blocks(values.size()), 0u),
308 size_(values.size())
309{
310 const label len = values.size();
311
312 // Could add more intelligent filling (blockwise),
313 // but likely done fairly infrequently
314
315 for (label i = 0; i < len; ++i)
316 {
317 const unsigned int val(values[i]);
318 if (val) set(i, val);
319 }
320}
321
322
323template<unsigned Width>
324template<class Addr>
326(
327 const IndirectListBase<label, Addr>& values
328)
329:
330 blocks_(num_blocks(values.size()), 0u),
331 size_(values.size())
332{
333 const label len = values.size();
334
335 // Could add more intelligent filling (blockwise),
336 // but likely done fairly infrequently
337
338 for (label i = 0; i < len; ++i)
339 {
340 const unsigned int val(values[i]);
341 if (val) set(i, val);
342 }
343}
344
345
346template<unsigned Width>
349{
350 return autoPtr<PackedList<Width>>::New(*this);
351}
352
353
354// * * * * * * * * * * * * * * * * References * * * * * * * * * * * * * * * * //
355
356template<unsigned Width>
358(
359 PackedList<Width>* parent,
360 const label index
361)
363 ref_(parent->blocks_[index / elem_per_block]),
364 shift_(Width * (index % elem_per_block))
365{}
366
367
368template<unsigned Width>
370{
371 return ((ref_ >> shift_) & max_value);
373
374
375template<unsigned Width>
376inline bool Foam::PackedList<Width>::reference::set(const unsigned int val)
377{
378 const unsigned int mask = (max_value << shift_);
379 const unsigned int prev = ref_;
380
381 if (val >= max_value)
383 ref_ |= mask; // Overflow is max_value, so fill entirely
384 }
385 else
386 {
387 ref_ &= ~mask;
388 ref_ |= mask & (val << shift_);
390
391 return (prev != ref_);
392}
393
394
395template<unsigned Width>
398 const reference& other
399)
401 // Accepts self-assignment
402 this->set(other.get());
403}
404
405
406template<unsigned Width>
408(
409 const unsigned int val
411{
412 this->set(val);
413}
414
415
416template<unsigned Width>
418{
419 return this->get();
420}
421
422
423// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
424
425template<unsigned Width>
426inline void Foam::PackedList<Width>::checkIndex(const label i) const
427{
428 if (!size_)
429 {
431 << "attempt to access element " << i << " from zero sized list"
432 << abort(FatalError);
434 else if (i < 0 || i >= size_)
435 {
437 << "index " << i << " out of range [0," << size_ << ")"
438 << abort(FatalError);
439 }
440}
441
442
443template<unsigned Width>
445{
446 return elem_per_block * blocks_.size();
447}
448
449
450template<unsigned Width>
452(
453 const label numElem
455{
456 this->resize(numElem);
457}
458
459
460template<unsigned Width>
462(
463 const label newSize,
464 const unsigned int val
465)
466{
467 reserve(newSize);
468
469 const label oldSize = size();
470 size_ = newSize;
472 if (oldSize < newSize)
473 {
474 // Fill new elements or newly exposed elements
475 if (val)
476 {
477 // Fill value for complete blocks
478 const unsigned int blockval = repeated_value(val);
479
480 // Fill complete blocks
481 const label oldLen = num_blocks(oldSize);
482 const label newLen = num_blocks(size());
483 for (label blocki = oldLen; blocki < newLen; ++blocki)
484 {
485 blocks_[blocki] = blockval;
486 }
488 // Finish previous partial block, preserve existing value
489 {
490 const unsigned int blk = oldSize / elem_per_block;
491 const unsigned int off = oldSize % elem_per_block;
492 if (off)
493 {
494 const unsigned int mask = mask_lower(off);
496 blocks_[blk] &= mask;
497 blocks_[blk] |= ~mask & blockval;
498 }
499 }
500
501 clear_trailing_bits();
503 }
504 else if (newSize < oldSize)
505 {
506 // The list is now shorter than before, so we zero assign the unused
507 // blocks and any trailing junk. This costs slightly here, but make
508 // things much simpler elsewhere.
509
510 // Clear complete blocks
511 const label oldLen = num_blocks(oldSize);
512 const label newLen = num_blocks(size());
513 for (label blocki = newLen; blocki < oldLen; ++blocki)
514 {
515 blocks_[blocki] = 0u;
516 }
519 }
520}
521
522
523template<unsigned Width>
524inline void Foam::PackedList<Width>::setCapacity(const label numElem)
525{
526 const label nblocks = num_blocks(numElem);
527
528 blocks_.resize(nblocks, 0u);
529
530 if (numElem < size())
531 {
532 size_ = numElem;
534 }
536
537
538template<unsigned Width>
539inline void Foam::PackedList<Width>::reserve(const label numElem)
541 const label oldLen = blocks_.size();
542 const label newLen = num_blocks(numElem);
543
544 // Allocate more capacity if necessary
545 if (oldLen < newLen)
546 {
547 blocks_.resize
548 (
549 // SizeMin=16, allocation doubling
550 Foam::max(16, Foam::max(newLen, 2*oldLen)),
551 0u
552 );
553 }
554}
555
557template<unsigned Width>
558inline void Foam::PackedList<Width>::reserve_exact(const label numElem)
559{
560 const label oldLen = blocks_.size();
561 const label newLen = num_blocks(numElem);
562
563 // Allocate more capacity if necessary
564 if (oldLen < newLen)
565 {
566 blocks_.resize
567 (
568 // SizeMin=16
569 Foam::max(16, newLen),
570 0u
571 );
572 }
573}
574
575
576template<unsigned Width>
578{
579 blocks_ = 0u;
580}
581
582
583template<unsigned Width>
586 reset();
587 size_ = 0;
588}
589
590
591template<unsigned Width>
594 blocks_.clear();
595 size_ = 0;
597
598
599template<unsigned Width>
601{
602 // Any unneeded space allocated?
603 const label nblocks = num_blocks(size());
604 if (nblocks < blocks_.size())
606 blocks_.resize(nblocks);
607 }
609
610
611template<unsigned Width>
614 return num_blocks(size());
615}
616
617
618template<unsigned Width>
620{
621 return blocks_.cdata_bytes();
622}
623
624
625template<unsigned Width>
627{
628 return blocks_.data_bytes();
629}
630
631
632template<unsigned Width>
633inline std::streamsize Foam::PackedList<Width>::size_data() const noexcept
634{
635 return num_blocks(size());
636}
637
638
639template<unsigned Width>
640inline std::streamsize Foam::PackedList<Width>::size_bytes() const noexcept
641{
642 return num_blocks(size()) * sizeof(block_type);
643}
644
645
646template<unsigned Width>
647inline std::streamsize Foam::PackedList<Width>::byteSize() const noexcept
648{
649 return this->size_bytes();
650}
652
653template<unsigned Width>
655{
656 if (this == &rhs)
657 {
658 return; // Self-swap is a no-op
659 }
661 blocks_.swap(rhs.blocks_);
662 std::swap(size_, rhs.size_);
664
665
666template<unsigned Width>
668{
669 if (this == &rhs)
670 {
671 return; // Self-assignment is a no-op
672 }
673
674 blocks_.transfer(rhs.blocks_);
675 size_ = rhs.size_;
676 rhs.size_ = 0;
677}
678
679
680template<unsigned Width>
681inline unsigned int Foam::PackedList<Width>::get(const label i) const
682{
683 if (i < 0 || i >= size())
684 {
685 #ifdef FULLDEBUG
686 if (i < 0)
687 {
689 << "Ignoring attempt to get a negative index " << i
690 << " range is [0," << size_ << ")"
691 << endl;
692 }
693 #endif
694
695 return 0u; // Out-of-bounds (lazy): return 0 (false)
697
698 return reference(const_cast<PackedList<Width>*>(this), i).get();
699}
700
701
702template<unsigned Width>
704(
705 const label i,
706 const unsigned int val
707)
708{
709 if (i < 0)
710 {
711 #ifdef FULLDEBUG
713 << "Ignoring attempt to set a negative index " << i
714 << " range is [0," << size_ << ")"
715 << endl;
716 #endif
717
718 return false; // Out-of-bounds: ignore
720 else if (i >= size())
721 {
722 if (!val) // Unset out-of-bounds: ignore
723 {
724 return false;
725 }
726
727 resize(i + 1); // Lazy evaluation: adjust size for assign
729
730 return reference(this, i).set(val);
731}
732
733
734template<unsigned Width>
735inline bool Foam::PackedList<Width>::unset(const label i)
736{
737 if (i < 0 || i >= size())
738 {
739 return false; // Unset out-of-bounds: ignore
742 return reference(this, i).set(0u);
743}
744
745
746template<unsigned Width>
747inline void Foam::PackedList<Width>::push_back(const unsigned int val)
748{
749 const label idx = size();
750 reserve(idx + 1);
752
753 reference(this, idx).set(val);
754}
755
756
757template<unsigned Width>
758inline void Foam::PackedList<Width>::pop_back(label n)
759{
760 if (n >= size())
761 {
762 clear();
763 }
764 else if (n > 0)
766 resize(size() - n);
767 }
768}
769
770
771template<unsigned Width>
772inline unsigned int Foam::PackedList<Width>::remove()
773{
774 // Location of last element and simultaneously the new size
775 const label idx = size()-1;
776
777 if (idx < 0)
778 {
780 << "List is empty" << abort(FatalError);
781 }
782
783 const unsigned int old = reference(this, idx).get();
784 resize(idx);
785
786 return old;
787}
788
789
790template<unsigned Width>
791inline void Foam::PackedList<Width>::fill(const unsigned int val)
792{
793 if (empty())
794 {
795 return; // Trivial case
796 }
797
798 const label nblocks = num_blocks(size());
799
800 // Fill value for complete blocks
801 const unsigned int blockval = (val ? repeated_value(val) : 0u);
802
803 for (label blocki=0; blocki < nblocks; ++blocki)
804 {
805 blocks_[blocki] = blockval;
806 }
807
808 if (val)
809 {
810 clear_trailing_bits();
812}
813
814
815// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
816
817template<unsigned Width>
818inline unsigned int Foam::PackedList<Width>::operator[](const label i) const
820 return get(i);
821}
822
823
824template<unsigned Width>
827{
828 #ifdef FULLDEBUG
830 #endif
831 return reference(this, i);
832}
833
834
835template<unsigned Width>
840
841
842template<unsigned Width>
847
848
849template<unsigned Width>
850inline void Foam::PackedList<Width>::operator=(const unsigned int val)
851{
852 fill(val);
853}
854
855
856// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
857
858template<unsigned Width>
859inline bool Foam::operator==
860(
861 const PackedList<Width>& a,
862 const PackedList<Width>& b
864{
865 return a.equal(b);
866}
867
868
869template<unsigned Width>
870inline bool Foam::operator!=
871(
872 const PackedList<Width>& a,
873 const PackedList<Width>& b
874)
875{
876 return !a.equal(b);
877}
878
879
880// ************************************************************************* //
label n
virtual bool check(const char *operation) const
Check IOstream status for given operation.
Definition IOstream.C:45
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
bool readEnd(const char *funcName)
End read of data chunk, ends with ')'.
Definition Istream.C:152
bool readBegin(const char *funcName)
Begin read of data chunk, starts with '('.
Definition Istream.C:134
A reference supporting read/write access to an entry.
Definition PackedList.H:694
reference(PackedList *parent, const label index)
Construct by taking reference of block from within the list and the specified index.
unsigned shift_
The bit shift to access the given sub-portion.
Definition PackedList.H:708
block_type & ref_
Reference to the block.
Definition PackedList.H:703
unsigned int get() const
Get value as unsigned, no range-checking.
bool set(unsigned int val)
Set value, returning true if changed, no range-checking.
A dynamic list of packed unsigned integers, with the number of bits per item specified by the <Width>...
Definition PackedList.H:146
label num_blocks() const noexcept
The number of internal storage blocks.
void copyAssign(const PackedList< Width > &rhs)
Copy assignment.
label size_
Number of entries used.
Definition PackedList.H:229
std::streamsize size_data() const noexcept
The number of integer blocks addressed in the raw storage. Same as num_blocks().
static unsigned int readValue(Istream &is)
Read a list entry (allows for specialization).
Definition PackedListI.H:34
void pop_back(label n=1)
Reduce size by 1 or more elements. Can be called on an empty list.
label first_block() const
Find the first block with a '1' bit.
void swap(PackedList< Width > &rhs)
Swap contents with argument.
bool unset(const label i)
Unset the entry at index i.
char * data_bytes() noexcept
A pointer to the raw storage, reinterpreted as byte data.
void checkIndex(const label i) const
Check index is within valid range [0,size).
bool equal(const PackedList< Width > &other) const
Test for equality of sizes and the bits set.
Definition PackedList.C:147
static constexpr block_type mask_lower(unsigned elementOffset)
Masking for all bits below the element offset.
Definition PackedList.H:206
block_container blocks_
The blocks of raw data.
Definition PackedList.H:224
bool empty() const noexcept
True if the list is empty (ie, size() is zero).
Definition PackedList.H:387
void push_back(const unsigned int val)
Append a value at the end of the list.
labelList values() const
Return the values as a list of labels.
Definition PackedList.C:170
void resize_nocopy(const label numElem)
Currently identical to resize. Subject to future change (Oct-2021).
autoPtr< PackedList< Width > > clone() const
Clone.
void resize(const label numElem, const unsigned int val=0u)
Reset addressable list size, does not shrink the allocated size.
void fill(const unsigned int val)
Assign all entries to the given value.
void shrink_to_fit()
Shrink the allocated space to what is actually used.
static constexpr block_type max_value
The max value for an element which is also the bit-mask of the individual element.
Definition PackedList.H:182
static unsigned int repeated_value(unsigned val)
Enforce non-zero Width to fit within the block storage and require at least 2 items per storage block...
Definition PackedListI.H:27
void setCapacity(const label numElem)
Alter the size of the underlying storage.
void clear_trailing_bits()
Clear any partial rubbish in the last addressable block.
Definition PackedListI.H:76
std::streamsize byteSize() const noexcept
Same as size_bytes().
void clearStorage()
Clear the list and delete storage.
void operator=(const PackedList< Width > &list)
Copy assignment.
label capacity() const noexcept
Number of elements that can be stored without reallocating.
bool set(const label i, unsigned int val=~0u)
Set value at index i, default value set is the max_value.
bool trim(label minpos=-1)
Trim any trailing zero elements, optionally specifying a a minimum position, below which trimming wil...
Definition PackedListI.H:90
void reserve(const label numElem)
Reserve allocation space for at least this size (uses a size doubling strategy).
unsigned int get(const label i) const
Get value at index i or 0 for out-of-range.
constexpr PackedList() noexcept
Default construct, zero-sized and no allocation.
static constexpr unsigned elem_per_block
The number of elements stored per data block.
Definition PackedList.H:174
void transfer(PackedList< Width > &rhs)
Transfer the contents of the argument list into this list and annul the argument list.
const char * cdata_bytes() const noexcept
A const pointer to the raw storage, reinterpreted as byte data.
static constexpr label num_blocks(label numElem) noexcept
Calculate the number of blocks required to _address_ the requested number of elements.
Definition PackedList.H:196
void setPair(Istream &is)
Read an index/value pair and set accordingly.
Definition PackedListI.H:51
label size() const noexcept
Number of entries.
Definition PackedList.H:392
unsigned int block_type
The storage block type for bit elements.
Definition PackedList.H:156
void clear()
Clear the list, i.e. set addressable size to zero.
Istream & readList(Istream &is)
Clear list and read from stream.
void reset()
Clear all bits but do not adjust the addressable size.
void reserve_exact(const label numElem)
Reserve allocation space for at least this size (uses the specified size without any other resizing s...
label first_not_block() const
Find the first block with a '0' bit.
std::streamsize size_bytes() const noexcept
The number of bytes addressed in the raw storage including any padding.
unsigned int operator[](const label i) const
Identical to get() - get value at index.
unsigned int remove()
Remove and return the last element.
void size(const label n)
Older name for setAddressableSize.
Definition UList.H:118
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
limits reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL))
patchWriters resize(patchIds.size())
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Definition error.H:629
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition error.H:600
surface1 clear()
#define WarningInFunction
Report a warning using Foam::Warning.
#define FUNCTION_NAME
UIntType repeat_value(unsigned val)
Repeat a value of the given BitWidth into the destination output type.
Definition BitOps.H:289
Namespace for OpenFOAM.
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.
label readLabel(const char *buf)
Parse entire buffer as a label, skipping leading/trailing whitespace.
Definition label.H:63
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition Ostream.H:519
errorManip< error > abort(error &err)
Definition errorManip.H:139
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
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...
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition errorManip.H:125
UList< label > labelUList
A UList of labels.
Definition UList.H:75
bool readBool(Istream &is)
Read bool from stream using Foam::Switch(Istream&).
Definition bool.C:72
triangles reserve(surf.size())
volScalarField & b