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 () |
Set step fraction and behind data to zero in preparation for a new. 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 > | |
void | hitFaceNoChangeToMasterPatch (const vector &displacement, const scalar fraction, TrackCloudType &cloud, trackingData &td) |
As above, but does not change the master patch. Needed in order for. 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 () |
Convert global addressing to the processor patch local equivalents. More... | |
void | correctAfterParallelTransfer (const label patchi, trackingData &td) |
Convert processor patch addressing to the global equivalents. More... | |
void | prepareForInteractionListReferral (const transformer &transform) |
Break the topology and store the particle position so that the. More... | |
void | correctAfterInteractionListReferral (const label celli) |
Correct the topology after referral. The particle may still be. 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 mapPolyMesh &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 > | |
void | hitCyclicACMIPatch (const vector &displacement, const scalar fraction, TrackCloudType &cloud, trackingData &td) |
Overridable function to handle the particle hitting a. More... | |
template<class TrackCloudType > | |
void | hitCyclicRepeatAMIPatch (const vector &displacement, const scalar fraction, 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) |
Base particle class.
Definition at line 83 of file particle.H.
particle | ( | const polyMesh & | mesh, |
const barycentric & | coordinates, | ||
const label | celli, | ||
const label | tetFacei, | ||
const label | tetPti | ||
) |
Construct from components.
Definition at line 513 of file particle.C.
Referenced by particle< Type >::clone(), and particle< Type >::iNew::operator()().
Construct from a position and a cell, searching for the rest of the.
required topology
Definition at line 536 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 564 of file particle.C.
Construct as a copy with references to a new mesh.
Definition at line 580 of file particle.C.
References particle< Type >::track().
|
inlinevirtual |
Destructor.
Definition at line 430 of file particle.H.
References particle< Type >::autoMap(), Foam::constant::universal::c, particle< Type >::cell(), particle< Type >::coordinates(), particle< Type >::correctAfterInteractionListReferral(), particle< Type >::correctAfterParallelTransfer(), particle< Type >::currentTetIndices(), particle< Type >::currentTetTransform(), particle< Type >::currentTimeFraction(), particle< Type >::deviationFromMeshCentre(), particle< Type >::face(), particle< Type >::getNewParticleID(), particle< Type >::hitFace(), particle< Type >::hitFaceNoChangeToMasterPatch(), particle< Type >::mesh(), particle< Type >::normal(), particle< Type >::onBoundaryFace(), particle< Type >::onFace(), particle< Type >::onInternalFace(), particle< Type >::operator!=, particle< Type >::operator<<, particle< Type >::operator==, particle< Type >::origId(), particle< Type >::origProc(), particle< Type >::patch(), particle< Type >::patchData(), patchi, particle< Type >::position(), particle< Type >::prepareForInteractionListReferral(), particle< Type >::prepareForParallelTransfer(), particle< Type >::procTetPt(), particle< Type >::readFields(), particle< Type >::reset(), particle< Type >::stepFraction(), particle< Type >::stepFractionSpan(), particle< Type >::tetFace(), particle< Type >::tetPt(), particle< Type >::track(), particle< Type >::trackToAndHitFace(), particle< Type >::trackToCell(), particle< Type >::trackToFace(), particle< Type >::trackToMovingTri(), particle< Type >::trackToStationaryTri(), particle< Type >::trackToTri(), Foam::transform(), particle< Type >::transformProperties(), particle< Type >::writeFields(), and particle< Type >::writePosition().
|
protected |
Overridable function to handle the particle hitting a patch.
Executed before other patch-hitting functions.
Definition at line 228 of file particleTemplates.C.
Referenced by particle< Type >::trackingData::trackingData().
|
protected |
Overridable function to handle the particle hitting a wedgePatch.
Definition at line 235 of file particleTemplates.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, particle< Type >::hitSymmetryPatch(), and particle< Type >::hitSymmetryPlanePatch().
Referenced by particle< Type >::trackingData::trackingData().
|
protected |
Overridable function to handle the particle hitting a.
symmetryPlanePatch
Definition at line 247 of file particleTemplates.C.
References particle< Type >::hitSymmetryPatch().
Referenced by particle< Type >::hitWedgePatch(), and particle< Type >::trackingData::trackingData().
|
protected |
Overridable function to handle the particle hitting a symmetryPatch.
Definition at line 257 of file particleTemplates.C.
References Foam::I, particle< Type >::normal(), transformer::rotation(), and particle< Type >::transformProperties().
Referenced by particle< Type >::hitSymmetryPlanePatch(), particle< Type >::hitWedgePatch(), and particle< Type >::trackingData::trackingData().
|
protected |
Overridable function to handle the particle hitting a cyclicPatch.
Definition at line 265 of file particleTemplates.C.
References polyMesh::boundaryMesh(), polyMesh::faceOwner(), polyMesh::faces(), particle< Type >::hitCyclicAMIPatch(), cyclicPolyPatch::nbrPatch(), particle< Type >::patch(), List< T >::size(), cyclicPolyPatch::transform(), cyclicPolyPatch::transformGlobalFace(), particle< Type >::transformProperties(), and transformer::transformsPosition().
Referenced by particle< Type >::trackingData::trackingData().
|
protected |
Overridable function to handle the particle hitting a cyclicAMIPatch.
Definition at line 291 of file particleTemplates.C.
References cyclicAMIPolyPatch::AMITransforms(), polyMesh::boundaryMesh(), Foam::endl(), polyMesh::faceOwner(), Pair< Type >::first(), particle< Type >::hitCyclicACMIPatch(), Foam::Info, Foam::inv(), particle< Type >::trackingData::keepParticle, patchIdentifier::name(), cyclicAMIPolyPatch::nbrPatch(), Foam::nl, particle< Type >::onBoundaryFace(), particle< Type >::origId(), cyclicAMIPolyPatch::owner(), particle< Type >::patch(), particle< Type >::patchData(), cyclicAMIPolyPatch::pointAMIAndFace(), Foam::pos(), particle< Type >::position(), Pair< Type >::second(), polyPatch::start(), transformer::transform(), cyclicAMIPolyPatch::transform(), particle< Type >::transformProperties(), transformer::transformsPosition(), WarningInFunction, and polyPatch::whichFace().
Referenced by particle< Type >::hitCyclicPatch(), and particle< Type >::trackingData::trackingData().
|
protected |
Overridable function to handle the particle hitting a.
cyclicACMIPatch
Definition at line 403 of file particleTemplates.C.
References polyMesh::boundaryMesh(), Pair< Type >::first(), particle< Type >::hitCyclicRepeatAMIPatch(), cyclicACMIPolyPatch::mask(), cyclicACMIPolyPatch::nonOverlapPatch(), p, particle< Type >::patch(), particle< Type >::patchData(), cyclicAMIPolyPatch::pointAMIAndFace(), Foam::pos(), particle< Type >::position(), polyPatch::start(), cyclicACMIPolyPatch::tolerance(), and polyPatch::whichFace().
Referenced by particle< Type >::hitCyclicAMIPatch(), and particle< Type >::trackingData::trackingData().
|
protected |
Overridable function to handle the particle hitting an.
Definition at line 459 of file particleTemplates.C.
References p.
Referenced by particle< Type >::hitCyclicACMIPatch(), and particle< Type >::trackingData::trackingData().
|
protected |
Overridable function to handle the particle hitting a processorPatch.
Definition at line 474 of file particleTemplates.C.
Referenced by particle< Type >::trackingData::trackingData().
|
protected |
Overridable function to handle the particle hitting a wallPatch.
Definition at line 479 of file particleTemplates.C.
Referenced by particle< Type >::trackingData::trackingData().
TypeName | ( | "particle< Type >" | ) |
Runtime type information.
Referenced by particle< Type >::trackingData::trackingData().
|
inlinestatic |
Definition at line 367 of file particle.H.
Construct a clone.
Reimplemented in molecule, streamlinesParticle, trackedParticle, solidParticle, findCellParticle, passiveParticle, and indexedParticle.
Definition at line 404 of file particle.H.
References particle< Type >::particle().
|
inline |
Get unique particle creation id.
Definition at line 111 of file particleI.H.
References Foam::endl(), Foam::labelMax, particle< Type >::particleCount_, and WarningInFunction.
Referenced by particle< Type >::~particle().
|
inline |
Return the mesh database.
Definition at line 125 of file particleI.H.
Referenced by findCellParticle::trackingData::cellToEnd(), streamlinesParticle::move(), trackedParticle::trackingData::trackingData(), and particle< Type >::~particle().
|
inline |
Return current particle coordinates.
Definition at line 131 of file particleI.H.
Referenced by findCellParticle::trackingData::cellToEnd(), Foam::reconstructLagrangianPositions(), trackedParticle::trackingData::trackingData(), and particle< Type >::~particle().
|
inline |
Return current cell particle is in.
Definition at line 137 of file particleI.H.
Referenced by lineFace::calcSamples(), streamlinesParticle::move(), Foam::reconstructLagrangianPositions(), and particle< Type >::~particle().
|
inline |
Return current tet face particle is in.
Definition at line 143 of file particleI.H.
Referenced by Foam::reconstructLagrangianPositions(), and particle< Type >::~particle().
|
inline |
Return current tet face particle is in.
Definition at line 149 of file particleI.H.
Referenced by particle< Type >::~particle().
|
inline |
Return current face particle is on otherwise -1.
Definition at line 155 of file particleI.H.
Referenced by lineFace::calcSamples(), streamlinesParticle::move(), and particle< Type >::~particle().
|
inline |
Return the fraction of time-step completed.
Definition at line 161 of file particleI.H.
Referenced by streamlinesParticle::move(), molecule::move(), and particle< Type >::~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< Type >::writeFields(), and particle< Type >::~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< Type >::hitCyclicAMIPatch(), particle< Type >::hitFace(), particle< Type >::hitFaceNoChangeToMasterPatch(), Foam::operator==(), particle< Type >::readFields(), particle< Type >::track(), particle< Type >::trackToAndHitFace(), particle< Type >::trackToCell(), particle< Type >::trackToFace(), particle< Type >::trackToMovingTri(), particle< Type >::trackToStationaryTri(), particle< Type >::writeFields(), and particle< Type >::~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< Type >::currentTimeFraction(), and particle< Type >::~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< Type >::stepFractionSpan().
Referenced by particle< Type >::~particle().
|
inline |
Return the indices of the current tet that the.
particle occupies.
Definition at line 229 of file particleI.H.
Referenced by particle< Type >::normal(), and particle< Type >::~particle().
|
inline |
Return the current tet transformation tensor.
Definition at line 235 of file particleI.H.
References polyMesh::moving().
Referenced by particle< Type >::position(), and particle< Type >::~particle().
|
inline |
Return the normal of the tri on tetFacei_ for the.
current tet.
Definition at line 248 of file particleI.H.
References particle< Type >::currentTetIndices(), tetIndices::faceTri(), and triangle< Point, PointRef >::normal().
Referenced by particle< Type >::hitSymmetryPatch(), molecule::hitWallPatch(), and particle< Type >::~particle().
|
inline |
Is the particle on a face?
Definition at line 254 of file particleI.H.
Referenced by lineFace::calcSamples(), particle< Type >::hitFaceNoChangeToMasterPatch(), streamlinesParticle::move(), particle< Type >::onBoundaryFace(), particle< Type >::onInternalFace(), particle< Type >::patch(), particle< Type >::trackToFace(), and particle< Type >::~particle().
|
inline |
Is the particle on an internal face?
Definition at line 260 of file particleI.H.
References primitiveMesh::isInternalFace(), and particle< Type >::onFace().
Referenced by particle< Type >::hitFaceNoChangeToMasterPatch(), particle< Type >::track(), particle< Type >::trackToCell(), and particle< Type >::~particle().
|
inline |
Is the particle on a boundary face?
Definition at line 266 of file particleI.H.
References primitiveMesh::isInternalFace(), and particle< Type >::onFace().
Referenced by lineFace::calcSamples(), particle< Type >::hitCyclicAMIPatch(), particle< Type >::hitFace(), particle< Type >::hitFaceNoChangeToMasterPatch(), particle< Type >::patchData(), and particle< Type >::~particle().
|
inline |
Return the index of patch that the particle is on.
Definition at line 272 of file particleI.H.
References polyMesh::boundaryMesh(), particle< Type >::onFace(), and polyBoundaryMesh::whichPatch().
Referenced by particle< Type >::hitCyclicACMIPatch(), particle< Type >::hitCyclicAMIPatch(), particle< Type >::hitCyclicPatch(), particle< Type >::hitFaceNoChangeToMasterPatch(), particle< Type >::prepareForParallelTransfer(), and particle< Type >::~particle().
|
inline |
Return current particle position.
Definition at line 278 of file particleI.H.
References particle< Type >::currentTetTransform().
Referenced by nearWallFields::calcAddressing(), lineFace::calcSamples(), findCellParticle::trackingData::cellToEnd(), particle< Type >::deviationFromMeshCentre(), particle< Type >::hitCyclicACMIPatch(), particle< Type >::hitCyclicAMIPatch(), streamlinesParticle::move(), particle< Type >::prepareForInteractionListReferral(), molecule::setSitePositions(), streamlinesParticle::trackingData::trackingData(), trackedParticle::trackingData::trackingData(), particle< Type >::trackingData::trackingData(), particle< Type >::trackToFace(), particle< Type >::trackToMovingTri(), particle< Type >::trackToStationaryTri(), and particle< Type >::~particle().
|
inline |
Set step fraction and behind data to zero in preparation for a new.
track
Definition at line 284 of file particleI.H.
Referenced by particle< Type >::~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 599 of file particle.C.
References Foam::endl(), f(), FUNCTION_NAME, Foam::Info, Foam::nl, particle< Type >::onInternalFace(), particle< Type >::origId(), particle< Type >::trackToCell(), and particle< Type >::trackToFace().
Referenced by lineFace::calcSamples(), particle< Type >::particle(), and particle< Type >::~particle().
Foam::scalar trackToCell | ( | const vector & | displacement, |
const scalar | fraction | ||
) |
As particle::track, but stops when a new cell is reached.
Definition at line 623 of file particle.C.
References Foam::endl(), f(), FUNCTION_NAME, Foam::Info, Foam::nl, particle< Type >::onInternalFace(), particle< Type >::origId(), and particle< Type >::trackToFace().
Referenced by lineFace::calcSamples(), particle< Type >::track(), and particle< Type >::~particle().
Foam::scalar trackToFace | ( | const vector & | displacement, |
const scalar | fraction | ||
) |
As particle::track, but stops when a face is hit.
Definition at line 645 of file particle.C.
References Foam::endl(), f(), FUNCTION_NAME, Foam::Info, Foam::nl, particle< Type >::onFace(), particle< Type >::origId(), particle< Type >::position(), particle< Type >::trackToStationaryTri(), particle< Type >::trackToTri(), and WarningInFunction.
Referenced by streamlinesParticle::move(), particle< Type >::track(), particle< Type >::trackToAndHitFace(), particle< Type >::trackToCell(), and particle< Type >::~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 1016 of file particle.C.
References polyMesh::moving(), particle< Type >::trackToMovingTri(), and particle< Type >::trackToStationaryTri().
Referenced by particle< Type >::trackToFace(), particle< Type >::trackToMovingTri(), and particle< Type >::~particle().
Foam::scalar trackToStationaryTri | ( | const vector & | displacement, |
const scalar | fraction, | ||
label & | tetTriI | ||
) |
As particle::trackToTri, but for stationary meshes.
Definition at line 706 of file particle.C.
References Foam::constant::physicoChemical::b, Foam::cmptSum(), Foam::endl(), Foam::Info, Foam::mag(), Foam::max(), Foam::constant::physicoChemical::mu, particle< Type >::origId(), particle< Type >::position(), VectorSpace< Form, Cmpt, Ncmpts >::replace(), Foam::T(), particle< Type >::trackToMovingTri(), and Foam::y0().
Referenced by particle< Type >::trackToFace(), particle< Type >::trackToTri(), and particle< Type >::~particle().
Foam::scalar trackToMovingTri | ( | const vector & | displacement, |
const scalar | fraction, | ||
label & | tetTriI | ||
) |
As particle::trackToTri, but for moving meshes.
Definition at line 830 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< Type >::origId(), particle< Type >::position(), Foam::real, VectorSpace< Form, Cmpt, Ncmpts >::replace(), Foam::sqr(), Foam::T(), particle< Type >::trackToTri(), Roots< N >::type(), cubicEqn::value(), and Foam::y0().
Referenced by particle< Type >::trackToStationaryTri(), particle< Type >::trackToTri(), and particle< Type >::~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 106 of file particleTemplates.C.
References Foam::endl(), FUNCTION_NAME, particle< Type >::hitFaceNoChangeToMasterPatch(), Foam::Info, Foam::nl, particle< Type >::onBoundaryFace(), and particle< Type >::origId().
Referenced by particle< Type >::trackToAndHitFace(), particle< Type >::writeFields(), and particle< Type >::~particle().
void hitFaceNoChangeToMasterPatch | ( | const vector & | displacement, |
const scalar | fraction, | ||
TrackCloudType & | cloud, | ||
trackingData & | td | ||
) |
As above, but does not change the master patch. Needed in order for.
ACMI to be able to delegate a hit to the non-overlap patch.
Definition at line 129 of file particleTemplates.C.
References polyMesh::boundaryMesh(), Foam::endl(), FUNCTION_NAME, Foam::Info, particle< Type >::trackingData::keepParticle, Foam::nl, particle< Type >::onBoundaryFace(), particle< Type >::onFace(), particle< Type >::onInternalFace(), particle< Type >::origId(), p, particle< Type >::patch(), and particle< Type >::trackToAndHitFace().
Referenced by particle< Type >::hitFace(), and particle< Type >::~particle().
scalar trackToAndHitFace | ( | const vector & | displacement, |
const scalar | fraction, | ||
TrackCloudType & | cloud, | ||
trackingData & | td | ||
) |
Convenience function. Combines trackToFace and hitFace.
Referenced by particle< Type >::hitFaceNoChangeToMasterPatch(), streamlinesParticle::move(), molecule::move(), and particle< Type >::~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 1033 of file particle.C.
References Foam::cmptMin(), Foam::meshTools::constrainToMeshCentre(), polyMesh::geometricD(), Foam::pos(), particle< Type >::position(), and VectorSpace< Vector< scalar >, scalar, 3 >::zero.
Referenced by particle< Type >::~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< Type >::onBoundaryFace(), and Foam::Zero.
Referenced by particle< Type >::hitCyclicACMIPatch(), particle< Type >::hitCyclicAMIPatch(), and particle< Type >::~particle().
|
virtual |
Transform the physical properties of the particle.
according to the given transformation tensor
Reimplemented in molecule, and solidParticle.
Definition at line 1048 of file particle.C.
Referenced by particle< Type >::correctAfterParallelTransfer(), particle< Type >::hitCyclicAMIPatch(), particle< Type >::hitCyclicPatch(), particle< Type >::hitSymmetryPatch(), particle< Type >::prepareForInteractionListReferral(), solidParticle::transformProperties(), molecule::transformProperties(), and particle< Type >::~particle().
void prepareForParallelTransfer | ( | ) |
Convert global addressing to the processor patch local equivalents.
Definition at line 1052 of file particle.C.
References polyMesh::boundaryMesh(), particle< Type >::correctAfterParallelTransfer(), and particle< Type >::patch().
Referenced by particle< Type >::~particle().
void correctAfterParallelTransfer | ( | const label | patchi, |
trackingData & | td | ||
) |
Convert processor patch addressing to the global equivalents.
and set the celli to the face-neighbour
Definition at line 1060 of file particle.C.
References polyMesh::boundaryMesh(), polyPatch::faceCells(), polyMesh::faces(), patchi, particle< Type >::prepareForInteractionListReferral(), List< T >::size(), polyPatch::start(), coupledPolyPatch::transform(), particle< Type >::transformProperties(), and transformer::transformsPosition().
Referenced by trackedParticle::correctAfterParallelTransfer(), particle< Type >::prepareForParallelTransfer(), and particle< Type >::~particle().
void prepareForInteractionListReferral | ( | const transformer & | transform | ) |
Break the topology and store the particle position so that the.
particle can be referred.
Definition at line 1094 of file particle.C.
References Foam::cmptSum(), Foam::inv(), transformer::invTransformPosition(), Foam::pos(), particle< Type >::position(), particle< Type >::transformProperties(), transformer::transformsPosition(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
Referenced by particle< Type >::correctAfterParallelTransfer(), and particle< Type >::~particle().
void correctAfterInteractionListReferral | ( | const label | celli | ) |
Correct the topology after referral. The particle may still be.
outside the stored tet and therefore not track-able.
Definition at line 1118 of file particle.C.
References Barycentric< Cmpt >::b(), Barycentric< Cmpt >::c(), primitiveMesh::cells(), Barycentric< Cmpt >::d(), polyMesh::moving(), Foam::pos(), particle< Type >::procTetPt(), and Foam::T().
Referenced by particle< Type >::~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 1156 of file particle.C.
References particle< Type >::autoMap(), polyMesh::faceOwner(), polyMesh::faces(), and List< T >::size().
Referenced by particle< Type >::correctAfterInteractionListReferral(), Foam::reconstructLagrangianPositions(), and particle< Type >::~particle().
void autoMap | ( | const vector & | position, |
const mapPolyMesh & | mapper | ||
) |
Map after a topology change.
Definition at line 1182 of file particle.C.
References mapPolyMesh::reverseCellMap().
Referenced by particle< Type >::procTetPt(), and particle< Type >::~particle().
|
static |
Read the fields associated with the owner cloud.
Definition at line 43 of file particleTemplates.C.
References forAllIter, IOobject::MUST_READ, particle< Type >::origId(), p, and IOobject::typeHeaderOk().
Referenced by findCellParticle::trackingData::cellToEnd(), indexedParticleCloud::indexedParticleCloud(), passiveParticleCloud::passiveParticleCloud(), solidParticle::readFields(), streamlinesParticle::readFields(), molecule::readFields(), trackedParticle::trackingData::trackingData(), and particle< Type >::~particle().
|
static |
Write the fields associated with the owner cloud.
Definition at line 73 of file particleTemplates.C.
References forAllConstIter(), particle< Type >::hitFace(), IOobject::NO_READ, particle< Type >::origId(), particle< Type >::origProc(), and IOPosition< CloudType >::write().
Referenced by solidParticle::writeFields(), streamlinesParticle::writeFields(), molecule::writeFields(), and particle< Type >::~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< Type >::~particle().
Foam::scalar trackToAndHitFace | ( | const vector & | displacement, |
const scalar | fraction, | ||
TrackCloudType & | cloud, | ||
trackingData & | td | ||
) |
Definition at line 207 of file particleTemplates.C.
References Foam::endl(), f(), FUNCTION_NAME, particle< Type >::hitFace(), Foam::Info, Foam::nl, particle< Type >::origId(), and particle< Type >::trackToFace().
Referenced by particle< Type >::~particle().
Referenced by particle< Type >::~particle().
Referenced by particle< Type >::~particle().
|
static |
String representation of properties.
Definition at line 367 of file particle.H.
|
static |
Cumulative particle counter - used to provide unique ID.
Definition at line 367 of file particle.H.
Referenced by particle< Type >::getNewParticleID().