Base particle class. More...
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< particle > | clone () const |
Construct a clone. More... | |
virtual | ~particle () |
Destructor. More... | |
label | getNewParticleID () const |
Get unique particle creation id. More... | |
const polyMesh & | mesh () const |
Return the mesh database. More... | |
const barycentric & | coordinates () 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... | |
label & | origProc () |
Return the originating processor ID. More... | |
label | origId () const |
Return the particle ID on the originating processor. More... | |
label & | origId () |
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 | |
Ostream & | operator<< (Ostream &, const particle &) |
bool | operator== (const particle &pA, const particle &pB) |
bool | operator!= (const particle &pA, const particle &pB) |
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()().
Construct from a position and a cell, searching for the rest of the.
required topology
Definition at line 497 of file particle.C.
Construct from Istream.
Definition at line 46 of file particleIO.C.
References IOstream::ASCII, IOstream::check(), IOstream::format(), and Istream::read().
Construct as a copy.
Definition at line 525 of file particle.C.
Construct as a copy with references to a new mesh.
Definition at line 541 of file particle.C.
References particle::track().
|
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().
|
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().
|
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().
|
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().
|
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().
|
protected |
Overridable function to handle the particle hitting a cyclicPatch.
Definition at line 254 of file particleTemplates.C.
References polyMesh::boundaryMesh(), polyMesh::faceOwner(), polyMesh::faces(), particle::hitCyclicAMIPatch(), cyclicPolyPatch::nbrPatch(), particle::patch(), List< T >::size(), cyclicPolyPatch::transform(), cyclicPolyPatch::transformGlobalFace(), particle::transformProperties(), and transformer::transformsPosition().
Referenced by streamlinesParticle::hitCyclicPatch(), and particle::trackingData::trackingData().
|
protected |
Overridable function to handle the particle hitting a cyclicAMIPatch.
Definition at line 280 of file particleTemplates.C.
References cyclicAMIPolyPatch::AMITransforms(), polyMesh::boundaryMesh(), Foam::endl(), polyMesh::faceOwner(), Pair< Type >::first(), particle::hitNonConformalCyclicPatch(), Foam::Info, Foam::inv(), particle::trackingData::keepParticle, patchIdentifier::name(), cyclicAMIPolyPatch::nbrPatch(), Foam::nl, particle::onBoundaryFace(), particle::origId(), cyclicAMIPolyPatch::owner(), particle::patch(), particle::patchData(), cyclicAMIPolyPatch::pointAMIAndFace(), Foam::pos(), particle::position(), Pair< Type >::second(), polyPatch::start(), transformer::transform(), cyclicAMIPolyPatch::transform(), particle::transformProperties(), transformer::transformsPosition(), WarningInFunction, and polyPatch::whichFace().
Referenced by streamlinesParticle::hitCyclicAMIPatch(), particle::hitCyclicPatch(), and particle::trackingData::trackingData().
|
protected |
Overridable function to handle the particle hitting an.
Definition at line 392 of file particleTemplates.C.
References polyMesh::boundaryMesh(), particle::correctAfterNonConformalCyclicTransfer(), patchToPatch::procFace::facei, patchIdentifier::index(), UPstream::myProcNo(), cyclicPolyPatch::nbrPatchID(), nonConformalPolyPatch::origPatch(), particle::patchData(), patchi, particle::position(), particle::prepareForNonConformalCyclicTransfer(), patchToPatch::procFace::proci, nonConformalCyclicPolyPatch::ray(), particle::trackingData::sendFromPatch, particle::trackingData::sendToPatch, particle::trackingData::sendToPatchFace, particle::trackingData::sendToProc, particle::stepFractionSpan(), and polyPatch::whichFace().
Referenced by particle::hitCyclicAMIPatch(), streamlinesParticle::hitNonConformalCyclicPatch(), and particle::trackingData::trackingData().
|
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().
|
protected |
Overridable function to handle the particle hitting a wallPatch.
Definition at line 465 of file particleTemplates.C.
Referenced by particle::trackingData::trackingData().
TypeName | ( | "particle" | ) |
Runtime type information.
Referenced by particle::trackingData::trackingData().
|
inlinestatic |
Definition at line 374 of file particle.H.
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().
|
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().
|
inline |
Return the mesh database.
Definition at line 125 of file particleI.H.
Referenced by findCellParticle::trackingData::cellToEnd(), streamlinesParticle::hitCyclicPatch(), streamlinesParticle::hitProcessorPatch(), particle::hitProcessorPatch(), streamlinesParticle::move(), sampledSetParticle::trackingData::trackingData(), trackedParticle::trackingData::trackingData(), and particle::~particle().
|
inline |
Return current particle coordinates.
Definition at line 131 of file particleI.H.
Referenced by findCellParticle::trackingData::cellToEnd(), trackedParticle::trackingData::trackingData(), and particle::~particle().
|
inline |
Return current cell particle is in.
Definition at line 137 of file particleI.H.
Referenced by streamlinesParticle::move(), and particle::~particle().
|
inline |
Return current tet face particle is in.
Definition at line 143 of file particleI.H.
Referenced by particle::~particle().
|
inline |
Return current tet face particle is in.
Definition at line 149 of file particleI.H.
Referenced by particle::~particle().
|
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().
|
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().
|
inline |
Return the fraction of time-step completed.
Definition at line 167 of file particleI.H.
|
inline |
Return the originating processor ID.
Definition at line 173 of file particleI.H.
Referenced by Foam::operator==(), particle::writeFields(), and particle::~particle().
|
inline |
Return the originating processor ID.
Definition at line 179 of file particleI.H.
|
inline |
Return the particle ID on the originating processor.
Definition at line 185 of file particleI.H.
Referenced by particle::hitCyclicAMIPatch(), particle::hitFace(), Foam::operator==(), particle::readFields(), particle::track(), particle::trackToAndHitFace(), particle::trackToCell(), particle::trackToFace(), particle::trackToMovingTri(), particle::trackToStationaryTri(), particle::writeFields(), and particle::~particle().
|
inline |
Return the particle ID on the originating processor.
Definition at line 191 of file particleI.H.
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
inline |
Return current particle position.
Definition at line 278 of file particleI.H.
References particle::currentTetTransform().
Referenced by nearWallFields::calcAddressing(), lineFace::calcSamples(), findCellParticle::trackingData::cellToEnd(), particle::deviationFromMeshCentre(), particle::hitCyclicAMIPatch(), particle::hitNonConformalCyclicPatch(), streamlinesParticle::move(), particle::prepareForInteractionListReferral(), particle::prepareForNonConformalCyclicTransfer(), molecule::setSitePositions(), sampledSetParticle::trackingData::trackingData(), trackedParticle::trackingData::trackingData(), particle::trackingData::trackingData(), particle::trackToFace(), particle::trackToMovingTri(), particle::trackToStationaryTri(), and particle::~particle().
|
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().
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().
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().
Foam::scalar trackToFace | ( | const vector & | displacement, |
const scalar | fraction | ||
) |
As particle::track, but stops when a face is hit.
Definition at line 606 of file particle.C.
References Foam::endl(), f(), FUNCTION_NAME, Foam::Info, Foam::nl, particle::onFace(), particle::origId(), particle::position(), particle::trackToStationaryTri(), particle::trackToTri(), and WarningInFunction.
Referenced by lineFace::calcSamples(), streamlinesParticle::move(), particle::track(), particle::trackToAndHitFace(), particle::trackToCell(), and particle::~particle().
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().
Foam::scalar trackToStationaryTri | ( | const vector & | displacement, |
const scalar | fraction, | ||
label & | tetTriI | ||
) |
As particle::trackToTri, but for stationary meshes.
Definition at line 659 of file particle.C.
References Foam::constant::physicoChemical::b, Foam::cmptSum(), Foam::endl(), Foam::Info, Foam::mag(), Foam::max(), Foam::constant::physicoChemical::mu, particle::origId(), particle::position(), VectorSpace< Form, Cmpt, Ncmpts >::replace(), Foam::T(), particle::trackToMovingTri(), and Foam::y0().
Referenced by particle::trackToFace(), particle::trackToTri(), and particle::~particle().
Foam::scalar trackToMovingTri | ( | const vector & | displacement, |
const scalar | fraction, | ||
label & | tetTriI | ||
) |
As particle::trackToTri, but for moving meshes.
Definition at line 794 of file particle.C.
References Foam::constant::physicoChemical::b, Foam::cmptSum(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Info, Foam::mag(), Foam::max(), Foam::constant::physicoChemical::mu, Foam::name(), particle::origId(), particle::position(), Foam::real, VectorSpace< Form, Cmpt, Ncmpts >::replace(), Foam::sqr(), Foam::T(), particle::trackToTri(), Roots< N >::type(), cubicEqn::value(), and Foam::y0().
Referenced by particle::trackToStationaryTri(), particle::trackToTri(), and particle::~particle().
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().
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().
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().
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().
|
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
|
static |
Read the fields associated with the owner cloud.
Definition at line 42 of file particleTemplates.C.
References forAllIter, typeIOobject< Type >::headerOk(), IOobject::MUST_READ, particle::origId(), and p.
Referenced by findCellParticle::trackingData::cellToEnd(), indexedParticleCloud::indexedParticleCloud(), passiveParticleCloud::passiveParticleCloud(), solidParticle::readFields(), streamlinesParticle::readFields(), molecule::readFields(), sampledSetCloud::sampledSetCloud(), sampledSetParticle::trackingData::trackingData(), trackedParticle::trackingData::trackingData(), and particle::~particle().
|
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().
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().
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().
Referenced by particle::~particle().
Referenced by particle::~particle().
Referenced by particle::~particle().
|
static |
String representation of properties.
Definition at line 374 of file particle.H.
|
static |
Cumulative particle counter - used to provide unique ID.
Definition at line 374 of file particle.H.
Referenced by particle::getNewParticleID().