56 class cyclicPolyPatch;
57 class processorPolyPatch;
58 class symmetryPlanePolyPatch;
59 class symmetryPolyPatch;
71 bool operator==(
const particle&,
const particle&);
73 bool operator!=(
const particle&,
const particle&);
86 static const std::size_t sizeofPosition_;
89 static const std::size_t sizeofFields_;
94 template<
class CloudType>
189 const label tetPlaneBasePtI,
191 const label tetFaceI,
203 const label tetPlaneBasePtI,
205 const label tetFaceI,
226 template<
class CloudType>
240 template<
class TrackData>
247 template<
class TrackData>
253 const scalar trackFraction,
258 template<
class TrackData>
263 template<
class TrackData>
272 template<
class TrackData>
276 template<
class TrackData>
280 template<
class TrackData>
290 template<
class TrackData>
294 template<
class TrackData>
304 template<
class TrackData>
341 const label tetFaceI,
352 bool doCellFacePt =
true 512 template<
class TrackData>
521 template<
class TrackData>
548 template<
class TrackData>
553 template<
class TrackData>
560 template<
class CloudType>
564 template<
class CloudType>
void hitCyclicPatch(const cyclicPolyPatch &, TrackData &td)
Overridable function to handle the particle hitting a cyclicPatch.
scalar currentTime() const
Return the particle current time.
void hitProcessorPatch(const processorPolyPatch &, TrackData &td)
Overridable function to handle the particle hitting a.
label & cell()
Return current cell particle is in.
Cyclic patch for Arbitrary Mesh Interface (AMI)
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
label & face()
Return current face particle is on otherwise -1.
Wedge front and back plane patch.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
virtual scalar wallImpactDistance(const vector &n) const
The nearest distance to a wall that.
#define DefinePropertyList(str)
static const scalar lambdaDistanceToleranceCoeff
Fraction of the cell volume to use in determining tolerance values.
Symmetry patch for non-planar or multi-plane patches.
bool keepParticle
Flag to indicate whether to keep particle (false = delete)
label getNewParticleID() const
Get unique particle creation id.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
label origId() const
Return const access to the particle id on originating processor.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static const scalar minStepFractionTol
Minimum stepFraction tolerance.
static label particleCount_
Cumulative particle counter - used to provode unique ID.
void hitWedgePatch(const wedgePolyPatch &, TrackData &td)
Overridable function to handle the particle hitting a wedgePatch.
A 1D vector of objects of type <T> with a fixed size <Size>.
label patchFace(const label patchI, const label faceI) const
Which face of this patch is this particle on.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
Intrusive doubly-linked list.
virtual ~particle()
Destructor.
A patch is a list of labels that address the faces in the global face list.
label origId_
Local particle id on originating processor.
void findTris(const vector &position, DynamicList< label > &faceList, const tetPointRef &tet, const FixedList< vector, 4 > &tetAreas, const FixedList< label, 4 > &tetPlaneBasePtIs, const scalar tol) const
Find the tet tri faces between position and tet centre.
label tetFaceI_
Index of the face that owns the decomposed tet that the.
static void readFields(CloudType &c)
Read the fields associated with the owner cloud.
void hitFace(TrackData &td)
Overridable function to handle the particle hitting a face.
const double e
Elementary charge.
Neighbour processor patch.
static const scalar trackingCorrectionTol
Fraction of distance to tet centre to move a particle to.
static void writeFields(const CloudType &c)
Write the fields associated with the owner cloud.
vector normal() const
Return the normal of the tri on tetFaceI_ for the.
const vector & position() const
Return current particle position.
virtual autoPtr< particle > clone() const
Construct a clone.
tetPointRef currentTet() const
Return the geometry of the current tet that the.
vector oldNormal() const
Return the normal of the tri on tetFaceI_ for the.
label cellI_
Index of the cell it is in.
bool operator!=(const particle &, const particle &)
void hitWallFaces(const CloudType &td, const vector &from, const vector &to, scalar &lambdaMin, tetIndices &closestTetIs)
scalar tetLambda(const vector &from, const vector &to, const label triI, const vector &tetArea, const label tetPlaneBasePtI, const label cellI, const label tetFaceI, const label tetPtI, const scalar tol) const
Find the lambda value for the line to-from across the.
label faceInterpolation() const
Return the index of the face to be used in the interpolation.
friend bool operator!=(const particle &pA, const particle &pB)
void hitCyclicAMIPatch(const cyclicAMIPolyPatch &, TrackData &td, const vector &direction)
Overridable function to handle the particle hitting a cyclicAMIPatch.
const polyMesh & mesh_
Reference to the polyMesh database.
scalar stepFraction_
Fraction of time-step completed.
const polyMesh & mesh() const
Return the mesh database.
void prepareForParallelTransfer(const label patchI, TrackData &td)
Convert global addressing to the processor patch.
A cloud is a collection of lagrangian particles.
label & tetFace()
Return current tet face particle is in.
label origProc() const
Return const access to the originating processor id.
scalar trackToFace(const vector &endPosition, TrackData &td)
Track particle to a given position and returns 1.0 if the.
CloudType & cloud()
Return a reference to the cloud.
bool softImpact() const
Return the impact model to be used, soft or hard (default).
bool onBoundary() const
Is the particle on the boundary/(or outside the domain)?
Factory class to read-construct particles used for.
label & tetPt()
Return current tet face particle is in.
scalar & stepFraction()
Return the fraction of time-step completed.
label track(const vector &endPosition, TrackData &td)
Track particle to end of trajectory.
Mesh consisting of general polyhedral cells.
friend bool operator==(const particle &pA, const particle &pB)
void hitWallPatch(const wallPolyPatch &, TrackData &td, const tetIndices &tetIs)
Overridable function to handle the particle hitting a wallPatch.
bool switchProcessor
Flag to switch processor.
label patch(const label faceI) const
Which patch is particle on.
particle(const polyMesh &mesh, const vector &position, const label cellI, const label tetFaceI, const label tetPtI)
Construct from components.
void hitSymmetryPatch(const symmetryPolyPatch &, TrackData &td)
Overridable function to handle the particle hitting a.
void hitSymmetryPlanePatch(const symmetryPlanePolyPatch &, TrackData &td)
Overridable function to handle the particle hitting a.
void correctAfterParallelTransfer(const label patchI, TrackData &td)
Convert processor patch addressing to the global equivalents.
bool boundaryFace(const label faceI) const
Is this global face a boundary face?
const dimensionedScalar c
Speed of light in a vacuum.
void crossEdgeConnectedFace(const label &cellI, label &tetFaceI, label &tetPtI, const edge &e)
Cross the from the given face across the given edge of the.
Templated base class for dsmc cloud.
bool internalFace(const label faceI) const
Is this global face an internal face?
TypeName("particle")
Runtime type information.
TrackingData(CloudType &cloud)
scalar movingTetLambda(const vector &from, const vector &to, const label triI, const vector &tetArea, const label tetPlaneBasePtI, const label cellI, const label tetFaceI, const label tetPtI, const scalar tol) const
Find the lambda value for a moving tri face.
label tetPtI_
Index of the point on the face that defines the decomposed.
This function object reads fields from the time directories and adds them to the mesh database for fu...
friend Ostream & operator<<(Ostream &, const particle &)
void initCellFacePt()
Check the stored cell value (setting if necessary) and.
label origProc_
Originating processor id.
Storage and named access for the indices of a tet which is part of the decomposition of a cell...
virtual void transformProperties(const tensor &T)
Transform the physical properties of the particle.
void tetNeighbour(label triI)
Modify the tet owner data by crossing triI.
tetIndices currentTetIndices() const
Return the indices of the current tet that the.
label faceI_
Face index if the particle is on a face otherwise -1.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
bool hitPatch(const polyPatch &, TrackData &td, const label patchI, const scalar trackFraction, const tetIndices &tetIs)
Overridable function to handle the particle hitting a.
vector position_
Position of particle.
Macros for adding to particle property lists.
void writePosition(Ostream &) const
Write the particle position and cell.