patchInjectionBase Class Reference
Inheritance diagram for patchInjectionBase:
[legend]
Collaboration diagram for patchInjectionBase:
[legend]

Public Member Functions

 patchInjectionBase (const polyMesh &mesh, const word &patchName)
 Construct from mesh and patch name. More...
 
 patchInjectionBase (const patchInjectionBase &pib)
 Copy constructor. More...
 
virtual ~patchInjectionBase ()=default
 Destructor. More...
 
virtual void updateMesh (const polyMesh &mesh)
 Update patch geometry and derived info for injection locations. More...
 
label setPositionAndCell (const fvMesh &mesh, const scalar fraction01, Random &rnd, vector &position, label &cellOwner, label &tetFacei, label &tetPti)
 Set the injection position and owner cell, tetFace and tetPt. More...
 
virtual label setPositionAndCell (const fvMesh &mesh, Random &rnd, vector &position, label &cellOwner, label &tetFacei, label &tetPti)
 Set the injection position and owner cell, tetFace and tetPt. More...
 
label whichProc (const scalar fraction01) const
 Return the processor that has the location specified by the fraction. More...
 

Protected Attributes

const word patchName_
 Patch name. More...
 
const label patchId_
 Patch ID. More...
 
scalar patchArea_
 Patch area - total across all processors. More...
 
vectorList patchNormal_
 Patch face normal directions. More...
 
labelList cellOwners_
 List of cell labels corresponding to injector positions. More...
 
faceList triFace_
 Decomposed patch faces as a list of triangles. More...
 
labelList triToFace_
 Addressing from per triangle to patch face. More...
 
scalarList triCumulativeMagSf_
 Cumulative triangle area per triangle face. More...
 
scalarList sumTriMagSf_
 Cumulative area fractions per processor. More...
 

Detailed Description

Definition at line 64 of file patchInjectionBase.H.

Constructor & Destructor Documentation

◆ patchInjectionBase() [1/2]

patchInjectionBase ( const polyMesh mesh,
const word patchName 
)

Construct from mesh and patch name.

Definition at line 38 of file patchInjectionBase.C.

References polyMesh::boundaryMesh(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, mesh, polyBoundaryMesh::names(), Foam::nl, patchInjectionBase::patchId_, patchInjectionBase::patchName_, and patchInjectionBase::updateMesh().

Here is the call graph for this function:

◆ patchInjectionBase() [2/2]

Copy constructor.

Definition at line 66 of file patchInjectionBase.C.

◆ ~patchInjectionBase()

virtual ~patchInjectionBase ( )
virtualdefault

Destructor.

Member Function Documentation

◆ updateMesh()

void updateMesh ( const polyMesh mesh)
virtual

Update patch geometry and derived info for injection locations.

Reimplemented in PatchFlowRateInjection< CloudType >, and PatchInjection< CloudType >.

Definition at line 82 of file patchInjectionBase.C.

References DynamicList< T, SizeMin >::append(), polyMesh::boundaryMesh(), DynamicList< T, SizeMin >::clear(), f(), forAll, Foam::mag(), mesh, processorFaPatch::myProcNo(), points, Foam::sum(), and Foam::Zero.

Referenced by patchInjectionBase::patchInjectionBase().

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

◆ setPositionAndCell() [1/2]

Foam::label setPositionAndCell ( const fvMesh mesh,
const scalar  fraction01,
Random rnd,
vector position,
label &  cellOwner,
label &  tetFacei,
label &  tetPti 
)

Set the injection position and owner cell, tetFace and tetPt.

Supply the fraction used to determine the location on the patch Returns the seed patch face index

Definition at line 142 of file patchInjectionBase.C.

References polyMesh::boundaryMesh(), primitiveMesh::cellCentres(), polyMeshTetDecomposition::cellTetIndices(), polyMesh::findCellFacePt(), polyMesh::findTetFacePt(), forAll, forAllReverse, UList< T >::last(), Foam::mag(), mesh, processorFaPatch::myProcNo(), points, Random::position(), triangle< Point, PointRef >::randomPoint(), Random::sample01(), UList< T >::size(), fvMesh::V(), and Foam::Zero.

Referenced by PatchFlowRateInjection< CloudType >::setPositionAndCell(), and PatchInjection< CloudType >::setPositionAndCell().

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

◆ setPositionAndCell() [2/2]

Foam::label setPositionAndCell ( const fvMesh mesh,
Random rnd,
vector position,
label &  cellOwner,
label &  tetFacei,
label &  tetPti 
)
virtual

Set the injection position and owner cell, tetFace and tetPt.

Returns the seed patch face index

Reimplemented in PatchFlowRateInjection< CloudType >, and PatchInjection< CloudType >.

Definition at line 266 of file patchInjectionBase.C.

References Random::globalSample01(), and mesh.

Here is the call graph for this function:

◆ whichProc()

Foam::label whichProc ( const scalar  fraction01) const

Return the processor that has the location specified by the fraction.

Definition at line 291 of file patchInjectionBase.C.

References forAllReverse.

Member Data Documentation

◆ patchName_

const word patchName_
protected

Patch name.

Definition at line 71 of file patchInjectionBase.H.

Referenced by patchInjectionBase::patchInjectionBase().

◆ patchId_

const label patchId_
protected

Patch ID.

Definition at line 74 of file patchInjectionBase.H.

Referenced by patchInjectionBase::patchInjectionBase().

◆ patchArea_

scalar patchArea_
protected

Patch area - total across all processors.

Definition at line 77 of file patchInjectionBase.H.

◆ patchNormal_

vectorList patchNormal_
protected

Patch face normal directions.

Definition at line 80 of file patchInjectionBase.H.

◆ cellOwners_

labelList cellOwners_
protected

List of cell labels corresponding to injector positions.

Definition at line 83 of file patchInjectionBase.H.

◆ triFace_

faceList triFace_
protected

Decomposed patch faces as a list of triangles.

Definition at line 86 of file patchInjectionBase.H.

◆ triToFace_

labelList triToFace_
protected

Addressing from per triangle to patch face.

Definition at line 89 of file patchInjectionBase.H.

◆ triCumulativeMagSf_

scalarList triCumulativeMagSf_
protected

Cumulative triangle area per triangle face.

Definition at line 92 of file patchInjectionBase.H.

◆ sumTriMagSf_

scalarList sumTriMagSf_
protected

Cumulative area fractions per processor.

Definition at line 95 of file patchInjectionBase.H.


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