Go to the documentation of this file.
40 namespace decompositionConstraints
62 selection_(coeffDict_.subDict(
"selection")),
63 grow_(
dict.getOrDefault(
"grow",
false))
70 <<
" : adding " << selection_.size()
71 <<
" geometric constraints for faces" <<
endl;
82 sources_(std::move(selections)),
89 <<
" : adding " << sources_.size()
90 <<
" geometric constraints for faces" <<
endl;
106 const label nFaces =
mesh.nFaces();
108 blockedFace.
resize(nFaces,
true);
122 source.applyToSet(topoSetSource::SUBTRACT, facesToBlock);
125 for (
const entry& dEntry : selection_)
127 if (!dEntry.isDict())
130 <<
"Ignoring non-dictionary entry "
145 source->applyToSet(topoSetSource::SUBTRACT, facesToBlock);
166 bitSet moreUnblocking(nFaces,
false);
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;
207 <<
" : geometric constraint grow added "
213 nchanged += nUnblocked;
219 <<
" : geometric constraint added for "
int debug
Static debugging option.
A keyword and a list of tokens is an 'entry'.
Abstract class for handling decomposition constraints.
defineTypeName(geometric)
A class for handling words, derived from Foam::string.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
void resize(const label len)
Adjust allocated size of list.
Keep faces together based on geometric considerations from a searchableSurfaces list....
void set(const bitSet &bitset)
Set specified bits from another bitset.
Ostream & endl(Ostream &os)
Add newline and flush stream.
The topoSetFaceSource is a intermediate class for handling topoSet sources for selecting faces.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
const boolList & addressing() const
Return the boolList.
Mesh consisting of general polyhedral cells.
messageStream Info
Information stream (stdout output on master, null elsewhere)
void transfer(List< T > &list)
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Macros for easy insertion into run-time selection tables.
geometric(const dictionary &dict)
Construct with constraint dictionary.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
addToRunTimeSelectionTable(decompositionConstraint, geometric, dictionary)
A special purpose topoSet with the face labels stored as a boolList. It does not correspond to a face...
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
const dictionary & optionalSubDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary, otherwise return this dictionary.
#define WarningInFunction
Report a warning using Foam::Warning.
A cell is defined as a list of faces with extra functionality.
virtual void add(const polyMesh &mesh, boolList &blockedFace, PtrList< labelList > &specifiedProcessorFaces, labelList &specifiedProcessor, List< labelPair > &explicitConnections) const
Add this constraint to list of constraints.