39 {
"always",
"detect",
"never"};
48 nbrRegionName_(patch_.boundaryMesh().
mesh().
name()),
49 nbrPatchName_(patch_.
name()),
58 const word& nbrRegionName,
59 const word& nbrPatchName,
65 nbrRegionName_(nbrRegionName),
66 nbrPatchName_(nbrPatchName),
84 :
dict.lookupOrDefaultBackwardsCompatible<
word>
86 {
"neighbourRegion",
"sampleRegion"},
87 pp.boundaryMesh().mesh().name()
106 ? moveUpdateNames_.read(
dict.
lookup(
"moveUpdate"))
116 const bool haveCoupleGroup = coupleGroup_.valid();
118 const bool haveNbrRegion =
120 const bool haveNbrPatch =
125 if ((haveNbrRegion || haveNbrPatch || isSamePatch) && haveCoupleGroup)
128 <<
"Either neighbourRegion/Patch information or a coupleGroup "
132 if (haveNbrPatch && isSamePatch)
135 <<
"Either a neighbourPatch should be specified, or samePatch "
139 if (tt == transformType::none)
142 cyclicTransform(
dict,
true).transformType();
148 <<
" transform specified for patch '" << patch_.name()
149 <<
"' in region '" << patch_.boundaryMesh().mesh().name()
150 <<
"'. This patch does not support transformed mapping."
164 coupleGroup_(mpb.coupleGroup_),
165 nbrRegionName_(mpb.nbrRegionName_),
166 nbrPatchName_(mpb.nbrPatchName_),
167 transform_(mpb.transform_),
168 moveUpdate_(mpb.moveUpdate_)
198 const polyMesh& nbrMesh = this->nbrMesh();
205 <<
"Cannot find patch " << nbrPatchName()
206 <<
" in region " << nbrRegionName() <<
endl
226 auto localPatchMoving = [](
const polyPatch& patch)
251 localPatchMoving(patch) || localPatchMoving(nbrPatch),
274 coupleGroup_.write(os);
276 transform_.write(os);
278 writeEntryIfDifferent<word>
282 moveUpdateNames_[moveUpdate::always],
283 moveUpdateNames_[moveUpdate_]
Initialise the NamedEnum HashTable from the static list of names.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const labelList & meshPoints() const
Return labelList of mesh points in patch. They are constructed.
A List with indirect addressing.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
T lookupOrDefault(const word &, const T &, const bool writeDefault=writeOptionalEntries > 0) const
Find and return a T, if not found return the given default.
ITstream & lookupBackwardsCompatible(const wordList &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream, trying a list of keywords.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
const Time & time() const
Return the top-level database.
Base class for engines and poly patches which provide mapping between two poly patches.
const polyPatch & nbrPolyPatch() const
Get the patch to map from.
virtual void write(Ostream &) const
Write as a dictionary.
const polyMesh & nbrMesh() const
Get the mesh for the region to map from.
virtual ~mappedPatchBaseBase()
Destructor.
bool haveNbr() const
Is the neighbour available?
transformType
The type of the transformation permitted/required by this patch.
static const NamedEnum< moveUpdate, 3 > moveUpdateNames_
Names of the move-update conditions.
static bool specified(const dictionary &dict)
Return whether or not the given dictionary contains a.
static bool moving(const polyPatch &patch, const polyPatch &nbrPatch)
Return whether or not the patches have moved.
moveUpdate
Enumeration for the condition that triggers re-calculation of the.
mappedPatchBaseBase(const polyPatch &)
Construct from patch.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type and name.
bool foundObject(const word &name) const
Is the named Type in registry.
label findIndex(const word &patchName) const
Find patch index given a name.
wordList names() const
Return the list of patch names.
const polyMesh & mesh() const
Return the mesh reference.
Mesh consisting of general polyhedral cells.
virtual const pointField & oldPoints() const
Return old points for mesh motion.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
virtual const pointField & points() const
Return raw points.
bool moving() const
Is mesh moving.
A patch is a list of labels that address the faces in the global face list.
const polyBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
A class for handling words, derived from string.
static const word null
An empty word.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
bool valid(const PtrList< ModelType > &l)
errorManipArg< error, int > exit(error &err, const int errNo=1)
void writeEntryIfDifferent(Ostream &os, const word &entryName, const EntryType &value1, const EntryType &value2)
Helper function to write the keyword and entry only if the.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
dimensionSet transform(const dimensionSet &)
defineTypeNameAndDebug(combustionModel, 0)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.