40namespace decompositionConstraints
62 selection_(coeffDict_.subDict(
"selection")),
63 grow_(
dict.getOrDefault(
"grow", false))
67 if (decompositionConstraint::debug)
70 <<
" : adding " << selection_.size()
71 <<
" geometric constraints for faces" <<
endl;
82 sources_(std::move(selections)),
86 if (decompositionConstraint::debug)
89 <<
" : adding " << sources_.size()
90 <<
" geometric constraints for faces" <<
endl;
111 if (decompositionConstraint::debug)
125 for (
const entry& dEntry : selection_)
127 if (!dEntry.isDict())
130 <<
"Ignoring non-dictionary entry "
152 if (decompositionConstraint::debug)
168 label nUnblocked = 0;
170 for (label celli=0; celli <
mesh.nCells(); ++celli)
172 const cell& cFaces =
mesh.cells()[celli];
175 for (
const label facei : cFaces)
177 if (!blockedFace[facei])
189 moreUnblocking.
set(cFaces);
195 for (label facei : moreUnblocking)
197 if (blockedFace[facei])
199 blockedFace[facei] =
false;
204 if (decompositionConstraint::debug)
207 <<
" : geometric constraint grow added "
213 nchanged += nUnblocked;
216 if (decompositionConstraint::debug)
219 <<
" : geometric constraint added for "
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
void transfer(List< T > &list)
void resize(const label len)
Adjust allocated size of list.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
void set(const bitSet &bitset)
Set specified bits from another bitset.
A cell is defined as a list of faces with extra functionality.
Abstract class for handling decomposition constraints.
Keep faces together based on geometric considerations from a list of topoSetFaceSource....
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
const dictionary & optionalSubDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary, otherwise return this dictionary.
A keyword and a list of tokens is an 'entry'.
A special purpose topoSet with the face labels stored as a boolList. It does not correspond to a face...
Sums a given list of (at least two or more) fields and outputs the result into a new field,...
Mesh consisting of general polyhedral cells.
const boolList & addressing() const noexcept
Return the boolList.
The topoSetFaceSource is a intermediate class for handling topoSet sources for selecting faces.
@ SUBTRACT
Subtract elements from current set.
A class for handling words, derived from Foam::string.
#define defineTypeName(Type)
Define the typeName.
const labelList nFaces(UPstream::listGatherValues< label >(aMesh.nFaces()))
#define WarningInFunction
Report a warning using Foam::Warning.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
messageStream Info
Information stream (stdout output on master, null elsewhere)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Ostream & endl(Ostream &os)
Add newline and flush stream.
T returnReduce(const T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Reduce (copy) and return value.