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;
97 static const scalar negativeSpaceDisplacementFactor;
116 template <
class TrackCloudType>
162 scalar stepFraction_;
176 inline void stationaryTetGeometry
198 void stationaryTetReverseTransform
208 inline void movingTetGeometry
210 const scalar endStepFraction,
223 const scalar endStepFraction
232 void movingTetReverseTransform
234 const scalar endStepFraction,
259 void changeTet(
const label tetTriI);
262 void changeFace(
const label tetTriI);
272 void changeToMasterPatch();
283 const bool boundaryFail,
284 const string& boundaryMsg
294 template<
class TrackCloudType>
298 template<
class TrackCloudType>
303 template<
class TrackCloudType>
307 template<
class TrackCloudType>
311 template<
class TrackCloudType>
315 template<
class TrackCloudType>
320 template<
class TrackCloudType>
324 template<
class TrackCloudType>
328 template<
class TrackCloudType>
342 "(coordinatesa coordinatesb coordinatesc coordinatesd) "
343 "celli tetFacei tetPti facei stepFraction origProc origId"
366 const label tetFacei,
376 const label celli = -1
385 const label tetFacei,
387 const bool doLocate =
true
397 bool newFormat =
true
449 inline label
cell()
const;
452 inline label&
cell();
461 inline label
tetPt()
const;
464 inline label&
tetPt();
467 inline label
face()
const;
470 inline label&
face();
485 inline label
origId()
const;
515 inline bool onFace()
const;
524 inline label
patch()
const;
541 const vector& displacement,
542 const scalar fraction
548 const vector& displacement,
549 const scalar fraction
557 const vector& displacement,
558 const scalar fraction,
565 const vector& displacement,
566 const scalar fraction,
573 const vector& displacement,
574 const scalar fraction,
581 template<
class TrackCloudType>
585 TrackCloudType&
cloud,
590 template<
class TrackCloudType>
594 const scalar fraction,
595 TrackCloudType&
cloud,
653 const label procCell,
654 const label procTetFace
705 template<
class TrackCloudType>
709 template<
class TrackCloudType>
722 template<
class CloudType>
727 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 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)....
word name(const complex &c)
Return string representation of complex.
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.
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.
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.