38#ifndef cyclicACMIFvPatch_H
39#define cyclicACMIFvPatch_H
89 TypeName(cyclicACMIPolyPatch::typeName_());
114 return cyclicACMIPolyPatch_;
125 return cyclicACMIPolyPatch_.owner();
140 return cyclicACMIPolyPatch_.nonOverlapPatchID();
152 return cyclicACMIPolyPatch_.
AMI();
158 return cyclicACMIPolyPatch_.parallel();
164 return cyclicACMIPolyPatch_.forwardT();
170 return cyclicACMIPolyPatch_.
reverseT();
200 cyclicACMIPolyPatch_.cyclicAMIPolyPatch::interpolate
221 const Field<Type>&
fld,
222 labelRange& sendRequests,
223 labelRange& recvRequests,
224 PtrList<List<Type>>& sendBuffers,
236 cyclicACMIPolyPatch_.initInterpolate
261 return cyclicACMIPolyPatch_.interpolate
Info<< nl;Info<< "Write faMesh in vtk format:"<< nl;{ vtk::uindirectPatchWriter writer(aMesh.patch(), fileName(aMesh.time().globalPath()/vtkBaseFileName));writer.writeGeometry();globalIndex procAddr(aMesh.nFaces());labelList cellIDs;if(UPstream::master()) { cellIDs.resize(procAddr.totalSize());for(const labelRange &range :procAddr.ranges()) { auto slice=cellIDs.slice(range);slice=identity(range);} } writer.beginCellData(4);writer.writeProcIDs();writer.write("cellID", cellIDs);writer.write("area", aMesh.S().field());writer.write("normal", aMesh.faceAreaNormals());writer.beginPointData(1);writer.write("normal", aMesh.pointAreaNormals());Info<< " "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edges")));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
commsTypes
Communications types.
coupledFvPatch(const polyPatch &patch, const fvBoundaryMesh &bm)
Construct from polyPatch.
virtual const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
Cyclic patch for Arbitrarily Coupled Mesh Interface (ACMI).
const cyclicACMIFvPatch & neighbFvPatch() const
virtual tmp< labelField > internalFieldTransfer(const Pstream::commsTypes commsType, const labelUList &internalData) const
Return neighbour field.
tmp< Field< Type > > interpolate(const tmp< Field< Type > > &tfld) const
Interpolate (make sure to have up-to-date areas).
void resetPatchAreas(const fvPatch &fvp) const
Helper function to reset the FV patch areas from the primitive patch.
virtual bool owner() const
void makeWeights(scalarField &) const
Make patch weighting factors.
virtual const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
virtual label neighbPatchID() const
Return neighbour.
virtual void movePoints()
Correct patches after moving points.
TypeName(cyclicACMIPolyPatch::typeName_())
Runtime type information.
virtual bool coupled() const
Return true if this patch is coupled.
virtual bool parallel() const
Are the cyclic planes parallel.
const cyclicACMIPolyPatch & cyclicACMIPatch() const
Return local reference cast into the cyclic patch.
virtual tmp< vectorField > delta() const
Return delta (P to N) vectors across coupled patch.
cyclicACMIFvPatch(const polyPatch &patch, const fvBoundaryMesh &bm)
Construct from polyPatch.
virtual const fvPatch & nonOverlapPatch() const
Return non-overlapping fvPatch.
virtual tmp< labelField > interfaceInternalField(const labelUList &internalData) const
Return the values of the given internal data adjacent to the interface as a field.
virtual const AMIPatchToPatchInterpolation & AMI() const
Return a reference to the AMI interpolator.
void initInterpolate(const Field< Type > &fld, labelRange &sendRequests, labelRange &recvRequests, PtrList< List< Type > > &sendBuffers, PtrList< List< Type > > &recvBuffers, labelRange &sendRequests1, labelRange &recvRequests1, PtrList< List< Type > > &sendBuffers1, PtrList< List< Type > > &recvBuffers1) const
virtual const cyclicACMIFvPatch & neighbPatch() const
Return neighbour fvPatch.
tmp< Field< Type > > interpolate(const Field< Type > &localFld, const labelRange &requests, const PtrList< List< Type > > &recvBuffers, const labelRange &requests1, const PtrList< List< Type > > &recvBuffers1) const
virtual bool updateAreas() const
Update the AMI and patch areas. Return true if anything updated.
virtual label nonOverlapPatchID() const
Return neighbour.
tmp< Field< Type > > interpolate(const Field< Type > &fld) const
Interpolate (make sure to have uptodate areas).
virtual const tensorField & forwardT() const
Return face transformation tensor.
cyclicACMILduInterface() noexcept=default
Default construct.
Cyclic patch for Arbitrarily Coupled Mesh Interface (ACMI).
const AMIPatchToPatchInterpolation & AMI() const
Return a reference to the AMI interpolator.
virtual label neighbPatchID() const
Neighbour patch ID.
Smooth ATC in cells next to a set of patches supplied by type.
A fvBoundaryMesh is a fvPatch list with a reference to the associated fvMesh, with additional search ...
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
const polyPatch & patch() const noexcept
Return the polyPatch.
const fvBoundaryMesh & boundaryMesh() const noexcept
Return boundaryMesh reference.
A range or interval of labels defined by a start and a size.
A patch is a list of labels that address the faces in the global face list.
A class for managing temporary objects.
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
UniformDimensionedField< scalar > uniformDimensionedScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
AMIInterpolation AMIPatchToPatchInterpolation
Patch-to-patch interpolation == Foam::AMIInterpolation.
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
UList< label > labelUList
A UList of labels.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.