Go to the documentation of this file.
50 #ifndef cyclicAMIPolyPatch_H
51 #define cyclicAMIPolyPatch_H
240 const word& patchType,
242 const word& defaultAMIMethod = faceAreaWeightAMI::typeName
252 const word& patchType,
253 const word& defaultAMIMethod = faceAreaWeightAMI::typeName
267 const label newStart,
268 const word& nbrPatchName
412 virtual bool owner()
const;
505 template<
class Type,
class CombineOp>
509 const CombineOp& cop,
const Field< point_type > & points() const noexcept
Return reference to global points.
Encapsulates using "patchGroups" to specify coupled patch.
virtual bool order(PstreamBuffers &, const primitivePatch &, labelList &faceMap, labelList &rotation) const
Return new ordering for primitivePatch.
label periodicPatchID_
Periodic patch.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
virtual void resetAMI() const
Reset the AMI interpolator, use current patch points.
virtual bool owner() const
Does this side own the patch?
A class for handling words, derived from Foam::string.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
word nbrPatchName_
Name of other half.
A class for managing temporary objects.
virtual void initOrder(PstreamBuffers &, const primitivePatch &) const
word periodicPatchName_
Periodic patch name.
virtual bool changeTopology() const
Return true if this patch changes the mesh topology.
point rotationCentre_
Point on axis of rotation for rotational cyclics.
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
virtual void setAMIFaces()
Set properties of newly inserted faces after topological changes.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
virtual void reverseTransformPosition(point &l, const label facei) const
Transform a patch-based position from this side to nbr side.
Direct mesh changes based on v1.3 polyTopoChange syntax.
const dictionary surfDict_
Dictionary used during projection surface construction.
const scalarListList & weights() const
Helper function to return the weights.
const autoPtr< searchableSurface > & surfPtr() const
Create and return pointer to the projection surface.
const coupleGroupIdentifier coupleGroup_
Optional patchGroup to find neighbPatch.
static const scalar tolerance_
Tolerance used e.g. for area calculations/limits.
The coupledPolyPatch is an abstract base class for patches that couple regions of the computational d...
virtual bool masterImplicit() const
Return implicit master.
label nbrPatchID_
Index of other half.
const vector & separationVector() const
Translation vector for translational cyclic AMI.
virtual void initMovePoints(PstreamBuffers &pBufs, const pointField &)
Initialise the patches for moving points.
virtual bool coupled() const
tmp< Field< Type > > interpolateUntransformed(const Field< Type > &fld, const UList< Type > &defaultValues) const
Interpolate without periodic.
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
bool canResetAMI() const
Flag to indicate whether the AMI can be reset.
virtual void transformPosition(pointField &) const
Transform patch-based positions from nbr side to this side.
virtual void newInternalProcFaces(label &, label &) const
Return number of new internal of this polyPatch faces.
const scalarField & weightsSum() const
Helper function to return the weights sum.
vector separationVector_
Translation vector.
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
vectorField faceAreas0_
Temporary storage for AMI face areas.
autoPtr< AMIPatchToPatchInterpolation > AMIPtr_
AMI interpolation class.
label pointFace(const label facei, const vector &n, point &p) const
virtual void movePoints(PstreamBuffers &pBufs, const pointField &)
Correct patches after moving points.
virtual bool removeAMIFaces(polyTopoChange &topoChange)
Collect faces to remove in the topoChange container.
virtual bool setTopology(polyTopoChange &topoChange)
Set topology changes in the polyTopoChange object.
TypeName("cyclicAMI")
Runtime type information.
bool updatingAMI() const
Return access to the updated flag.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
tmp< Field< Type > > interpolate(const Field< Type > &fld, const UList< Type > &defaultValues=UList< Type >()) const
Interpolate field.
virtual void calcTransforms()
Recalculate the transformation tensors.
vector rotationAxis_
Axis of rotation for rotational cyclics.
scalar rotationAngle_
Rotation angle.
virtual label neighbPatchID() const
Neighbour patch ID.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual const cyclicAMIPolyPatch & neighbPatch() const
Return a reference to the neighbour patch.
bool createAMIFaces() const
Return access to the createAMIFaces flag.
virtual label neighbPolyPatchID() const
Return nbr patch ID.
cyclicAMIPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType, const transformType transform=UNKNOWN, const word &defaultAMIMethod=faceAreaWeightAMI::typeName)
Construct from (base coupled patch) components.
bool rotationAngleDefined_
Flag to show whether the rotation angle is defined.
label index() const noexcept
The index of this patch in the boundaryMesh.
const labelUList & faceCells() const
Return face-cell addressing.
labelListList srcFaceIDs_
label start() const
Return start label of this patch in the polyMesh face list.
virtual transformType transform() const
Type of transform.
bool moveFaceCentres_
Move face centres (default = no)
const vector & rotationAxis() const
Axis of rotation for rotational cyclic AMI.
const scalar fraction_
Particle displacement fraction accross AMI.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
List< labelList > labelListList
A List of labelList.
const AMIPatchToPatchInterpolation & AMI() const
Return a reference to the AMI interpolator.
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
scalar fraction() const
Particle fraction increase between AMI pathces.
const vectorField::subField faceCentres() const
Return face centres.
bool applyLowWeightCorrection() const
Return true if applying the low weight correction.
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
virtual void clearGeom()
Clear geometry.
virtual refPtr< labelListList > mapCollocatedFaces() const
Return collocated faces map.
virtual void reverseTransformDirection(vector &d, const label facei) const
Transform a patch-based direction from this side to.
virtual bool addAMIFaces(polyTopoChange &topoChange)
Collect faces to add in the topoChange container.
virtual const labelUList & nbrCells() const
Return nbrCells.
Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mes...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
const word & neighbPatchName() const
Neighbour patch name.
vectorField faceCentres0_
Temporary storage for AMI face centres.
virtual ~cyclicAMIPolyPatch()=default
Destructor.
virtual void restoreScaledGeometry()
autoPtr< searchableSurface > surfPtr_
Projection surface.
const point & rotationCentre() const
Point on axis of rotation for rotational cyclic AMI.
const word & name() const noexcept
The patch name.
bool createAMIFaces_
Flag to indicate that new AMI faces will created.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
autoPtr< coordSystem::cylindrical > cylindricalCS() const
Create a coordinate system from the periodic patch (or nullptr)
label periodicPatchID() const
Periodic patch ID (or -1)
labelListList tgtFaceIDs_
const labelListList & srcAddress() const
Return const access to source patch addressing.
vectorField & faceAreas0() const
Return access to the initial face areas.
A class for managing references or pointers (no reference counting)
A list of faces which address into the list of points.
Cyclic patch for Arbitrary Mesh Interface (AMI)
vectorField & faceCentres0() const
Return access to the initial face centres.