particle Class Reference

Base particle class. More...

Inheritance diagram for particle:
Collaboration diagram for particle:

Classes

class  iNew
 Factory class to read-construct particles used for. More...
 
class  trackingData
 

Public Member Functions

 TypeName ("particle")
 Runtime type information. More...
 
 particle (const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti)
 Construct from components. More...
 
 particle (const polyMesh &mesh, const vector &position, const label celli)
 Construct from a position and a cell, searching for the rest of the. More...
 
 particle (const polyMesh &mesh, Istream &, bool readFields=true)
 Construct from Istream. More...
 
 particle (const particle &p)
 Construct as a copy. More...
 
 particle (const particle &p, const polyMesh &mesh)
 Construct as a copy with references to a new mesh. More...
 
virtual autoPtr< particleclone () const
 Construct a clone. More...
 
virtual ~particle ()
 Destructor. More...
 
label getNewParticleID () const
 Get unique particle creation id. More...
 
const polyMeshmesh () const
 Return the mesh database. More...
 
const barycentriccoordinates () const
 Return current particle coordinates. More...
 
label cell () const
 Return current cell particle is in. More...
 
label tetFace () const
 Return current tet face particle is in. More...
 
label tetPt () const
 Return current tet face particle is in. More...
 
label face () const
 Return current face particle is on otherwise -1. More...
 
scalar stepFraction () const
 Return the fraction of time-step completed. More...
 
scalar & stepFraction ()
 Return the fraction of time-step completed. More...
 
label origProc () const
 Return the originating processor ID. More...
 
labelorigProc ()
 Return the originating processor ID. More...
 
label origId () const
 Return the particle ID on the originating processor. More...
 
labelorigId ()
 Return the particle ID on the originating processor. More...
 
Pair< scalar > stepFractionSpan () const
 Return the step fraction change within the overall time-step. More...
 
scalar currentTimeFraction () const
 Return the current fraction within the timestep. This differs. More...
 
tetIndices currentTetIndices () const
 Return the indices of the current tet that the. More...
 
barycentricTensor currentTetTransform () const
 Return the current tet transformation tensor. More...
 
vector normal () const
 Return the normal of the tri on tetFacei_ for the. More...
 
bool onFace () const
 Is the particle on a face? More...
 
bool onInternalFace () const
 Is the particle on an internal face? More...
 
bool onBoundaryFace () const
 Is the particle on a boundary face? More...
 
label patch () const
 Return the index of patch that the particle is on. More...
 
vector position () const
 Return current particle position. More...
 
void reset (const scalar stepFraction)
 Set the step fraction and clear the behind data in preparation for. More...
 
scalar track (const vector &displacement, const scalar fraction)
 Track along the displacement for a given fraction of the overall. More...
 
scalar trackToCell (const vector &displacement, const scalar fraction)
 As particle::track, but stops when a new cell is reached. More...
 
scalar trackToFace (const vector &displacement, const scalar fraction)
 As particle::track, but stops when a face is hit. More...
 
scalar trackToTri (const vector &displacement, const scalar fraction, label &tetTriI)
 As particle::trackToFace, but stops when a tet triangle is hit. On. More...
 
scalar trackToStationaryTri (const vector &displacement, const scalar fraction, label &tetTriI)
 As particle::trackToTri, but for stationary meshes. More...
 
scalar trackToMovingTri (const vector &displacement, const scalar fraction, label &tetTriI)
 As particle::trackToTri, but for moving meshes. More...
 
template<class TrackCloudType >
void hitFace (const vector &displacement, const scalar fraction, TrackCloudType &cloud, trackingData &td)
 Hit the current face. If the current face is internal than this. More...
 
template<class TrackCloudType >
scalar trackToAndHitFace (const vector &displacement, const scalar fraction, TrackCloudType &cloud, trackingData &td)
 Convenience function. Combines trackToFace and hitFace. More...
 
vector deviationFromMeshCentre () const
 Get the displacement from the mesh centre. Used to correct the. More...
 
void patchData (vector &normal, vector &displacement) const
 Get the normal and displacement of the current patch location. More...
 
virtual void transformProperties (const transformer &)
 Transform the physical properties of the particle. More...
 
void prepareForParallelTransfer (trackingData &td)
 Make changes prior to a parallel transfer. Runs either processor or. More...
 
void correctAfterParallelTransfer (trackingData &td)
 Make changes following a parallel transfer. Runs either processor. More...
 
void prepareForProcessorTransfer (trackingData &td)
 Make changes prior to a transfer across a processor boundary. More...
 
void correctAfterProcessorTransfer (trackingData &td)
 Make changes following a transfer across a processor boundary. More...
 
void prepareForNonConformalCyclicTransfer (const label sendToPatch, const label sendToPatchFace)
 Make changes prior to a transfer across a non conformal cyclic. More...
 
void correctAfterNonConformalCyclicTransfer (const label sendToPatch)
 Make changes following a transfer across a non conformal cyclic. More...
 
void prepareForInteractionListReferral (const transformer &transform)
 Break the topology and store the cartesian position so that the. More...
 
void correctAfterInteractionListReferral (const label celli)
 Correct the topology after referral. Locates the particle relative. More...
 
label procTetPt (const polyMesh &procMesh, const label procCell, const label procTetFace) const
 Return the tet point appropriate for decomposition or reconstruction. More...
 
void autoMap (const vector &position, const polyTopoChangeMap &mapper)
 Map after a topology change. More...
 
void writePosition (Ostream &) const
 Write the particle position and cell. More...
 
template<class TrackCloudType >
Foam::scalar trackToAndHitFace (const vector &displacement, const scalar fraction, TrackCloudType &cloud, trackingData &td)
 

Static Public Member Functions

static string propertyList ()
 
template<class TrackCloudType >
static void readFields (TrackCloudType &c)
 Read the fields associated with the owner cloud. More...
 
template<class TrackCloudType >
static void writeFields (const TrackCloudType &c)
 Write the fields associated with the owner cloud. More...
 

Static Public Attributes

static string propertyList_ = Foam::particle::propertyList()
 String representation of properties. More...
 
static label particleCount_ = 0
 Cumulative particle counter - used to provide unique ID. More...
 

Protected Member Functions

template<class TrackCloudType >
bool hitPatch (TrackCloudType &, trackingData &)
 Overridable function to handle the particle hitting a patch. More...
 
template<class TrackCloudType >
void hitWedgePatch (TrackCloudType &, trackingData &)
 Overridable function to handle the particle hitting a wedgePatch. More...
 
template<class TrackCloudType >
void hitSymmetryPlanePatch (TrackCloudType &, trackingData &)
 Overridable function to handle the particle hitting a. More...
 
template<class TrackCloudType >
void hitSymmetryPatch (TrackCloudType &, trackingData &)
 Overridable function to handle the particle hitting a symmetryPatch. More...
 
template<class TrackCloudType >
void hitCyclicPatch (TrackCloudType &, trackingData &)
 Overridable function to handle the particle hitting a cyclicPatch. More...
 
template<class TrackCloudType >
void hitCyclicAMIPatch (const vector &displacement, const scalar fraction, TrackCloudType &cloud, trackingData &td)
 Overridable function to handle the particle hitting a cyclicAMIPatch. More...
 
template<class TrackCloudType >
bool hitNonConformalCyclicPatch (const vector &displacement, const scalar fraction, const label patchi, TrackCloudType &cloud, trackingData &td)
 Overridable function to handle the particle hitting an. More...
 
template<class TrackCloudType >
void hitProcessorPatch (TrackCloudType &, trackingData &)
 Overridable function to handle the particle hitting a processorPatch. More...
 
template<class TrackCloudType >
void hitWallPatch (TrackCloudType &, trackingData &)
 Overridable function to handle the particle hitting a wallPatch. More...
 

Friends

Ostreamoperator<< (Ostream &, const particle &)
 
bool operator== (const particle &pA, const particle &pB)
 
bool operator!= (const particle &pA, const particle &pB)
 

Detailed Description

Base particle class.

Definition at line 81 of file particle.H.

Constructor & Destructor Documentation

◆ particle() [1/5]

particle ( const polyMesh mesh,
const barycentric coordinates,
const label  celli,
const label  tetFacei,
const label  tetPti 
)

Construct from components.

Definition at line 474 of file particle.C.

Referenced by particle::clone(), and particle::iNew::operator()().

Here is the caller graph for this function:

◆ particle() [2/5]

particle ( const polyMesh mesh,
const vector position,
const label  celli 
)

Construct from a position and a cell, searching for the rest of the.

required topology

Definition at line 497 of file particle.C.

◆ particle() [3/5]

particle ( const polyMesh mesh,
Istream is,
bool  readFields = true 
)

Construct from Istream.

Definition at line 46 of file particleIO.C.

References IOstream::ASCII, IOstream::check(), IOstream::format(), and Istream::read().

Here is the call graph for this function:

◆ particle() [4/5]

particle ( const particle p)

Construct as a copy.

Definition at line 525 of file particle.C.

◆ particle() [5/5]

particle ( const particle p,
const polyMesh mesh 
)

Construct as a copy with references to a new mesh.

Definition at line 541 of file particle.C.

References particle::track().

Here is the call graph for this function:

◆ ~particle()

virtual ~particle ( )
inlinevirtual

Destructor.

Definition at line 437 of file particle.H.

References particle::autoMap(), Foam::constant::universal::c, particle::cell(), particle::coordinates(), particle::correctAfterInteractionListReferral(), particle::correctAfterNonConformalCyclicTransfer(), particle::correctAfterParallelTransfer(), particle::correctAfterProcessorTransfer(), particle::currentTetIndices(), particle::currentTetTransform(), particle::currentTimeFraction(), particle::deviationFromMeshCentre(), particle::face(), particle::getNewParticleID(), particle::hitFace(), particle::mesh(), particle::normal(), particle::onBoundaryFace(), particle::onFace(), particle::onInternalFace(), particle::operator!=, particle::operator<<, particle::operator==, particle::origId(), particle::origProc(), particle::patch(), particle::patchData(), particle::position(), particle::prepareForInteractionListReferral(), particle::prepareForNonConformalCyclicTransfer(), particle::prepareForParallelTransfer(), particle::prepareForProcessorTransfer(), particle::procTetPt(), particle::readFields(), particle::reset(), particle::trackingData::sendToPatch, particle::trackingData::sendToPatchFace, particle::stepFraction(), particle::stepFractionSpan(), particle::tetFace(), particle::tetPt(), particle::track(), particle::trackToAndHitFace(), particle::trackToCell(), particle::trackToFace(), particle::trackToMovingTri(), particle::trackToStationaryTri(), particle::trackToTri(), Foam::transform(), particle::transformProperties(), particle::writeFields(), and particle::writePosition().

Here is the call graph for this function:

Member Function Documentation

◆ hitPatch()

bool hitPatch ( TrackCloudType &  ,
trackingData  
)
protected

Overridable function to handle the particle hitting a patch.

Executed before other patch-hitting functions.

Definition at line 217 of file particleTemplates.C.

Referenced by particle::trackingData::trackingData().

Here is the caller graph for this function:

◆ hitWedgePatch()

void hitWedgePatch ( TrackCloudType &  cloud,
trackingData td 
)
protected

Overridable function to handle the particle hitting a wedgePatch.

Definition at line 224 of file particleTemplates.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, particle::hitSymmetryPatch(), and particle::hitSymmetryPlanePatch().

Referenced by particle::trackingData::trackingData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hitSymmetryPlanePatch()

void hitSymmetryPlanePatch ( TrackCloudType &  cloud,
trackingData td 
)
protected

Overridable function to handle the particle hitting a.

symmetryPlanePatch

Definition at line 236 of file particleTemplates.C.

References particle::hitSymmetryPatch().

Referenced by particle::hitWedgePatch(), and particle::trackingData::trackingData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hitSymmetryPatch()

void hitSymmetryPatch ( TrackCloudType &  ,
trackingData  
)
protected

Overridable function to handle the particle hitting a symmetryPatch.

Definition at line 246 of file particleTemplates.C.

References Foam::I, particle::normal(), transformer::rotation(), and particle::transformProperties().

Referenced by particle::hitSymmetryPlanePatch(), particle::hitWedgePatch(), and particle::trackingData::trackingData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hitCyclicPatch()

void hitCyclicPatch ( TrackCloudType &  ,
trackingData  
)
protected

◆ hitCyclicAMIPatch()

◆ hitNonConformalCyclicPatch()

◆ hitProcessorPatch()

void hitProcessorPatch ( TrackCloudType &  cloud,
trackingData td 
)
protected

Overridable function to handle the particle hitting a processorPatch.

Definition at line 455 of file particleTemplates.C.

References polyMesh::boundaryMesh(), particle::face(), particle::mesh(), particle::patch(), particle::trackingData::sendFromPatch, particle::trackingData::sendToPatch, particle::trackingData::sendToPatchFace, and particle::trackingData::sendToProc.

Referenced by streamlinesParticle::hitProcessorPatch(), and particle::trackingData::trackingData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hitWallPatch()

void hitWallPatch ( TrackCloudType &  ,
trackingData  
)
protected

Overridable function to handle the particle hitting a wallPatch.

Definition at line 465 of file particleTemplates.C.

Referenced by particle::trackingData::trackingData().

Here is the caller graph for this function:

◆ TypeName()

TypeName ( "particle"  )

Runtime type information.

Referenced by particle::trackingData::trackingData().

Here is the caller graph for this function:

◆ propertyList()

static string propertyList ( )
inlinestatic

Definition at line 374 of file particle.H.

◆ clone()

virtual autoPtr<particle> clone ( ) const
inlinevirtual

Construct a clone.

Reimplemented in molecule, streamlinesParticle, sampledSetParticle, trackedParticle, solidParticle, findCellParticle, passiveParticle, and indexedParticle.

Definition at line 411 of file particle.H.

References particle::particle().

Here is the call graph for this function:

◆ getNewParticleID()

Foam::label getNewParticleID ( ) const
inline

Get unique particle creation id.

Definition at line 111 of file particleI.H.

References Foam::endl(), Foam::labelMax, particle::particleCount_, and WarningInFunction.

Referenced by particle::~particle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mesh()

◆ coordinates()

const Foam::barycentric & coordinates ( ) const
inline

Return current particle coordinates.

Definition at line 131 of file particleI.H.

Referenced by findCellParticle::trackingData::cellToEnd(), trackedParticle::trackingData::trackingData(), and particle::~particle().

Here is the caller graph for this function:

◆ cell()

Foam::label cell ( ) const
inline

Return current cell particle is in.

Definition at line 137 of file particleI.H.

Referenced by streamlinesParticle::move(), and particle::~particle().

Here is the caller graph for this function:

◆ tetFace()

Foam::label tetFace ( ) const
inline

Return current tet face particle is in.

Definition at line 143 of file particleI.H.

Referenced by particle::~particle().

Here is the caller graph for this function:

◆ tetPt()

Foam::label tetPt ( ) const
inline

Return current tet face particle is in.

Definition at line 149 of file particleI.H.

Referenced by particle::~particle().

Here is the caller graph for this function:

◆ face()

Foam::label face ( ) const
inline

Return current face particle is on otherwise -1.

Definition at line 155 of file particleI.H.

Referenced by particle::hitProcessorPatch(), streamlinesParticle::move(), and particle::~particle().

Here is the caller graph for this function:

◆ stepFraction() [1/2]

Foam::scalar stepFraction ( ) const
inline

Return the fraction of time-step completed.

Definition at line 161 of file particleI.H.

Referenced by streamlinesParticle::move(), molecule::move(), particle::reset(), and particle::~particle().

Here is the caller graph for this function:

◆ stepFraction() [2/2]

Foam::scalar & stepFraction ( )
inline

Return the fraction of time-step completed.

Definition at line 167 of file particleI.H.

◆ origProc() [1/2]

Foam::label origProc ( ) const
inline

Return the originating processor ID.

Definition at line 173 of file particleI.H.

Referenced by Foam::operator==(), particle::writeFields(), and particle::~particle().

Here is the caller graph for this function:

◆ origProc() [2/2]

Foam::label & origProc ( )
inline

Return the originating processor ID.

Definition at line 179 of file particleI.H.

◆ origId() [1/2]

◆ origId() [2/2]

Foam::label & origId ( )
inline

Return the particle ID on the originating processor.

Definition at line 191 of file particleI.H.

◆ stepFractionSpan()

Foam::Pair< Foam::scalar > stepFractionSpan ( ) const
inline

Return the step fraction change within the overall time-step.

Returns the start value and the change as a scalar pair. Always return Pair<scalar>(0, 1), unless sub-cycling is in effect, in which case the values will reflect the span of the sub-cycle within the time-step.

Definition at line 197 of file particleI.H.

References TimeState::deltaTValue(), Time::prevTimeState(), Time::subCycling(), objectRegistry::time(), and dimensioned< Type >::value().

Referenced by particle::currentTimeFraction(), particle::hitNonConformalCyclicPatch(), and particle::~particle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ currentTimeFraction()

Foam::scalar currentTimeFraction ( ) const
inline

Return the current fraction within the timestep. This differs.

from the stored step fraction due to sub-cycling.

Definition at line 221 of file particleI.H.

References s(), and particle::stepFractionSpan().

Referenced by particle::~particle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ currentTetIndices()

Foam::tetIndices currentTetIndices ( ) const
inline

Return the indices of the current tet that the.

particle occupies.

Definition at line 229 of file particleI.H.

Referenced by particle::normal(), and particle::~particle().

Here is the caller graph for this function:

◆ currentTetTransform()

Foam::barycentricTensor currentTetTransform ( ) const
inline

Return the current tet transformation tensor.

Definition at line 235 of file particleI.H.

References polyMesh::moving().

Referenced by particle::position(), and particle::~particle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ normal()

Foam::vector normal ( ) const
inline

Return the normal of the tri on tetFacei_ for the.

current tet.

Definition at line 248 of file particleI.H.

References particle::currentTetIndices(), tetIndices::faceTri(), and triangle< Point, PointRef >::normal().

Referenced by particle::hitSymmetryPatch(), molecule::hitWallPatch(), and particle::~particle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onFace()

bool onFace ( ) const
inline

Is the particle on a face?

Definition at line 254 of file particleI.H.

Referenced by lineFace::calcSamples(), particle::hitFace(), particle::onBoundaryFace(), particle::onInternalFace(), particle::patch(), particle::trackToFace(), and particle::~particle().

Here is the caller graph for this function:

◆ onInternalFace()

bool onInternalFace ( ) const
inline

Is the particle on an internal face?

Definition at line 260 of file particleI.H.

References primitiveMesh::isInternalFace(), and particle::onFace().

Referenced by particle::hitFace(), particle::track(), particle::trackToCell(), and particle::~particle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onBoundaryFace()

bool onBoundaryFace ( ) const
inline

Is the particle on a boundary face?

Definition at line 266 of file particleI.H.

References primitiveMesh::isInternalFace(), and particle::onFace().

Referenced by particle::hitCyclicAMIPatch(), particle::hitFace(), particle::patchData(), and particle::~particle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ patch()

Foam::label patch ( ) const
inline

Return the index of patch that the particle is on.

Definition at line 272 of file particleI.H.

References polyMesh::boundaryMesh(), particle::onFace(), and polyBoundaryMesh::whichPatch().

Referenced by particle::hitCyclicAMIPatch(), streamlinesParticle::hitCyclicPatch(), particle::hitCyclicPatch(), particle::hitFace(), streamlinesParticle::hitProcessorPatch(), particle::hitProcessorPatch(), particle::prepareForParallelTransfer(), and particle::~particle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ position()

◆ reset()

void reset ( const scalar  stepFraction)
inline

Set the step fraction and clear the behind data in preparation for.

a new track

Definition at line 284 of file particleI.H.

References particle::stepFraction().

Referenced by particle::~particle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ track()

Foam::scalar track ( const vector displacement,
const scalar  fraction 
)

Track along the displacement for a given fraction of the overall.

step. End when the track is complete, or when a boundary is hit. On exit, stepFraction_ will have been incremented to the current position, and facei_ will be set to the index of the boundary face that was hit, or -1 if the track completed within a cell. The proportion of the displacement still to be completed is returned.

Definition at line 560 of file particle.C.

References Foam::endl(), f(), FUNCTION_NAME, Foam::Info, Foam::nl, particle::onInternalFace(), particle::origId(), particle::trackToCell(), and particle::trackToFace().

Referenced by particle::particle(), and particle::~particle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ trackToCell()

Foam::scalar trackToCell ( const vector displacement,
const scalar  fraction 
)

As particle::track, but stops when a new cell is reached.

Definition at line 584 of file particle.C.

References Foam::endl(), f(), FUNCTION_NAME, Foam::Info, Foam::nl, particle::onInternalFace(), particle::origId(), and particle::trackToFace().

Referenced by particle::track(), and particle::~particle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ trackToFace()

Foam::scalar trackToFace ( const vector displacement,
const scalar  fraction 
)

◆ trackToTri()

Foam::scalar trackToTri ( const vector displacement,
const scalar  fraction,
label tetTriI 
)

As particle::trackToFace, but stops when a tet triangle is hit. On.

exit, tetTriI is set to the index of the tet triangle that was hit, or -1 if the end position was reached.

Definition at line 991 of file particle.C.

References polyMesh::moving(), particle::trackToMovingTri(), and particle::trackToStationaryTri().

Referenced by particle::trackToFace(), particle::trackToMovingTri(), and particle::~particle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ trackToStationaryTri()

Foam::scalar trackToStationaryTri ( const vector displacement,
const scalar  fraction,
label tetTriI 
)

◆ trackToMovingTri()

◆ hitFace()

void hitFace ( const vector displacement,
const scalar  fraction,
TrackCloudType &  cloud,
trackingData td 
)

Hit the current face. If the current face is internal than this.

crosses into the next cell. If it is a boundary face then this will interact the particle with the relevant patch.

Definition at line 108 of file particleTemplates.C.

References polyMesh::boundaryMesh(), Foam::endl(), forAll, FUNCTION_NAME, Foam::Info, particle::trackingData::keepParticle, Foam::nl, particle::onBoundaryFace(), particle::onFace(), particle::onInternalFace(), particle::origId(), p, particle::patch(), and particle::trackToAndHitFace().

Referenced by particle::trackToAndHitFace(), particle::writeFields(), and particle::~particle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ trackToAndHitFace() [1/2]

scalar trackToAndHitFace ( const vector displacement,
const scalar  fraction,
TrackCloudType &  cloud,
trackingData td 
)

Convenience function. Combines trackToFace and hitFace.

Referenced by particle::hitFace(), streamlinesParticle::move(), molecule::move(), and particle::~particle().

Here is the caller graph for this function:

◆ deviationFromMeshCentre()

Foam::vector deviationFromMeshCentre ( ) const

Get the displacement from the mesh centre. Used to correct the.

particle position in cases with reduced dimensionality. Returns a zero vector for three-dimensional cases.

Definition at line 1008 of file particle.C.

References Foam::cmptMin(), Foam::meshTools::constrainToMeshCentre(), polyMesh::geometricD(), Foam::pos(), particle::position(), and VectorSpace< Vector< scalar >, scalar, 3 >::zero.

Referenced by particle::~particle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ patchData()

void patchData ( vector normal,
vector displacement 
) const
inline

Get the normal and displacement of the current patch location.

Definition at line 292 of file particleI.H.

References Barycentric< Cmpt >::b(), Barycentric< Cmpt >::c(), Barycentric< Cmpt >::d(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, polyMesh::moving(), particle::onBoundaryFace(), and Foam::Zero.

Referenced by particle::hitCyclicAMIPatch(), particle::hitNonConformalCyclicPatch(), and particle::~particle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ transformProperties()

void transformProperties ( const transformer )
virtual

Transform the physical properties of the particle.

according to the given transformation tensor

Reimplemented in molecule, streamlinesParticle, and solidParticle.

Definition at line 1023 of file particle.C.

References particle::prepareForParallelTransfer().

Referenced by particle::correctAfterProcessorTransfer(), particle::hitCyclicAMIPatch(), particle::hitCyclicPatch(), particle::hitSymmetryPatch(), particle::prepareForInteractionListReferral(), particle::prepareForNonConformalCyclicTransfer(), solidParticle::transformProperties(), molecule::transformProperties(), and particle::~particle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ prepareForParallelTransfer()

void prepareForParallelTransfer ( trackingData td)

Make changes prior to a parallel transfer. Runs either processor or.

nonConformalCyclic variant below.

Definition at line 1028 of file particle.C.

References particle::patch(), particle::prepareForNonConformalCyclicTransfer(), particle::prepareForProcessorTransfer(), particle::trackingData::sendFromPatch, and particle::trackingData::sendToPatchFace.

Referenced by particle::transformProperties(), and particle::~particle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctAfterParallelTransfer()

void correctAfterParallelTransfer ( trackingData td)

Make changes following a parallel transfer. Runs either processor.

or nonConformalCyclic variant below.

Definition at line 1047 of file particle.C.

References polyMesh::boundaryMesh(), particle::correctAfterNonConformalCyclicTransfer(), particle::correctAfterProcessorTransfer(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, and particle::trackingData::sendToPatch.

Referenced by trackedParticle::correctAfterParallelTransfer(), and particle::~particle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ prepareForProcessorTransfer()

void prepareForProcessorTransfer ( trackingData td)

Make changes prior to a transfer across a processor boundary.

Stores the local patch face index (in facei_) so that the mesh face index can be determined on the other side.

Definition at line 1068 of file particle.C.

References particle::trackingData::sendToPatchFace.

Referenced by particle::prepareForParallelTransfer(), and particle::~particle().

Here is the caller graph for this function:

◆ correctAfterProcessorTransfer()

void correctAfterProcessorTransfer ( trackingData td)

Make changes following a transfer across a processor boundary.

Converts the stored patch index to a mesh index. Accounts for the receiving face being reversed relative to the sending face.

Definition at line 1075 of file particle.C.

References polyMesh::boundaryMesh(), polyPatch::faceCells(), polyMesh::faces(), particle::prepareForNonConformalCyclicTransfer(), particle::trackingData::sendToPatch, List< T >::size(), polyPatch::start(), processorPolyPatch::transform(), particle::transformProperties(), and transformer::transformsPosition().

Referenced by particle::correctAfterParallelTransfer(), and particle::~particle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ prepareForNonConformalCyclicTransfer()

void prepareForNonConformalCyclicTransfer ( const label  sendToPatch,
const label  sendToPatchFace 
)

Make changes prior to a transfer across a non conformal cyclic.

boundary. Stores the receiving patch face (in facei_). Breaks the topology and stores the cartesian position.

Definition at line 1107 of file particle.C.

References polyMesh::boundaryMesh(), Foam::cmptSum(), particle::correctAfterNonConformalCyclicTransfer(), transformer::invTransformPosition(), nonConformalCyclicPolyPatch::nbrPatch(), Foam::pos(), particle::position(), cyclicPolyPatch::transform(), particle::transformProperties(), transformer::transformsPosition(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

Referenced by particle::correctAfterProcessorTransfer(), particle::hitNonConformalCyclicPatch(), particle::prepareForParallelTransfer(), and particle::~particle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctAfterNonConformalCyclicTransfer()

void correctAfterNonConformalCyclicTransfer ( const label  sendToPatch)

Make changes following a transfer across a non conformal cyclic.

boundary. Locates the particle using the stored face index and cartesian position.

Definition at line 1139 of file particle.C.

References Barycentric< Cmpt >::b(), polyMesh::boundaryMesh(), Barycentric< Cmpt >::c(), Barycentric< Cmpt >::d(), polyMesh::faceOwner(), patchIdentifier::name(), nonConformalCyclicPolyPatch::nbrPatch(), nonConformalPolyPatch::origPatch(), particle::prepareForInteractionListReferral(), and polyPatch::start().

Referenced by particle::correctAfterParallelTransfer(), particle::hitNonConformalCyclicPatch(), particle::prepareForNonConformalCyclicTransfer(), and particle::~particle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ prepareForInteractionListReferral()

void prepareForInteractionListReferral ( const transformer transform)

Break the topology and store the cartesian position so that the.

particle can be referred.

Definition at line 1173 of file particle.C.

References Foam::cmptSum(), Foam::inv(), transformer::invTransformPosition(), Foam::pos(), particle::position(), particle::transformProperties(), transformer::transformsPosition(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

Referenced by particle::correctAfterNonConformalCyclicTransfer(), and particle::~particle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctAfterInteractionListReferral()

void correctAfterInteractionListReferral ( const label  celli)

Correct the topology after referral. Locates the particle relative.

to a nearby cell/tet. The particle may end up outside this cell/tet and cannot therefore be tracked.

Definition at line 1196 of file particle.C.

References Barycentric< Cmpt >::b(), Barycentric< Cmpt >::c(), primitiveMesh::cells(), Barycentric< Cmpt >::d(), polyMesh::moving(), Foam::pos(), particle::procTetPt(), and Foam::T().

Referenced by particle::~particle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ procTetPt()

Foam::label procTetPt ( const polyMesh procMesh,
const label  procCell,
const label  procTetFace 
) const

Return the tet point appropriate for decomposition or reconstruction.

to or from the given mesh.

Definition at line 1233 of file particle.C.

References particle::autoMap(), polyMesh::faceOwner(), polyMesh::faces(), and List< T >::size().

Referenced by particle::correctAfterInteractionListReferral(), and particle::~particle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ autoMap()

void autoMap ( const vector position,
const polyTopoChangeMap mapper 
)

Map after a topology change.

Definition at line 1259 of file particle.C.

References polyTopoChangeMap::reverseCellMap().

Referenced by particle::procTetPt(), and particle::~particle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readFields()

◆ writeFields()

void writeFields ( const TrackCloudType &  c)
static

Write the fields associated with the owner cloud.

Definition at line 75 of file particleTemplates.C.

References forAllConstIter, particle::hitFace(), IOobject::NO_READ, particle::origId(), particle::origProc(), and IOPosition< CloudType >::write().

Referenced by solidParticle::writeFields(), streamlinesParticle::writeFields(), molecule::writeFields(), and particle::~particle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writePosition()

void writePosition ( Ostream os) const

Write the particle position and cell.

Definition at line 87 of file particleIO.C.

References IOstream::ASCII, IOstream::check(), IOstream::format(), token::SPACE, and Ostream::write().

Referenced by particle::~particle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ trackToAndHitFace() [2/2]

Foam::scalar trackToAndHitFace ( const vector displacement,
const scalar  fraction,
TrackCloudType &  cloud,
trackingData td 
)

Definition at line 196 of file particleTemplates.C.

References Foam::endl(), f(), FUNCTION_NAME, particle::hitFace(), Foam::Info, Foam::nl, particle::origId(), and particle::trackToFace().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator<<

Ostream& operator<< ( Ostream ,
const particle  
)
friend

Referenced by particle::~particle().

◆ operator==

bool operator== ( const particle pA,
const particle pB 
)
friend

Referenced by particle::~particle().

◆ operator!=

bool operator!= ( const particle pA,
const particle pB 
)
friend

Referenced by particle::~particle().

Member Data Documentation

◆ propertyList_

Foam::string propertyList_ = Foam::particle::propertyList()
static

String representation of properties.

Definition at line 374 of file particle.H.

◆ particleCount_

Foam::label particleCount_ = 0
static

Cumulative particle counter - used to provide unique ID.

Definition at line 374 of file particle.H.

Referenced by particle::getNewParticleID().


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