Go to the documentation of this file.
60 class cyclicPolyPatch;
61 class cyclicAMIPolyPatch;
62 class cyclicACMIPolyPatch;
63 class processorPolyPatch;
64 class symmetryPlanePolyPatch;
65 class symmetryPolyPatch;
69 Ostream&
operator<<(Ostream&,
const particle&);
70 bool operator==(
const particle&,
const particle&);
71 bool operator!=(
const particle&,
const particle&);
84 static const std::size_t sizeofPosition;
87 static const std::size_t sizeofFields;
91 static const label maxNBehind_;
110 template <
class TrackCloudType>
156 scalar stepFraction_;
182 inline void stationaryTetGeometry
204 void stationaryTetReverseTransform
214 inline void movingTetGeometry
216 const scalar endStepFraction,
229 const scalar endStepFraction
238 void movingTetReverseTransform
240 const scalar endStepFraction,
265 void changeTet(
const label tetTriI);
268 void changeFace(
const label tetTriI);
278 void changeToMasterPatch();
289 const bool boundaryFail,
290 const string& boundaryMsg
300 template<
class TrackCloudType>
304 template<
class TrackCloudType>
309 template<
class TrackCloudType>
313 template<
class TrackCloudType>
317 template<
class TrackCloudType>
321 template<
class TrackCloudType>
326 template<
class TrackCloudType>
330 template<
class TrackCloudType>
334 template<
class TrackCloudType>
348 "(coordinatesa coordinatesb coordinatesc coordinatesd) "
349 "celli tetFacei tetPti facei stepFraction origProc origId"
372 const label tetFacei,
382 const label celli = -1
391 const label tetFacei,
393 const bool doLocate =
true
403 bool newFormat =
true
455 inline label
cell()
const;
458 inline label&
cell();
467 inline label
tetPt()
const;
470 inline label&
tetPt();
473 inline label
face()
const;
476 inline label&
face();
491 inline label
origId()
const;
521 inline bool onFace()
const;
530 inline label
patch()
const;
550 const vector& displacement,
551 const scalar fraction
557 const vector& displacement,
558 const scalar fraction
566 const vector& displacement,
567 const scalar fraction,
574 const vector& displacement,
575 const scalar fraction,
582 const vector& displacement,
583 const scalar fraction,
590 template<
class TrackCloudType>
594 TrackCloudType&
cloud,
599 template<
class TrackCloudType>
603 const scalar fraction,
604 TrackCloudType&
cloud,
662 const label procCell,
663 const label procTetFace
715 template<
class TrackCloudType>
719 template<
class TrackCloudType>
732 template<
class CloudType>
737 template<
class CloudType>
virtual ~particle()=default
Destructor.
void hitProcessorPatch(TrackCloudType &, trackingData &)
Overridable function to handle the particle hitting a processorPatch.
static autoPtr< T > New(Args &&... args)
Construct autoPtr of T with forwarding arguments.
void prepareForParallelTransfer()
Convert global addressing to the processor patch local equivalents.
void reset()
Reset particle data.
void hitCyclicAMIPatch(TrackCloudType &, trackingData &, const vector &)
Overridable function to handle the particle hitting a cyclicAMIPatch.
void writeCoordinates(Ostream &os) const
Write the particle barycentric coordinates and cell info.
void correctAfterInteractionListReferral(const label celli)
Correct the topology after referral. The particle may still be.
A class for handling words, derived from Foam::string.
void hitCyclicPatch(TrackCloudType &, trackingData &)
Overridable function to handle the particle hitting a cyclicPatch.
trackingData(const TrackCloudType &cloud)
bool onFace() const
Is the particle on a face?
Factory class to read-construct particles (for parallel transfer)
label origId() const
Return the particle ID on the originating processor.
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
scalar stepFraction() const
Return the fraction of time-step completed.
void autoMap(const vector &position, const mapPolyMesh &mapper)
Map after a topology change.
scalar trackToMovingTri(const vector &displacement, const scalar fraction, label &tetTriI)
As particle::trackToTri, but for moving meshes.
void hitWedgePatch(TrackCloudType &, trackingData &)
Overridable function to handle the particle hitting a wedgePatch.
label tetFace() const
Return current tet face particle is in.
label getNewParticleID() const
Get unique particle creation id.
static void readObjects(CloudType &c, const objectRegistry &obr)
Read particle fields as objects from the obr registry.
static void readFields(TrackCloudType &c)
Read the fields associated with the owner cloud.
static void writeFields(const TrackCloudType &c)
Write the fields associated with the owner cloud.
tetIndices currentTetIndices() const
Return the indices of the current tet that the.
void relocate(const point &position, const label celli=-1)
Set the addressing based on the provided position.
friend bool operator==(const particle &pA, const particle &pB)
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
static label particleCount_
Cumulative particle counter - used to provide unique ID.
bool onInternalFace() const
Is the particle on an internal face?
Mesh consisting of general polyhedral cells.
static bool writeLagrangianPositions
void writeProperties(Ostream &os, const wordRes &filters, const word &delim, const bool namesOnly) const
Write individual particle properties to stream.
Registry of regIOobjects.
static void writeObjects(const CloudType &c, objectRegistry &obr)
Write particle fields as objects into the obr registry.
const barycentric & coordinates() const
Return current particle coordinates.
scalar track(const vector &displacement, const scalar fraction)
Track along the displacement for a given fraction of the overall.
bool operator!=(const eddy &a, const eddy &b)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Macros for adding to particle property lists.
bool hitPatch(TrackCloudType &, trackingData &)
Overridable function to handle the particle hitting a patch.
void trackToAndHitFace(const vector &direction, const scalar fraction, TrackCloudType &cloud, trackingData &td)
Convenience function. Combines trackToFace and hitFace.
scalar trackToStationaryTri(const vector &displacement, const scalar fraction, label &tetTriI)
As particle::trackToTri, but for stationary meshes.
Generic templated field type.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
virtual void writePosition(Ostream &os) const
Write the particle position and cell id.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void hitCyclicACMIPatch(TrackCloudType &, trackingData &, const vector &)
Overridable function to handle the particle hitting a.
vector position() const
Return current particle position.
bool keepParticle
Flag to indicate whether to keep particle (false = delete)
bool switchProcessor
Flag to switch processor.
label patch() const
Return the index of patch that the particle is on.
const polyMesh & mesh() const
Return the mesh database.
vector deviationFromMeshCentre() const
Get the displacement from the mesh centre. Used to correct the.
Templated base class for dsmc cloud.
scalar currentTimeFraction() const
Return the current fraction within the timestep. This differs.
virtual autoPtr< particle > clone() const
Construct a clone.
autoPtr< particle > operator()(Istream &is) const
Template class for intrusive linked lists.
label origProc() const
Return the originating processor ID.
void correctAfterParallelTransfer(const label patchi, trackingData &td)
Convert processor patch addressing to the global equivalents.
label procTetPt(const polyMesh &procMesh, const label procCell, const label procTetFace) const
Return the tet point appropriate for decomposition or reconstruction.
OBJstream os(runTime.globalPath()/outputName)
scalar trackToFace(const vector &displacement, const scalar fraction)
As particle::track, but also stops on internal faces.
bool onBoundaryFace() const
Is the particle on a boundary face?
friend bool operator!=(const particle &pA, const particle &pB)
static bool writeLagrangianCoordinates
Storage and named access for the indices of a tet which is part of the decomposition of a cell.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A cloud is a registry collection of lagrangian particles.
Old particle positions content for OpenFOAM-1706 and earlier.
static void writeProperty(Ostream &os, const word &name, const Type &value, const bool nameOnly, const word &delim, const wordRes &filters=wordRes::null())
scalar trackToTri(const vector &displacement, const scalar fraction, label &tetTriI)
As particle::trackToFace, but also stops on tet triangles. On.
#define DefinePropertyList(str)
Define a static 'propertyList' for particle properties.
An ordered pair of two objects of type <T> with first() and second() elements.
virtual void transformProperties(const tensor &T)
Transform the physical properties of the particle.
A 1D vector of objects of type <T> with a fixed length <N>.
void hitSymmetryPatch(TrackCloudType &, trackingData &)
Overridable function to handle the particle hitting a symmetryPatch.
A List of wordRe with additional matching capabilities.
void prepareForInteractionListReferral(const vectorTensorTransform &transform)
Break the topology and store the particle position so that the.
Pair< scalar > stepFractionSpan() const
Return the step fraction change within the overall time-step.
Templated 4x3 tensor derived from VectorSpace. Has 12 components. Can represent a barycentric transfo...
friend Ostream & operator<<(Ostream &, const particle &)
void hitWallPatch(TrackCloudType &, trackingData &)
Overridable function to handle the particle hitting a wallPatch.
void hitSymmetryPlanePatch(TrackCloudType &, trackingData &)
Overridable function to handle the particle hitting a.
label tetPt() const
Return current tet face particle is in.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
const dimensionedScalar c
Speed of light in a vacuum.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
static void writePropertyName(Ostream &os, const word &name, const word &delim)
Write the name representation to stream.
vector normal() const
The (unit) normal of the tri on tetFacei_ for the current tet.
label cell() const
Return current cell particle is in.
static const wordRes & null()
Return a null wordRes - a reference to the NullObject.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
void hitFace(const vector &direction, TrackCloudType &cloud, trackingData &td)
Hit the current face. If the current face is internal than this.
TypeName("particle")
Runtime type information.
iNew(const polyMesh &mesh)
label face() const
Return current face particle is on otherwise -1.
particle(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti)
Construct from components.
Intrusive doubly-linked list.
void patchData(vector &n, vector &U) const
Get the normal and velocity of the current patch location.
barycentricTensor currentTetTransform() const
Return the current tet transformation tensor.