42 void Foam::regionCoupledBase::resetAMI()
const 48 const polyPatch& nbr = refCast<const polyPatch>(nbrPatch());
53 const Time& t = patch_.boundaryMesh().mesh().time();
54 OFstream os(t.path()/patch_.name() +
"_neighbourPatch-org.obj");
72 const Time& t = patch_.boundaryMesh().mesh().time();
73 OFstream osN(t.path()/patch_.name() +
"_neighbourPatch-trans.obj");
76 OFstream osO(t.path()/patch_.name() +
"_ownerPatch.obj");
103 Pout<<
"regionCoupledBase : " << patch_.
name()
104 <<
" constructed AMI with " <<
nl 105 <<
" " <<
":srcAddress:" << AMIPtr_().srcAddress().size()
107 <<
" " <<
" tgAddress :" << AMIPtr_().tgtAddress().size()
149 nbrPatchName_(dict.
lookup(
"neighbourPatch")),
151 nbrRegionName_(dict.
lookup(
"neighbourRegion")),
152 sameRegion_(nbrRegionName_ == patch_.boundaryMesh().mesh().name()),
167 nbrPatchName_(mpb.nbrPatchName_),
168 nbrPatchID_(mpb.nbrPatchID_),
169 nbrRegionName_(mpb.nbrRegionName_),
170 sameRegion_(mpb.sameRegion_),
172 AMIReverse_(mpb.AMIReverse_),
173 surfPtr_(mpb.surfPtr_),
174 surfDict_(mpb.surfDict_)
188 if (nbrPatchID_ == -1)
192 patch_.boundaryMesh().mesh().time().foundObject<
polyMesh>
206 if (nbrPatchID_ == -1)
209 <<
"Illegal neighbourPatch name " << nbrPatchName_
210 <<
nl <<
"Valid patch names are " 217 refCast<const regionCoupledBase>
225 <<
"Patch " << patch_.name()
226 <<
" specifies neighbour patch " << nbrPatchName()
227 <<
nl <<
" but that in return specifies " 239 if (nbrRegionName_ == patch_.boundaryMesh().mesh().name())
241 return patch_.index() < nbrPatchID();
245 return patch_.boundaryMesh().mesh().name() < nbrRegionName_;
253 const word surfType(surfDict_.lookupOrDefault<
word>(
"type",
"none"));
255 if (!surfPtr_.valid() && owner() && surfType !=
"none")
257 word surfName(surfDict_.lookupOrDefault(
"name", patch_.name()));
287 <<
"AMI interpolator only available to owner patch" 291 if (!AMIPtr_.valid())
310 return refCast<const regionCoupledBase>(pp);
334 writeEntry(os,
"neighbourPatch", nbrPatchName_);
335 writeEntry(os,
"neighbourRegion", nbrRegionName_);
342 if (!surfDict_.empty())
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Base class with common functionality for regionCoupled polyPatch. It includes AMI.
virtual const fileName & name() const
Return the name of the stream.
label nbrPatchID() const
Neighbour patch ID.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A class for handling file names.
Ostream & writeKeyword(Foam::Ostream &os, const keyType &kw)
Write the keyword to the Ostream with the current level of indentation.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const regionCoupledBase & nbrPatch() const
Return a reference to the neighbour patch.
virtual void clearGeom()
Clear geometry.
const AMIInterpolation & AMI() const
Return a reference to the AMI interpolator.
Ostream & endl(Ostream &os)
Add newline and flush stream.
label findPatchID(const word &patchName) const
Find patch index given a name.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
bool owner() const
Does this side own the patch?
A list of faces which address into the list of points.
vectorField pointField
pointField is a vectorField.
static const word & geometryDir()
Return the geometry directory name.
A class for handling words, derived from string.
wordList names() const
Return a list of patch names.
const word & constant() const
Return constant name.
static const word null
An empty word.
const polyMesh & mesh() const
Return the mesh reference.
errorManip< error > abort(error &err)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
virtual bool order(PstreamBuffers &, const primitivePatch &, labelList &faceMap, labelList &rotation) const
Return new ordering for primitivePatch.
const Time & time() const
Return time.
defineTypeNameAndDebug(combustionModel, 0)
Buffers for inter-processor communications streams (UOPstream, UIPstream).
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
PrimitivePatch< SubList< face >, const pointField & > primitivePatch
Addressing for a faceList slice.
virtual ~regionCoupledBase()
Destructor.
void setSize(const label)
Reset size of List.
regionCoupledBase(const polyPatch &)
Construct from patch.
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
#define WarningInFunction
Report a warning using Foam::Warning.
prefixOSstream Pout(cout, "Pout")
const word & nbrPatchName() const
Neighbour patch name.
Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mes...
static autoPtr< searchableSurface > New(const word &surfaceType, const IOobject &io, const dictionary &dict)
Return a reference to the selected searchableSurface.
Mesh consisting of general polyhedral cells.
A patch is a list of labels that address the faces in the global face list.
const autoPtr< searchableSurface > & surfPtr() const
Return a reference to the projection surface.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
dictionary subOrEmptyDict(const word &, const bool mustRead=false) const
Find and return a sub-dictionary as a copy, or.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.