#include <patchInjectionBase.H>


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< labelledTri > | triFace_ |
| 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. | |
Definition at line 62 of file patchInjectionBase.H.
Construct from mesh and patch name.
Definition at line 32 of file patchInjectionBase.C.
References cellOwners_, Foam::exit(), Foam::FatalError, FatalErrorInFunction, mesh, Foam::nl, patchArea_, patchId_, patchName_, patchNormal_, sumTriMagSf_, triCumulativeMagSf_, triFace_, and updateMesh().
Referenced by PatchFlowRateInjection< CloudType >::PatchFlowRateInjection(), PatchFlowRateInjection< CloudType >::PatchFlowRateInjection(), PatchInjection< CloudType >::PatchInjection(), PatchInjection< CloudType >::PatchInjection(), and patchInjectionBase().


| 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_.

|
virtualdefault |
Destructor.
References mesh.
|
virtual |
Update patch geometry and derived info for injection locations.
Reimplemented in PatchFlowRateInjection< CloudType >, and PatchInjection< CloudType >.
Definition at line 74 of file patchInjectionBase.C.
References cellOwners_, DynamicList< T, SizeMin >::clear(), DynamicList< T, SizeMin >::emplace_back(), f(), forAll, mesh, UPstream::myProcNo(), UPstream::nProcs(), patchId_, points, sumTriMagSf_, triCumulativeMagSf_, and triFace_.
Referenced by PatchFlowRateInjection< CloudType >::PatchFlowRateInjection(), PatchInjection< CloudType >::PatchInjection(), patchInjectionBase(), PatchFlowRateInjection< CloudType >::updateMesh(), PatchInjection< CloudType >::updateMesh(), and PatchInjection< CloudType >::~PatchInjection().


| 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().

|
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().

| 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().

|
protected |
Patch name.
Definition at line 71 of file patchInjectionBase.H.
Referenced by patchInjectionBase(), and patchInjectionBase().
|
protected |
Patch ID.
Definition at line 76 of file patchInjectionBase.H.
Referenced by PatchFlowRateInjection< CloudType >::flowRate(), patchInjectionBase(), patchInjectionBase(), PatchFlowRateInjection< CloudType >::setPositionAndCell(), PatchInjection< CloudType >::setProperties(), and updateMesh().
|
protected |
Patch area - total across all processors.
Definition at line 81 of file patchInjectionBase.H.
Referenced by patchInjectionBase(), patchInjectionBase(), PatchFlowRateInjection< CloudType >::setPositionAndCell(), and whichProc().
|
protected |
Patch face normal directions.
Definition at line 86 of file patchInjectionBase.H.
Referenced by patchInjectionBase(), patchInjectionBase(), and PatchFlowRateInjection< CloudType >::setPositionAndCell().
|
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().
|
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().
|
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().
|
protected |
Cumulative area fractions per processor.
Definition at line 107 of file patchInjectionBase.H.
Referenced by patchInjectionBase(), patchInjectionBase(), PatchFlowRateInjection< CloudType >::setPositionAndCell(), updateMesh(), and whichProc().