bitSet.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) 2018-2022 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::bitSet
28
29Description
30 A bitSet stores bits (elements with only two states) in packed internal
31 format and supports a variety of bit-set operations.
32 Its behaviour is largely list-like, with some HashSet features.
33
34SourceFiles
35 bitSetI.H
36 bitSet.C
37 bitSetIO.C
38 bitSetTemplates.C
39
40See also
41 Foam::BitOps
42 Foam::PackedList
43
44\*---------------------------------------------------------------------------*/
45
46#ifndef Foam_bitSet_H
47#define Foam_bitSet_H
48
49#include "className.H"
50#include "PackedList.H"
51
52// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53
54namespace Foam
55{
56
57// Forward Declarations
58class bitSet;
59
60/*---------------------------------------------------------------------------*\
61 Class bitSet Declaration
62\*---------------------------------------------------------------------------*/
64class bitSet
65:
66 public PackedList<1>
67{
68 // Private Member Functions
69
70 //- Find the first block with a '0' bit
71 // \return block number or -1 if the set is empty or all bits are on.
72 inline label first_not_block() const;
73
74
75protected:
76
77 // Logic/Set Operations
78
79 //- The set difference
80 // \code
81 // A = (A - B)
82 // A = (A & !B)
83 // A = (A & ~B)
84 // \endcode
85 // A and B can have different sizes.
86 // Never changes the original set size.
87 // Non-overlapping parts are considered \em off.
88 bitSet& minusEq(const bitSet& other);
89
90 //- The set logical AND
91 // \code
92 // A = (A & B)
93 //
94 // \endcode
95 // A and B can have different sizes.
96 // Never changes the original set size.
97 // Non-overlapping parts are considered \em off.
98 bitSet& andEq(const bitSet& other);
99
100 //- The set logical OR
101 // \code
102 // A = (A | B)
103 // \endcode
104 // A and B can have different sizes
105 //
106 // The size grows to accommodate new \em on bits.
107 bitSet& orEq(const bitSet& other);
108
109 //- The set logical XOR
110 // \code
111 // A = (A ^ B)
112 // \endcode
113 // A and B can have different sizes.
114 //
115 // The size grows to accommodate new \em on bits.
116 bitSet& xorEq(const bitSet& other);
117
118
119public:
120
121 // Forward declaration of access classes
122
123 class reference;
125 typedef unsigned int const_reference;
126
127
128 // Static Member Functions
129
130 //- Return a null bitSet reference
131 inline static const bitSet& null();
132
133
134 //- Declare type-name (with debug switch)
135 ClassName("bitSet");
136
137
138 // Constructors
139
140 //- Default construct an empty, zero-sized bitSet
141 inline bitSet() noexcept;
142
143 //- Construct from Istream
144 explicit bitSet(Istream& is);
145
146 //- Construct with given size, with all bits set to 0
147 inline explicit bitSet(const label n);
148
149 //- Construct with given size and value for all elements
150 inline bitSet(const label n, const bool val);
151
152 //- Copy construct
153 inline bitSet(const bitSet& bitset);
154
155 //- Move construct
156 inline bitSet(bitSet&& bitset);
157
158 //- Construct a new bitSet by extracting the specified (unique)
159 //- locations of an existing bitSet.
160 bitSet(const bitSet& bitset, const labelUList& addr);
161
162 //- Construct a new set by extracting the specified (unique)
163 //- locations of an existing bitSet.
164 template<class Addr>
165 bitSet
166 (
167 const bitSet& bitset,
168 const IndirectListBase<label, Addr>& addr
169 );
170
171 //- Construct a new bitSet by extracting the specified range
172 //- locations of an existing bitSet.
173 bitSet(const bitSet& bitset, const labelRange& range);
174
175 //- Construct from a list of bools
176 inline explicit bitSet(const UList<bool>& bools);
177
178 //- Construct with given pre-size (filled with 0),
179 //- subsequently add specified locations as 1,
180 //- auto-vivify entries if needed.
181 explicit bitSet(const label n, const labelRange& range);
182
183 //- Construct with given pre-size (filled with 0),
184 //- subsequently add specified locations as 1,
185 //- auto-vivify entries if needed.
186 inline bitSet(const label n, const labelUList& locations);
187
188 //- Construct with given pre-size (filled with 0),
189 //- subsequently add specified locations as 1,
190 //- auto-vivify entries if needed.
191 template<class Addr>
192 bitSet
193 (
194 const label n,
195 const IndirectListBase<label, Addr>& locations
196 );
197
198 //- Construct with given pre-size (filled with 0),
199 //- subsequently add specified locations as 1,
200 //- auto-vivify entries if needed.
201 template<unsigned N>
202 bitSet(const label n, const FixedList<label, N>& locations);
203
204 //- Construct with given pre-size (filled with 0),
205 //- subsequently add specified locations as 1,
206 //- auto-vivify entries if needed.
207 inline bitSet(const label n, std::initializer_list<label> locations);
208
209 //- Construct with automatic sizing (filled with 0),
210 //- and set the specified locations as 1.
211 explicit bitSet(const labelRange& range);
212
213 //- Construct with automatic sizing (filled with 0),
214 //- and set the specified locations as 1.
215 inline explicit bitSet(const labelUList& locations);
216
217 //- Construct with automatic sizing (filled with 0),
218 //- and set the specified locations as 1.
219 template<class Addr>
220 inline explicit bitSet(const IndirectListBase<label, Addr>& locations);
221
222 //- Construct with automatic sizing (filled with 0),
223 //- and set the specified locations as 1.
224 template<unsigned N>
225 explicit bitSet(const FixedList<label, N>& locations);
226
227 //- Clone
228 inline autoPtr<bitSet> clone() const;
229
230
231 // Member Functions
232
233 // Query
234
235 //- True if all bits in this bitset are set or if the set is \b empty.
236 // Returning true for an empty set may not seem intuitive, but
237 // conforms with boost definitions and std::all_of behaviour.
238 // \note Method name compatibility with boost::dynamic_bitset
239 inline bool all() const;
240
241 //- True if any bits in this bitset are set.
242 // \note Method name compatibility with boost::dynamic_bitset
243 inline bool any() const;
244
245 //- True if no bits in this bitset are set.
246 // \note Method name compatibility with boost::dynamic_bitset
247 inline bool none() const;
248
249 //- True if all entries have identical values, and the set is non-empty
250 inline bool uniform() const;
251
252 //- Count number of bits set.
253 // \param on can be set to false to count the number of unset bits
254 // instead.
255 // \note Method name compatibility with boost::dynamic_bitset
256 inline unsigned int count(const bool on=true) const;
257
258 //- True if any bits in the other bitset intersect (are the same).
259 //
260 // \note Method name compatibility with boost::dynamic_bitset
261 bool intersects(const bitSet& other) const;
262
263 //- Test value at specified position, never auto-vivify entries.
264 //
265 // \note Method name compatibility with std::bitset
266 inline bool test(const label pos) const;
267
268 //- Test value at specified position, never auto-vivify entries.
269 //
270 // \note Method name compatibility with HashSet
271 inline bool found(const label pos) const;
272
273 //- Locate the first bit that is set.
274 // \return the location or -1 if there are no bits set.
275 //
276 // \note Method name compatibility with boost::dynamic_bitset
277 inline label find_first() const;
278
279 //- Locate the first bit that is unset.
280 // \return the location or -1 if the set is empty or all bits are on.
281 //
282 // \note Provided for symmetry with find_first()
283 inline label find_first_not() const;
284
285 //- Locate the last bit set.
286 // \return the location or -1 if there are no bits set.
287 //
288 // \note Provided for symmetry with find_first()
289 inline label find_last() const;
290
291 //- Locate the next bit set, starting one beyond the specified position
292 // \return the location or -1 if there are no further bits set.
293 //
294 // \note Method name compatibility with boost::dynamic_bitset
295 inline label find_next(label pos) const;
296
297 //- The indices of the \a on bits as a sorted labelList.
298 //
299 // \note Method name compatibility with HashSet
300 labelList toc() const;
301
302 //- The indices of the \a on bits as a sorted labelList.
303 // This is identical to toc(), which is always sorted.
304 //
305 // \note Method name compatibility with HashSet
306 inline labelList sortedToc() const;
307
308 //- Return the bitset values as a boolList.
309 // When the output is a bool, this is more efficient than unpack()
310 List<bool> values() const;
311
312
313 // Assignment
314
315 //- Assign all entries to the given value.
316 inline void fill(const bool val);
317
318 //- Copy assign all entries from a list of bools.
319 void assign(const UList<bool>& bools);
320
321
322 // Setting single or multiple values
323
324 //- Assign a single index/value
325 using PackedList<1>::set;
326
327 //- Set specified bits from another bitset.
328 // The current set size may grow to accommodate any new bits
329 // (auto-vivifies).
330 inline void set(const bitSet& bitset);
331
332 //- Set the specified range of bits
333 // The current set size may grow to accommodate any new bits
334 // (auto-vivifies).
335 // \note this operation is generally more efficient than calling
336 // set(pos) on individual bits.
337 void set(const labelRange& range);
338
339
340 // Unsetting single or multiple values
341
342 //- Unset a single index
343 using PackedList<1>::unset;
344
345 //- Unset (subtract) the bits specified in the other bitset, which is
346 //- a set difference corresponds to the logical operation
347 // \code
348 // A = (A & !B)
349 // \endcode
350 // The result is comparable to 'operator-='
351 // \endcode
352 //
353 // A and B can have different sizes.
354 // Does not change the original set size.
355 inline bitSet& unset(const bitSet& other);
356
357 //- Unset the specified range of bits specified, never auto-vivifies.
358 // \note this operation can be more efficient than calling
359 // unset(pos) on individual bits.
360 void unset(const labelRange& range);
361
362
363 // Edit
364
365 //- Invert all bits in the addressable region
366 inline void flip();
367
368 //- Invert bit at the specified position.
369 // A no-op if the position is out-of-range
370 inline void flip(const label pos);
371
372 //- Resize to include the last \em on bit only.
373 // Functionally identical to resize(find_last()+1)
374 inline void resize_last();
375
376 //- Swap contents
377 inline void swap(bitSet& bitset);
378
379 //- Transfer the contents of the argument list into this list
380 //- and annul the argument list.
381 inline void transfer(bitSet& bitset);
382
383
384 // Convenience methods
385
386 //- Ensure the addressable range does not exceed maxSize.
387 // Either decreases the size of the bitSet or is a no-op.
388 //
389 // \code
390 // pointField& pts = mesh.points();
391 // bitset.bound(pts.size());
392 //
393 // for (const label pointi : bitset)
394 // {
395 // pts[pointi] ...
396 // }
397 // \endcode
398 inline bitSet& bound(const label maxSize);
399
400 //- Ensure the addressable range does not exceed that of other.
401 // Either decreases the size of the bitSet or is a no-op.
402 inline bitSet& bound(const bitSet& other);
403
404 //- Ensure that minSize is covered by the bitSet.
405 // Either increases the size of the bitSet or is a no-op.
406 inline bitSet& extend(const label minSize);
407
408 //- Ensure the bitset is addressable throughout the range of other.
409 // Either increases the size of the bitSet or is a no-op.
410 inline bitSet& extend(const bitSet& other);
411
412 //- Set the locations listed by the iterator range,
413 //- auto-vivify entries if needed.
414 //
415 // \return number of locations changed
416 template<class InputIter>
417 label setMany(InputIter first, InputIter last);
418
419 //- Set the listed locations to 1.
420 // Does auto-vivify for non-existent entries.
421 //
422 // \return number of locations changed
423 inline label set(const labelUList& locations);
424
425 //- Set the listed locations to 1.
426 // Does auto-vivify for non-existent entries.
427 //
428 // \return number of locations changed
429 template<class Addr>
430 inline label set(const IndirectListBase<label, Addr>& locations);
431
432 //- Set the listed locations to 1.
433 // Does auto-vivify for non-existent entries.
434 //
435 // \return number of locations changed
436 template<unsigned N>
437 label set(const FixedList<label, N>& locations);
438
439 //- Unset the locations listed by the iterator range,
440 //- never auto-vivify entries.
441 //
442 // \return number of locations changed
443 template<class InputIter>
444 label unset(InputIter first, InputIter last);
445
446 //- Unset the listed locations, never auto-vivifies.
447 //
448 // \return number of locations changed
449 inline label unset(const labelUList& locations);
450
451 //- Unset the listed locations, never auto-vivifies.
452 //
453 // \return number of locations changed
454 template<class Addr>
455 inline label unset(const IndirectListBase<label, Addr>& locations);
456
457 //- Unset the listed locations, never auto-vivifies.
458 //
459 // \return number of locations changed
460 template<unsigned N>
461 label unset(const FixedList<label, N>& locations);
462
463
464 // Access helpers
465
466 //- A reference supporting read/write access to an entry
467 class reference
468 :
469 public PackedList<1>::reference
470 {
471 protected:
473 friend class bitSet; // Access for parent
474 void operator&() = delete; // Refuse to provide its address
475
476 //- Construct by taking reference of block from within
477 //- the list and the specified index.
478 inline reference(bitSet* parent, const label index);
479
480 public:
481
482 //- Copy construct
483 reference(const reference&) = default;
484
485 //- Move construct
486 reference(reference&&) = default;
487
488 //- Flip the bit at the position, no range-checking
489 inline void flip();
490
491 //- Value assignment
492 inline void operator=(const reference& other);
493
494 //- Value assignment
495 inline void operator=(const unsigned int val);
496
497 //- Conversion operator
498 inline operator unsigned int () const;
499 };
500
501
502 // Iteration
503
504 //- A const_iterator for iterating across \a on values
505 class const_iterator
507 friend class bitSet;
508
509 //- The parent being iterated
510 const bitSet* set_;
511
512 //- Global position of the current \a on bit
513 label pos_;
514
515 //- Default construct - an end iterator
516 inline const_iterator() noexcept;
517
518 //- Construct begin iterator
519 inline const_iterator(const bitSet* bitset);
520
521 //- Construct iterator, starting at or beyond the given position
522 inline const_iterator(const bitSet* bitset, label pos);
523
524 public:
525
526 //- Return the current \a on position
527 inline label operator*() const noexcept;
528
529 //- Move to the next \a on position
530 inline const_iterator& operator++();
531
532 inline bool operator==(const const_iterator& iter) const noexcept;
533 inline bool operator!=(const const_iterator& iter) const noexcept;
534 };
535
536
537 //- Iterator set to the position of the first \a on bit
538 inline const_iterator begin() const;
539
540 //- Iterator set to the position of the first \a on bit
541 inline const_iterator cbegin() const;
542
543 //- Iterator set to the position of the first \a on bit that occurs
544 //- at or beyond the given position
545 inline const_iterator begin(label pos) const;
546
547 //- Iterator set to the position of the first \a on bit that occurs
548 //- at or beyond the given position
549 inline const_iterator cbegin(label pos) const;
550
551 //- Iterator beyond the end of the bitSet
552 inline const_iterator end() const noexcept;
553
554 //- Iterator beyond the end of the bitSet
555 inline const_iterator cend() const noexcept;
556
557
558 // Member Operators
559
560 //- Test value at specified position, same as test()
561 // Enables use as a predicate
562 inline bool operator()(const label pos) const;
563
564 //- Identical to get() - get value at index.
565 // Never auto-vivify entries.
566 inline unsigned int operator[](const label i) const;
567
568 //- Non-const access to value at index.
569 // Fatal for out-of-range indices
570 inline reference operator[](const label i);
571
572 //- Copy assignment
573 inline bitSet& operator=(const bitSet& bitset);
574
575 //- Move assignment
576 inline bitSet& operator=(bitSet&& bitset);
577
578 //- Assign all entries to the given value. fill()
579 inline bitSet& operator=(const bool val);
580
581 //- Bitwise-AND all the bits in other with the bits in this bitset.
582 // The operands may have dissimilar sizes,
583 // never changes the original set size.
584 // Non-overlapping elements are considered \em off.
585 inline bitSet& operator&=(const bitSet& other);
586
587 //- Bitwise-OR operator - similar to the set() method.
588 // The operands may have dissimilar sizes,
589 // the set grows to accommodate new \em on bits.
590 inline bitSet& operator|=(const bitSet& other);
591
592 //- Bitwise-XOR operator - retains unique entries.
593 // The operands may have dissimilar sizes,
594 // the set grows to accommodate new \em on bits.
595 inline bitSet& operator^=(const bitSet& other);
596
597 //- Remove entries from this list - identical to the unset() method.
598 // The operands may have dissimilar sizes,
599 // never changes the original set size.
600 inline bitSet& operator-=(const bitSet& other);
601
602
603 // IOstream Operators
604
605 //- Return info proxy
606 InfoProxy<bitSet> info() const
607 {
608 return *this;
609 }
610
611
612 // Housekeeping
613
614 //- Deprecated(2020-11) use fill()
615 // \deprecated(2020-11) use fill()
616 void assign(const unsigned int val) { this->fill(val); }
617};
618
619
620// * * * * * * * * * * * * * * * * * Traits * * * * * * * * * * * * * * * * //
621
622//- Hashing for bitSet data
623template<> struct Hash<bitSet> : bitSet::hasher {};
624
625
626// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
627
628//- Write bitset to Ostream with 40 items per line.
629Ostream& operator<<(Ostream& os, const bitSet& bitset);
630
631//- Output bitset information
633
634
635//- Bitset complement, returns a copy of the bitset with all its bits flipped
636inline bitSet operator~(const bitSet& bitset);
637
638//- Bitwise-AND of two bitsets.
639// See bitSet::operator&= for more details.
640inline bitSet operator&(const bitSet& a, const bitSet& b);
641
642//- Bitwise-OR of two bitsets
643// See bitSet::operator|= for more details.
644inline bitSet operator|(const bitSet& a, const bitSet& b);
645
646//- Bitwise-XOR of two bitsets to form a unique bit-set
647// See bitSet::operator^= for more details.
648inline bitSet operator^(const bitSet& a, const bitSet& b);
649
650//- Bitwise difference (subset) of two bitsets to form a unique bit-set
651// See bitSet::operator-= for more details.
652inline bitSet operator-(const bitSet& a, const bitSet& b);
653
654
655// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
656
657} // End namespace Foam
658
659// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
660
661#include "bitSetI.H"
662
663// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
664
665#ifdef NoRepository
666 #include "bitSetTemplates.C"
667#endif
668
669// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
670
671#endif
672
673// ************************************************************************* //
scalar range
bool found
label n
A 1D vector of objects of type <T> with a fixed length <N>.
Definition: FixedList.H:81
Base for lists with indirect addressing, templated on the list contents type and the addressing type....
A helper class for outputting values to Ostream.
Definition: InfoProxy.H:52
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:64
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
A dynamic list of packed unsigned integers, with the number of bits per item specified by the <Width>...
Definition: PackedList.H:129
friend Ostream & operator(Ostream &os, const InfoProxy< PackedList< Width > > &info)
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A const_iterator for iterating across on values.
Definition: bitSet.H:505
const_iterator & operator++()
Move to the next on position.
Definition: bitSetI.H:253
bool operator!=(const const_iterator &iter) const noexcept
Definition: bitSetI.H:270
bool operator==(const const_iterator &iter) const noexcept
Definition: bitSetI.H:261
label operator*() const noexcept
Return the current on position.
Definition: bitSetI.H:247
A reference supporting read/write access to an entry.
Definition: bitSet.H:469
void operator&()=delete
reference(const reference &)=default
Copy construct.
reference(reference &&)=default
Move construct.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
Definition: bitSet.H:66
unsigned int count(const bool on=true) const
Count number of bits set.
Definition: bitSetI.H:500
void fill(const bool val)
Assign all entries to the given value.
Definition: bitSetI.H:566
const_iterator cbegin() const
Iterator set to the position of the first on bit.
Definition: bitSetI.H:284
unsigned int const_reference
Definition: bitSet.H:124
void flip()
Invert all bits in the addressable region.
Definition: bitSetI.H:634
label find_last() const
Locate the last bit set.
Definition: bitSetI.H:375
labelList sortedToc() const
The indices of the on bits as a sorted labelList.
Definition: bitSetI.H:533
ClassName("bitSet")
Declare type-name (with debug switch)
static const bitSet & null()
Return a null bitSet reference.
Definition: bitSetI.H:455
const_iterator end() const noexcept
Iterator beyond the end of the bitSet.
Definition: bitSetI.H:302
void set(const bitSet &bitset)
Set specified bits from another bitset.
Definition: bitSetI.H:590
void transfer(bitSet &bitset)
Definition: bitSetI.H:560
bool none() const
True if no bits in this bitset are set.
Definition: bitSetI.H:488
autoPtr< bitSet > clone() const
Clone.
Definition: bitSetI.H:170
bool test(const label pos) const
Test value at specified position, never auto-vivify entries.
Definition: bitSetI.H:521
bitSet & bound(const label maxSize)
Ensure the addressable range does not exceed maxSize.
Definition: bitSetI.H:658
label find_first_not() const
Locate the first bit that is unset.
Definition: bitSetI.H:343
bitSet & xorEq(const bitSet &other)
The set logical XOR.
Definition: bitSet.C:174
InfoProxy< bitSet > info() const
Return info proxy.
Definition: bitSet.H:605
bool all() const
True if all bits in this bitset are set or if the set is empty.
Definition: bitSetI.H:461
labelList toc() const
The indices of the on bits as a sorted labelList.
Definition: bitSet.C:474
const_iterator begin() const
Iterator set to the position of the first on bit.
Definition: bitSetI.H:278
void assign(const UList< bool > &bools)
Copy assign all entries from a list of bools.
Definition: bitSet.C:274
void resize_last()
Resize to include the last on bit only.
Definition: bitSetI.H:539
bitSet() noexcept
Default construct an empty, zero-sized bitSet.
Definition: bitSetI.H:77
List< bool > values() const
Return the bitset values as a boolList.
Definition: bitSet.C:513
bitSet & andEq(const bitSet &other)
The set logical AND.
Definition: bitSet.C:77
bitSet & orEq(const bitSet &other)
The set logical OR.
Definition: bitSet.C:129
bitSet & unset(const bitSet &other)
Definition: bitSetI.H:628
void swap(bitSet &bitset)
Swap contents.
Definition: bitSetI.H:554
label setMany(InputIter first, InputIter last)
const_iterator cend() const noexcept
Iterator beyond the end of the bitSet.
Definition: bitSetI.H:308
bool intersects(const bitSet &other) const
True if any bits in the other bitset intersect (are the same).
Definition: bitSet.C:294
label find_next(label pos) const
Locate the next bit set, starting one beyond the specified position.
Definition: bitSetI.H:401
bitSet & minusEq(const bitSet &other)
The set difference.
Definition: bitSet.C:42
bool any() const
True if any bits in this bitset are set.
Definition: bitSetI.H:469
bitSet & extend(const label minSize)
Ensure that minSize is covered by the bitSet.
Definition: bitSetI.H:675
label find_first() const
Locate the first bit that is set.
Definition: bitSetI.H:314
bitSet & operator=(const bitSet &bitset)
Copy assignment.
Definition: bitSetI.H:715
A range or interval of labels defined by a start and a size.
Definition: labelRange.H:58
Macro definitions for declaring ClassName(), NamespaceName(), etc.
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
Definition: className.H:67
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
tmp< faMatrix< Type > > operator-(const faMatrix< Type > &)
Unary negation.
bitSet operator~(const bitSet &bitset)
Bitset complement, returns a copy of the bitset with all its bits flipped.
Definition: bitSetI.H:762
dimensionedScalar pos(const dimensionedScalar &ds)
bitSet operator|(const bitSet &a, const bitSet &b)
Bitwise-OR of two bitsets.
Definition: bitSetI.H:780
tmp< GeometricField< Type, fvPatchField, volMesh > > operator&(const fvMatrix< Type > &, const DimensionedField< Type, volMesh > &)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Definition: boundaryPatch.C:83
bitSet operator^(const bitSet &a, const bitSet &b)
Bitwise-XOR of two bitsets to form a unique bit-set.
Definition: bitSetI.H:790
const direction noexcept
Definition: Scalar.H:223
volScalarField & b
Definition: createFields.H:27
Hash function class. The default definition is for primitives. Non-primitives used to hash entries on...
Definition: Hash.H:54
Hashing functor for PackedList.
Definition: PackedList.H:533
const Vector< label > N(dict.get< Vector< label > >("N"))