Loading...
Searching...
No Matches
cyclicACMIFvPatch Class Reference

Cyclic patch for Arbitrarily Coupled Mesh Interface (ACMI). More...

#include <cyclicACMIFvPatch.H>

Inheritance diagram for cyclicACMIFvPatch:
Collaboration diagram for cyclicACMIFvPatch:

Public Member Functions

 TypeName (cyclicACMIPolyPatch::typeName_())
 Runtime type information.
 cyclicACMIFvPatch (const polyPatch &patch, const fvBoundaryMesh &bm)
 Construct from polyPatch.
const cyclicACMIPolyPatchcyclicACMIPatch () const
 Return local reference cast into the cyclic patch.
virtual label neighbPatchID () const
 Return neighbour.
virtual bool owner () const
virtual const cyclicACMIFvPatchneighbPatch () const
 Return neighbour fvPatch.
virtual label nonOverlapPatchID () const
 Return neighbour.
virtual const fvPatchnonOverlapPatch () const
 Return non-overlapping fvPatch.
virtual const AMIPatchToPatchInterpolationAMI () const
 Return a reference to the AMI interpolator.
virtual bool parallel () const
 Are the cyclic planes parallel.
virtual const tensorFieldforwardT () const
 Return face transformation tensor.
virtual const tensorFieldreverseT () const
 Return neighbour-cell transformation tensor.
const cyclicACMIFvPatchneighbFvPatch () const
virtual bool coupled () const
 Return true if this patch is coupled.
virtual tmp< vectorFielddelta () const
 Return delta (P to N) vectors across coupled patch.
template<class Type>
tmp< Field< Type > > interpolate (const Field< Type > &fld) const
 Interpolate (make sure to have uptodate areas).
template<class Type>
tmp< Field< Type > > interpolate (const tmp< Field< Type > > &tfld) const
 Interpolate (make sure to have up-to-date areas).
template<class Type>
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
template<class Type>
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 tmp< labelFieldinterfaceInternalField (const labelUList &internalData) const
 Return the values of the given internal data adjacent to the interface as a field.
virtual tmp< labelFieldinterfaceInternalField (const labelUList &internalData, const labelUList &faceCells) const
 Return the values of the given internal data adjacent to the interface as a field using a mapping faceCell.
virtual tmp< labelFieldinternalFieldTransfer (const Pstream::commsTypes commsType, const labelUList &internalData) const
 Return neighbour field.
Public Member Functions inherited from coupledFvPatch
 TypeNameNoDebug (coupledPolyPatch::typeName_())
 Runtime type information.
 coupledFvPatch (const polyPatch &patch, const fvBoundaryMesh &bm)
 Construct from polyPatch.
virtual ~coupledFvPatch ()=default
 Destructor.
virtual const labelUListfaceCells () const
 Return faceCell addressing.
virtual void initInternalFieldTransfer (const Pstream::commsTypes commsType, labelUList &iF) const
 Initialise neighbour field transfer.
virtual void initInternalFieldTransfer (const Pstream::commsTypes commsType, labelUList &iF, const labelUList &faceCell) const
 Initialise neighbour field transfer using faceCells map.
virtual void initInternalFieldTransfer (const Pstream::commsTypes commsType, const labelUList &iF) const
 Inherit initInternalFieldTransfer from lduInterface.
virtual void initInternalFieldTransfer (const Pstream::commsTypes commsType, const labelUList &iF, const labelUList &faceCells) const
 Inherit initInternalFieldTransfer from lduInterface.
Public Member Functions inherited from lduInterface
 TypeNameNoDebug ("lduInterface")
 Runtime type information.
 lduInterface () noexcept=default
 Default construct.
virtual ~lduInterface ()=default
 Destructor.
Public Member Functions inherited from fvPatch
virtual void makeDeltaCoeffs (scalarField &) const
 Correct patch deltaCoeffs.
virtual void makeNonOrthoDeltaCoeffs (scalarField &) const
 Correct patch non-ortho deltaCoeffs.
virtual void makeNonOrthoCorrVectors (vectorField &) const
 Correct patch non-ortho correction vectors.
virtual void initMovePoints ()
 Initialise the patches for moving points.
 TypeName (polyPatch::typeName_())
 Runtime type information.
 declareRunTimeSelectionTable (autoPtr, fvPatch, polyPatch,(const polyPatch &patch, const fvBoundaryMesh &bm),(patch, bm))
 fvPatch (const polyPatch &, const fvBoundaryMesh &)
 Construct from polyPatch and fvBoundaryMesh.
virtual ~fvPatch ()
 Destructor.
const polyPatchpatch () const noexcept
 Return the polyPatch.
virtual const wordname () const
 Return name.
label index () const noexcept
 The index of this patch in the boundary mesh.
label start () const noexcept
 The patch start within the polyMesh face list.
label offset () const noexcept
 The offset of this patch within the boundary face list.
virtual label size () const
 Patch size is the number of faces, but can be overloaded.
const fvBoundaryMeshboundaryMesh () const noexcept
 Return boundaryMesh reference.
template<class T>
const List< T >::subList patchSlice (const UList< T > &values) const
 This patch slice from the complete list, which has size mesh::nFaces(), using the virtual patch size.
template<class T>
const List< T >::subList boundarySlice (const UList< T > &values) const
 This patch slice from the list of boundary values, which has size mesh::nBoundaryFaces(), using the virtual patch size.
const vectorFieldCf () const
 Return face centres.
tmp< vectorFieldCn () const
 Return neighbour cell centres.
const vectorFieldSf () const
 Return face area vectors, like the fvMesh::Sf() method.
const scalarFieldmagSf () const
 Return face area magnitudes, like the fvMesh::magSf() method.
tmp< vectorFieldunitSf () const
 Return face unit normals, like the fvMesh::unitSf() method. Same as nf().
tmp< vectorFieldnf () const
 Return face unit normals, like the fvMesh::unitSf() method Same as unitSf().
const scalarFieldweights () const
 Return patch weighting factors.
const scalarFielddeltaCoeffs () const
 Return the face - cell distance coefficient except for coupled patches for which the cell-centre to coupled-cell-centre distance coefficient is returned.
template<class Type>
void patchInternalField (const UList< Type > &internalData, const labelUList &addressing, UList< Type > &pfld) const
 Extract internal field next to patch using specified addressing.
template<class Type>
void patchInternalField (const UList< Type > &internalData, UList< Type > &pfld) const
 Extract internal field next to patch as patch field using faceCells() mapping.
template<class Type>
tmp< Field< Type > > patchInternalField (const UList< Type > &internalData) const
 Return given internal field next to patch as patch field using faceCells() mapping.
template<class GeometricField, class AnyType = bool>
const GeometricField::PatchpatchField (const GeometricField &gf) const
 Return the patch field of the GeometricField corresponding to this patch.
template<class GeometricField, class AnyType = bool>
const GeometricField::PatchlookupPatchField (const word &name) const
 Lookup the named field from the local registry and return the patch field corresponding to this patch.
template<class GeometricField>
const GeometricField::PatchcfindPatchField (const word &name) const
 Find the named field (if any) from the local registry and return the patch field corresponding to this patch.
template<class Type>
Foam::tmp< Foam::Field< Type > > patchInternalField (const UList< Type > &internalData) const
Public Member Functions inherited from cyclicACMILduInterface
 TypeNameNoDebug ("cyclicACMILduInterface")
 Runtime type information.
 cyclicACMILduInterface () noexcept=default
 Default construct.
virtual ~cyclicACMILduInterface ()=default
 Destructor.
Public Member Functions inherited from cyclicAMILduInterface
 TypeNameNoDebug ("cyclicAMILduInterface")
 Runtime type information.
 cyclicAMILduInterface () noexcept=default
 Default construct.
virtual ~cyclicAMILduInterface ()=default
 Destructor.

Protected Member Functions

virtual bool updateAreas () const
 Update the AMI and patch areas. Return true if anything updated.
void resetPatchAreas (const fvPatch &fvp) const
 Helper function to reset the FV patch areas from the primitive patch.
void makeWeights (scalarField &) const
 Make patch weighting factors.
virtual void movePoints ()
 Correct patches after moving points.

Additional Inherited Members

Public Types inherited from fvPatch
typedef fvBoundaryMesh BoundaryMesh
 The boundary type associated with the patch.
Static Public Member Functions inherited from fvPatch
static autoPtr< fvPatch > New (const polyPatch &, const fvBoundaryMesh &)
 Return a pointer to a new patch created on freestore from polyPatch.
static const fvPatch & lookupPatch (const polyPatch &p)
 Lookup the polyPatch index on corresponding fvMesh.
static bool constraintType (const word &patchType)
 Return true if the given type is a constraint type.
static wordList constraintTypes ()
 Return a list of all the constraint patch types.

Detailed Description

Cyclic patch for Arbitrarily Coupled Mesh Interface (ACMI).

Source files

Definition at line 50 of file cyclicACMIFvPatch.H.

Constructor & Destructor Documentation

◆ cyclicACMIFvPatch()

cyclicACMIFvPatch ( const polyPatch & patch,
const fvBoundaryMesh & bm )

Construct from polyPatch.

Definition at line 135 of file cyclicACMIFvPatch.C.

References coupledFvPatch::coupledFvPatch(), cyclicACMILduInterface::cyclicACMILduInterface(), Foam::dimTime, mesh, fvPatch::patch(), and Foam::refCast().

Referenced by delta(), makeWeights(), movePoints(), neighbFvPatch(), neighbPatch(), and updateAreas().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ updateAreas()

bool updateAreas ( ) const
protectedvirtual

Update the AMI and patch areas. Return true if anything updated.

Definition at line 39 of file cyclicACMIFvPatch.C.

References cyclicACMIFvPatch(), Foam::endl(), fvPatch::name(), neighbPatch(), nonOverlapPatch(), Foam::Pout, and resetPatchAreas().

Referenced by initInterpolate(), interpolate(), and movePoints().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resetPatchAreas()

void resetPatchAreas ( const fvPatch & fvp) const
protected

Helper function to reset the FV patch areas from the primitive patch.

Definition at line 76 of file cyclicACMIFvPatch.C.

References fvPatch::Cf(), DebugPout, Foam::endl(), polyPatch::faceAreas(), polyPatch::faceCentres(), Foam::mag(), fvPatch::magSf(), patchIdentifier::name(), fvPatch::patch(), fvPatch::Sf(), and Foam::sum().

Referenced by updateAreas().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeWeights()

void makeWeights ( scalarField & w) const
protectedvirtual

Make patch weighting factors.

Implements coupledFvPatch.

Definition at line 87 of file cyclicACMIFvPatch.C.

References coupled, cyclicACMIFvPatch(), coupledFvPatch::delta(), forAll, interpolate(), Foam::mag(), fvPatch::makeWeights(), neighbFvPatch(), fvPatch::nf(), and cyclicACMIPolyPatch::tolerance().

Here is the call graph for this function:

◆ movePoints()

void movePoints ( )
protectedvirtual

Correct patches after moving points.

Reimplemented from fvPatch.

Definition at line 307 of file cyclicACMIFvPatch.C.

References AMI(), cyclicACMIFvPatch(), cyclicACMIPatch(), Foam::endl(), forAll, patchIdentifier::index(), face::mag(), fvPatch::magSf(), boundaryMesh::mesh(), mesh, name, neighbPatch(), nonOverlapPatch(), fvPatch::patch(), points, Foam::Pout, and updateAreas().

Here is the call graph for this function:

◆ TypeName()

TypeName ( cyclicACMIPolyPatch::typeName_() )

Runtime type information.

References fvPatch::patch().

Here is the call graph for this function:

◆ cyclicACMIPatch()

const cyclicACMIPolyPatch & cyclicACMIPatch ( ) const
inline

Return local reference cast into the cyclic patch.

Definition at line 123 of file cyclicACMIFvPatch.H.

Referenced by movePoints().

Here is the caller graph for this function:

◆ neighbPatchID()

virtual label neighbPatchID ( ) const
inlinevirtual

Return neighbour.

Implements cyclicAMILduInterface.

Definition at line 131 of file cyclicACMIFvPatch.H.

◆ owner()

virtual bool owner ( ) const
inlinevirtual

Implements cyclicAMILduInterface.

Definition at line 136 of file cyclicACMIFvPatch.H.

◆ neighbPatch()

virtual const cyclicACMIFvPatch & neighbPatch ( ) const
inlinevirtual

Return neighbour fvPatch.

Implements cyclicAMILduInterface.

Definition at line 144 of file cyclicACMIFvPatch.H.

References fvPatch::boundaryMesh(), cyclicACMIFvPatch(), cyclicAMIPolyPatch::neighbPatchID(), and Foam::refCast().

Referenced by cyclicACMIFvPatchField< Type >::initEvaluate(), movePoints(), and updateAreas().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nonOverlapPatchID()

virtual label nonOverlapPatchID ( ) const
inlinevirtual

Return neighbour.

Definition at line 155 of file cyclicACMIFvPatch.H.

Referenced by nonOverlapPatch().

Here is the caller graph for this function:

◆ nonOverlapPatch()

virtual const fvPatch & nonOverlapPatch ( ) const
inlinevirtual

Return non-overlapping fvPatch.

Definition at line 163 of file cyclicACMIFvPatch.H.

References fvPatch::boundaryMesh(), and nonOverlapPatchID().

Referenced by movePoints(), and updateAreas().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AMI()

virtual const AMIPatchToPatchInterpolation & AMI ( ) const
inlinevirtual

Return a reference to the AMI interpolator.

Implements cyclicAMILduInterface.

Definition at line 171 of file cyclicACMIFvPatch.H.

Referenced by movePoints().

Here is the caller graph for this function:

◆ parallel()

virtual bool parallel ( ) const
inlinevirtual

Are the cyclic planes parallel.

Implements coupledFvPatch.

Definition at line 179 of file cyclicACMIFvPatch.H.

Referenced by delta().

Here is the caller graph for this function:

◆ forwardT()

virtual const tensorField & forwardT ( ) const
inlinevirtual

Return face transformation tensor.

Implements coupledFvPatch.

Definition at line 187 of file cyclicACMIFvPatch.H.

Referenced by delta().

Here is the caller graph for this function:

◆ reverseT()

virtual const tensorField & reverseT ( ) const
inlinevirtual

Return neighbour-cell transformation tensor.

Implements coupledFvPatch.

Definition at line 195 of file cyclicACMIFvPatch.H.

◆ neighbFvPatch()

const cyclicACMIFvPatch & neighbFvPatch ( ) const
inline

Definition at line 200 of file cyclicACMIFvPatch.H.

References fvPatch::boundaryMesh(), cyclicACMIFvPatch(), cyclicAMIPolyPatch::neighbPatchID(), and Foam::refCast().

Referenced by coupled(), delta(), internalFieldTransfer(), and makeWeights().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ coupled()

bool coupled ( ) const
virtual

Return true if this patch is coupled.

This is equivalent to coupledPolyPatch::coupled() if parallel running or both sides present, false otherwise

Reimplemented from coupledFvPatch.

Definition at line 226 of file cyclicACMIFvPatch.C.

References neighbFvPatch(), UPstream::parRun(), and fvPatch::size().

Here is the call graph for this function:

◆ delta()

Foam::tmp< Foam::vectorField > delta ( ) const
virtual

Return delta (P to N) vectors across coupled patch.

Implements coupledFvPatch.

Definition at line 232 of file cyclicACMIFvPatch.C.

References coupled, cyclicACMIFvPatch(), coupledFvPatch::delta(), forAll, forwardT(), Foam::interpolate(), neighbFvPatch(), tmp< T >::New(), parallel(), UList< T >::size(), and Foam::transform().

Here is the call graph for this function:

◆ interpolate() [1/3]

template<class Type>
tmp< Field< Type > > interpolate ( const Field< Type > & fld) const
inline

Interpolate (make sure to have uptodate areas).

Definition at line 225 of file cyclicACMIFvPatch.H.

References fld(), and updateAreas().

Referenced by interpolate(), and makeWeights().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ interpolate() [2/3]

template<class Type>
tmp< Field< Type > > interpolate ( const tmp< Field< Type > > & tfld) const
inline

Interpolate (make sure to have up-to-date areas).

Definition at line 244 of file cyclicACMIFvPatch.H.

References interpolate().

Here is the call graph for this function:

◆ initInterpolate()

template<class Type>
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
inline

Definition at line 255 of file cyclicACMIFvPatch.H.

References fld(), and updateAreas().

Here is the call graph for this function:

◆ interpolate() [3/3]

template<class Type>
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
inline

Definition at line 288 of file cyclicACMIFvPatch.H.

◆ interfaceInternalField() [1/2]

Foam::tmp< Foam::labelField > interfaceInternalField ( const labelUList & internalData) const
virtual

Return the values of the given internal data adjacent to the interface as a field.

Implements coupledFvPatch.

Definition at line 276 of file cyclicACMIFvPatch.C.

References fvPatch::patchInternalField().

Here is the call graph for this function:

◆ interfaceInternalField() [2/2]

Foam::tmp< Foam::labelField > interfaceInternalField ( const labelUList & internalData,
const labelUList & faceCells ) const
virtual

Return the values of the given internal data adjacent to the interface as a field using a mapping faceCell.

Implements coupledFvPatch.

Definition at line 285 of file cyclicACMIFvPatch.C.

References coupledFvPatch::faceCells(), tmp< T >::New(), fvPatch::patchInternalField(), and fvPatch::size().

Here is the call graph for this function:

◆ internalFieldTransfer()

Foam::tmp< Foam::labelField > internalFieldTransfer ( const Pstream::commsTypes commsType,
const labelUList & internalData ) const
virtual

Return neighbour field.

Implements coupledFvPatch.

Definition at line 297 of file cyclicACMIFvPatch.C.

References neighbFvPatch().

Here is the call graph for this function:

The documentation for this class was generated from the following files: