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)
208 FatalErrorIn(
"cyclicPolyAMIPatch::neighbPatchID() const")
209 <<
"Illegal neighbourPatch name " << nbrPatchName_
210 <<
nl <<
"Valid patch names are " 217 refCast<const regionCoupledBase>
224 WarningIn(
"regionCoupledBase::neighbPatchID() const")
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()));
288 "const AMIPatchToPatchInterpolation& regionCoupledBase::AMI()" 290 <<
"AMI interpolator only available to owner patch" 294 if (!AMIPtr_.valid())
313 return refCast<const regionCoupledBase>(pp);
349 if (!surfDict_.empty())
label neighbPatchID() const
Neighbour patch ID.
const AMIPatchToPatchInterpolation & AMI() const
Return a reference to the AMI interpolator.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
const autoPtr< searchableSurface > & surfPtr() const
Return a reference to the projection surface.
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
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...
const word & constant() const
Return constant name.
vectorField pointField
pointField is a vectorField.
virtual bool order(PstreamBuffers &, const primitivePatch &, labelList &faceMap, labelList &rotation) const
Return new ordering for primitivePatch.
AMIInterpolation< PrimitivePatch< face, SubList, const pointField & >, PrimitivePatch< face, SubList, const pointField & > > AMIPatchToPatchInterpolation
A patch is a list of labels that address the faces in the global face list.
wordList names() const
Return a list of patch names.
virtual ~regionCoupledBase()
Destructor.
static autoPtr< searchableSurface > New(const word &surfaceType, const IOobject &io, const dictionary &dict)
Return a reference to the selected searchableSurface.
void setSize(const label)
Reset size of List.
Ostream & endl(Ostream &os)
Add newline and flush stream.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
#define WarningIn(functionName)
Report a warning using Foam::Warning.
Base class with common functinality for regionCoupled polyPatch. It includes AMI. ...
Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mes...
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
bool owner() const
Does this side own the patch?
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
errorManip< error > abort(error &err)
virtual const fileName & name() const
Return the name of the stream.
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
A list of faces which address into the list of points.
const word & nbrPatchName() const
Neighbour patch name.
Mesh consisting of general polyhedral cells.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
const polyMesh & mesh() const
Return the mesh reference.
A class for handling file names.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
const regionCoupledBase & neighbPatch() const
Return a reference to the neighbour patch.
const Time & time() const
Return time.
PrimitivePatch< face, SubList, const pointField & > primitivePatch
Addressing for a faceList slice.
void writeOBJ(Ostream &os, const point &pt)
Write obj representation of point.
virtual void clearGeom()
Clear geometry.
label findPatchID(const word &patchName) const
Find patch index given a name.
regionCoupledBase(const polyPatch &)
Construct from patch.
static const word null
An empty word.
defineTypeNameAndDebug(combustionModel, 0)
dictionary subOrEmptyDict(const word &, const bool mustRead=false) const
Find and return a sub-dictionary as a copy, or.
prefixOSstream Pout(cout,"Pout")