Base class with common functinality for regionCoupled polyPatch. It includes AMI. More...
Public Member Functions | |
TypeName ("regionCoupledBase") | |
Runtime type information. More... | |
regionCoupledBase (const polyPatch &) | |
Construct from patch. More... | |
regionCoupledBase (const polyPatch &, const dictionary &) | |
Construct from dictionary. More... | |
regionCoupledBase (const polyPatch &, const regionCoupledBase &) | |
Construct as copy, resetting patch. More... | |
virtual | ~regionCoupledBase () |
Destructor. More... | |
const word & | nbrPatchName () const |
Neighbour patch name. More... | |
const word & | nbrRegionName () const |
Neighbour region name. More... | |
bool | sameRegion () const |
Cached sampleRegion != mesh.name() More... | |
label | neighbPatchID () const |
Neighbour patch ID. More... | |
bool | owner () const |
Does this side own the patch? More... | |
const regionCoupledBase & | neighbPatch () const |
Return a reference to the neighbour patch. More... | |
const autoPtr< searchableSurface > & | surfPtr () const |
Return a reference to the projection surface. More... | |
const AMIPatchToPatchInterpolation & | AMI () const |
Return a reference to the AMI interpolator. More... | |
template<class Type > | |
tmp< Field< Type > > | interpolate (const Field< Type > &fld) const |
Interpolate field. More... | |
template<class Type > | |
tmp< Field< Type > > | interpolate (const tmp< Field< Type > > &tFld) const |
Interpolate tmp field. More... | |
template<class Type , class BinaryOp > | |
void | interpolate (const UList< Type > &fld, const BinaryOp &bop, List< Type > &result) const |
Low-level interpolate List. More... | |
virtual bool | order (PstreamBuffers &, const primitivePatch &, labelList &faceMap, labelList &rotation) const |
Return new ordering for primitivePatch. More... | |
virtual const word & | regionCoupleType () const =0 |
Return the type. More... | |
virtual void | write (Ostream &) const |
Write the polyPatch data as a dictionary. More... | |
template<class Type > | |
Foam::tmp< Foam::Field< Type > > | interpolate (const Field< Type > &fld) const |
template<class Type > | |
Foam::tmp< Foam::Field< Type > > | interpolate (const tmp< Field< Type > > &tFld) const |
Protected Member Functions | |
virtual void | clearGeom () |
Clear geometry. More... | |
Private Member Functions | |
void | resetAMI () const |
Reset the AMI interpolator. More... | |
Private Attributes | |
const polyPatch & | patch_ |
Patch to sample. More... | |
const word | nbrPatchName_ |
Name of other half. More... | |
label | nbrPatchID_ |
Index of other half. More... | |
const word | nbrRegionName_ |
Name of other region. More... | |
const bool | sameRegion_ |
Same region. More... | |
autoPtr< AMIPatchToPatchInterpolation > | AMIPtr_ |
AMI interpolation class. More... | |
const bool | AMIReverse_ |
Flag to indicate that slave patch should be reversed for AMI. More... | |
autoPtr< searchableSurface > | surfPtr_ |
Projection surface. More... | |
const dictionary | surfDict_ |
Dictionary used during projection surface construction. More... | |
Base class with common functinality for regionCoupled polyPatch. It includes AMI.
Definition at line 51 of file regionCoupledBase.H.
regionCoupledBase | ( | const polyPatch & | pp | ) |
Construct from patch.
Definition at line 126 of file regionCoupledBase.C.
regionCoupledBase | ( | const polyPatch & | pp, |
const dictionary & | dict | ||
) |
Construct from dictionary.
Definition at line 143 of file regionCoupledBase.C.
regionCoupledBase | ( | const polyPatch & | pp, |
const regionCoupledBase & | mpb | ||
) |
Construct as copy, resetting patch.
Definition at line 161 of file regionCoupledBase.C.
|
virtual |
Destructor.
Definition at line 180 of file regionCoupledBase.C.
|
private |
Reset the AMI interpolator.
Definition at line 42 of file regionCoupledBase.C.
References regionCoupledBase::AMIPtr_, regionCoupledBase::AMIReverse_, polyPatch::boundaryMesh(), Foam::endl(), AMIInterpolation< SourcePatch, TargetPatch >::imFaceAreaWeight, PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::localPoints(), polyBoundaryMesh::mesh(), patchIdentifier::name(), regionCoupledBase::neighbPatch(), Foam::nl, regionCoupledBase::owner(), regionCoupledBase::patch_, Time::path(), Foam::Pout, regionCoupledBase::surfPtr(), objectRegistry::time(), faceAreaIntersect::tmMesh, and Foam::meshTools::writeOBJ().
|
protectedvirtual |
Clear geometry.
Definition at line 116 of file regionCoupledBase.C.
Referenced by regionCoupledWallPolyPatch::calcGeometry(), regionCoupledPolyPatch::movePoints(), regionCoupledWallPolyPatch::movePoints(), regionCoupledPolyPatch::updateMesh(), regionCoupledWallPolyPatch::updateMesh(), regionCoupledPolyPatch::~regionCoupledPolyPatch(), and regionCoupledWallPolyPatch::~regionCoupledWallPolyPatch().
TypeName | ( | "regionCoupledBase" | ) |
Runtime type information.
|
inline |
Neighbour patch name.
Definition at line 126 of file regionCoupledBase.H.
References regionCoupledBase::nbrPatchName_.
Referenced by regionCoupledBase::neighbPatchID().
|
inline |
Neighbour region name.
Definition at line 132 of file regionCoupledBase.H.
References regionCoupledBase::nbrRegionName_.
Referenced by regionCoupledBaseFvPatch::nbrFvMesh(), and regionCoupledBaseFvPatch::nbrMesh().
|
inline |
Cached sampleRegion != mesh.name()
Definition at line 138 of file regionCoupledBase.H.
References regionCoupledBase::sameRegion_.
Referenced by regionCoupledBaseFvPatch::sameRegion().
Foam::label neighbPatchID | ( | ) | const |
Neighbour patch ID.
Definition at line 186 of file regionCoupledBase.C.
References polyMesh::boundaryMesh(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, polyBoundaryMesh::findPatchID(), objectRegistry::lookupObject(), mesh, polyBoundaryMesh::mesh(), polyBoundaryMesh::names(), regionCoupledBase::nbrPatchName(), Foam::nl, objectRegistry::time(), and WarningInFunction.
Referenced by regionCoupledBaseFvPatch::neighbFvPatch(), regionCoupledBaseFvPatch::neighbPatch(), and regionCoupledBaseFvPatch::neighbPatchID().
bool owner | ( | ) | const |
Does this side own the patch?
Definition at line 237 of file regionCoupledBase.C.
Referenced by regionCoupledBaseFvPatch::owner(), and regionCoupledBase::resetAMI().
const Foam::regionCoupledBase & neighbPatch | ( | ) | const |
Return a reference to the neighbour patch.
Definition at line 301 of file regionCoupledBase.C.
References polyMesh::boundaryMesh(), objectRegistry::lookupObject(), mesh, polyBoundaryMesh::mesh(), and objectRegistry::time().
Referenced by regionCoupledBase::resetAMI().
const Foam::autoPtr< Foam::searchableSurface > & surfPtr | ( | ) | const |
Return a reference to the projection surface.
Definition at line 251 of file regionCoupledBase.C.
References polyMesh::boundaryMesh(), TimePaths::constant(), mesh, polyBoundaryMesh::mesh(), IOobject::MUST_READ, searchableSurface::New(), IOobject::NO_WRITE, and fvMesh::time().
Referenced by regionCoupledBase::resetAMI().
const Foam::AMIPatchToPatchInterpolation & AMI | ( | ) | const |
Return a reference to the AMI interpolator.
Definition at line 282 of file regionCoupledBase.C.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.
Referenced by regionCoupledBaseFvPatch::AMI().
Low-level interpolate List.
Definition at line 64 of file regionCoupledBaseTemplates.C.
References fld().
|
virtual |
Return new ordering for primitivePatch.
Ordering is -faceMap: for every face index of the new face -rotation:for every new face the clockwise shift of the original face. Return false if nothing changes (faceMap is identity, rotation is 0), true otherwise.
Definition at line 315 of file regionCoupledBase.C.
References Foam::faceMap(), and List::setSize().
|
pure virtual |
Return the type.
Implemented in regionCoupledPolyPatch, and regionCoupledWallPolyPatch.
Referenced by regionCoupledBaseFvPatch::regionCoupleType().
|
virtual |
Write the polyPatch data as a dictionary.
Reimplemented in regionCoupledPolyPatch, and regionCoupledWallPolyPatch.
Definition at line 333 of file regionCoupledBase.C.
References token::END_STATEMENT, Foam::nl, and Ostream::writeKeyword().
Referenced by regionCoupledWallPolyPatch::write(), and regionCoupledPolyPatch::write().
Foam::tmp<Foam::Field<Type> > interpolate | ( | const Field< Type > & | fld | ) | const |
Definition at line 30 of file regionCoupledBaseTemplates.C.
References fld().
Foam::tmp<Foam::Field<Type> > interpolate | ( | const tmp< Field< Type > > & | tFld | ) | const |
Definition at line 47 of file regionCoupledBaseTemplates.C.
|
private |
Patch to sample.
Definition at line 58 of file regionCoupledBase.H.
Referenced by regionCoupledBase::resetAMI().
|
private |
Name of other half.
Definition at line 61 of file regionCoupledBase.H.
Referenced by regionCoupledBase::nbrPatchName().
|
mutableprivate |
Index of other half.
Definition at line 64 of file regionCoupledBase.H.
|
private |
Name of other region.
Definition at line 67 of file regionCoupledBase.H.
Referenced by regionCoupledBase::nbrRegionName().
|
private |
Same region.
Definition at line 70 of file regionCoupledBase.H.
Referenced by regionCoupledBase::sameRegion().
|
mutableprivate |
AMI interpolation class.
Definition at line 73 of file regionCoupledBase.H.
Referenced by regionCoupledBase::resetAMI().
|
private |
Flag to indicate that slave patch should be reversed for AMI.
Definition at line 76 of file regionCoupledBase.H.
Referenced by regionCoupledBase::resetAMI().
|
mutableprivate |
Projection surface.
Definition at line 79 of file regionCoupledBase.H.
|
private |
Dictionary used during projection surface construction.
Definition at line 82 of file regionCoupledBase.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.