42 void Foam::regionCoupledBase::resetAMI()
const 48 const polyPatch& nbr = refCast<const polyPatch>(neighbPatch());
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() < neighbPatchID();
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);
345 if (!surfDict_.empty())
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Base class with common functinality for regionCoupled polyPatch. It includes AMI. ...
virtual const fileName & name() const
Return the name of the stream.
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.
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.
virtual void clearGeom()
Clear geometry.
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?
const regionCoupledBase & neighbPatch() const
Return a reference to the neighbour patch.
label neighbPatchID() const
Neighbour patch ID.
A list of faces which address into the list of points.
vectorField pointField
pointField is a vectorField.
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)
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
PrimitivePatch< face, SubList, 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.
AMIInterpolation< PrimitivePatch< face, SubList, const pointField & >, PrimitivePatch< face, SubList, const pointField & > > AMIPatchToPatchInterpolation
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...
const AMIPatchToPatchInterpolation & AMI() const
Return a reference to the AMI interpolator.
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.