Loading...
Searching...
No Matches
patchInjectionBase Class Reference

#include <patchInjectionBase.H>

Inheritance diagram for patchInjectionBase:
Collaboration diagram for patchInjectionBase:

Public Member Functions

 patchInjectionBase (const polyMesh &mesh, const word &patchName)
 Construct from mesh and patch name.
 patchInjectionBase (const patchInjectionBase &pib)
 Copy constructor.
virtual ~patchInjectionBase ()=default
 Destructor.
virtual void updateMesh (const polyMesh &mesh)
 Update patch geometry and derived info for injection locations.
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.
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.
label whichProc (const scalar fraction01) const
 Return the processor that has the location specified by the fraction.

Protected Attributes

const word patchName_
 Patch name.
const label patchId_
 Patch ID.
scalar patchArea_
 Patch area - total across all processors.
vectorList patchNormal_
 Patch face normal directions.
labelList cellOwners_
 List of cell labels corresponding to injector positions.
List< labelledTritriFace_
 The polyPatch faces as triangles, the index of each corresponds to the undecomposed patch face index.
scalarList triCumulativeMagSf_
 Cumulative triangle area per triangle face (processor-local).
scalarList sumTriMagSf_
 Cumulative area fractions per processor.

Detailed Description

Definition at line 62 of file patchInjectionBase.H.

Constructor & Destructor Documentation

◆ patchInjectionBase() [1/2]

◆ patchInjectionBase() [2/2]

patchInjectionBase ( const patchInjectionBase & pib)

Copy constructor.

Definition at line 59 of file patchInjectionBase.C.

References cellOwners_, patchArea_, patchId_, patchInjectionBase(), patchName_, patchNormal_, sumTriMagSf_, triCumulativeMagSf_, and triFace_.

Here is the call graph for this function:

◆ ~patchInjectionBase()

virtual ~patchInjectionBase ( )
virtualdefault

Destructor.

References mesh.

Member Function Documentation

◆ updateMesh()

◆ 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 154 of file patchInjectionBase.C.

References mesh.

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

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 268 of file patchInjectionBase.C.

References Random::globalSample01(), mesh, and setPositionAndCell().

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 293 of file patchInjectionBase.C.

References forAllReverse, patchArea_, and sumTriMagSf_.

Referenced by PatchFlowRateInjection< CloudType >::setPositionAndCell().

Here is the caller graph for this function:

Member Data Documentation

◆ patchName_

const word patchName_
protected

Patch name.

Definition at line 71 of file patchInjectionBase.H.

Referenced by patchInjectionBase(), and patchInjectionBase().

◆ patchId_

◆ patchArea_

scalar patchArea_
protected

Patch area - total across all processors.

Definition at line 81 of file patchInjectionBase.H.

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

◆ patchNormal_

vectorList patchNormal_
protected

Patch face normal directions.

Definition at line 86 of file patchInjectionBase.H.

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

◆ cellOwners_

labelList cellOwners_
protected

List of cell labels corresponding to injector positions.

Definition at line 91 of file patchInjectionBase.H.

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

◆ triFace_

List<labelledTri> triFace_
protected

The polyPatch faces as triangles, the index of each corresponds to the undecomposed patch face index.

Definition at line 97 of file patchInjectionBase.H.

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

◆ triCumulativeMagSf_

scalarList triCumulativeMagSf_
protected

Cumulative triangle area per triangle face (processor-local).

Definition at line 102 of file patchInjectionBase.H.

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

◆ sumTriMagSf_

scalarList sumTriMagSf_
protected

Cumulative area fractions per processor.

Definition at line 107 of file patchInjectionBase.H.

Referenced by patchInjectionBase(), patchInjectionBase(), PatchFlowRateInjection< CloudType >::setPositionAndCell(), updateMesh(), and whichProc().


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