Base particle class. More...
Classes | |
class | iNew |
Factory class to read-construct particles (for parallel transfer) More... | |
struct | positionsCompat1706 |
Old particle positions content for OpenFOAM-1706 and earlier. 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=-1) | |
Construct from a position and a cell. More... | |
particle (const polyMesh &mesh, const vector &position, const label celli, const label tetFacei, const label tetPti, const bool doLocate=true) | |
Construct from position components. More... | |
particle (const polyMesh &mesh, Istream &, const bool readFields=true, const bool newFormat=true, const bool doLocate=true) | |
Construct from Istream. More... | |
particle (const particle &p, const polyMesh &mesh) | |
Construct as a copy with reference to a mesh. More... | |
particle (const particle &p) | |
Copy construct. More... | |
virtual autoPtr< particle > | clone () const |
Construct a clone. More... | |
virtual | ~particle ()=default |
Destructor. More... | |
label | getNewParticleID () const |
Get unique particle creation id. More... | |
const polyMesh & | mesh () const noexcept |
Return the mesh database. More... | |
const barycentric & | coordinates () const noexcept |
Return current particle coordinates. More... | |
label | cell () const noexcept |
Return current cell particle is in. More... | |
label & | cell () noexcept |
Return current cell particle is in for manipulation. More... | |
label | tetFace () const noexcept |
Return current tet face particle is in. More... | |
label & | tetFace () noexcept |
Return current tet face particle is in for manipulation. More... | |
label | tetPt () const noexcept |
Return current tet face particle is in. More... | |
label & | tetPt () noexcept |
Return current tet face particle is in for manipulation. More... | |
label | face () const noexcept |
Return current face particle is on otherwise -1. More... | |
label & | face () noexcept |
Return current face particle is on for manipulation. More... | |
scalar | stepFraction () const noexcept |
Return the fraction of time-step completed. More... | |
scalar & | stepFraction () noexcept |
Return the fraction of time-step completed. More... | |
label | origProc () const noexcept |
Return the originating processor ID. More... | |
label & | origProc () noexcept |
Return the originating processor ID. More... | |
label | origId () const noexcept |
Return the particle ID on the originating processor. More... | |
label & | origId () noexcept |
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 noexcept |
Return indices of the current tet that the particle occupies. More... | |
barycentricTensor | currentTetTransform () const |
Return the current tet transformation tensor. More... | |
vector | normal () const |
The (unit) normal of the tri on tetFacei_ for the current tet. More... | |
bool | onFace () const noexcept |
Is the particle on a face? More... | |
bool | onInternalFace () const noexcept |
Is the particle on an internal face? More... | |
bool | onBoundaryFace () const noexcept |
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 () |
Reset particle data. More... | |
scalar | track (const vector &displacement, const scalar fraction) |
Track along the displacement for a given fraction of the overall. More... | |
scalar | trackToFace (const vector &displacement, const scalar fraction) |
As particle::track, but also stops on internal faces. More... | |
scalar | trackToTri (const vector &displacement, const scalar fraction, label &tetTriI) |
As particle::trackToFace, but also stops on tet triangles. 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 &direction, TrackCloudType &cloud, trackingData &td) |
Hit the current face. If the current face is internal than this. More... | |
template<class TrackCloudType > | |
void | trackToAndHitFace (const vector &direction, 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 &n, vector &U) const |
Get the normal and velocity of the current patch location. More... | |
virtual void | transformProperties (const tensor &T) |
Transform the physical properties of the particle. More... | |
virtual void | transformProperties (const vector &separation) |
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 vectorTensorTransform &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 | relocate (const point &position, const label celli=-1) |
Set the addressing based on the provided position. More... | |
void | writeProperties (Ostream &os, const wordRes &filters, const word &delim, const bool namesOnly) const |
Write individual particle properties to stream. More... | |
void | writeCoordinates (Ostream &os) const |
Write the particle barycentric coordinates and cell info. More... | |
virtual void | writePosition (Ostream &os) const |
Write the particle position and cell id. More... | |
Static Public Member Functions | |
static string | propertyList () |
template<class Derived > | |
static autoPtr< particle > | Clone (const Derived &p) |
Clone a particle. More... | |
template<class Derived > | |
static autoPtr< particle > | Clone (const Derived &p, const polyMesh &mesh) |
Clone a particle with a mesh reference. More... | |
template<class Type > | |
static void | writePropertyName (Ostream &os, const word &name, const word &delim) |
Write the name representation to stream. More... | |
template<class Type > | |
static void | writeProperty (Ostream &os, const word &name, const Type &value, const bool nameOnly, const word &delim, const wordRes &filters=wordRes::null()) |
Write a named particle property to stream, optionally filtered based on its name. More... | |
template<class Type > | |
static void | writeProperty (Ostream &os, const word &name, const Field< Type > &values, const bool nameOnly, const word &delim, const wordRes &filters=wordRes::null()) |
Write a named particle property list to stream, optionally filtered based on its name. More... | |
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... | |
template<class CloudType > | |
static void | readObjects (CloudType &c, const objectRegistry &obr) |
Read particle fields as objects from the obr registry. More... | |
template<class CloudType > | |
static void | writeObjects (const CloudType &c, objectRegistry &obr) |
Write particle fields as objects into the obr registry. 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... | |
static bool | writeLagrangianCoordinates = true |
Write particle coordinates file (v1712 and later) Default is true. More... | |
static bool | writeLagrangianPositions |
Write particle positions file (v1706 format and earlier) Default is true (disable in etc/controlDict) More... | |
Protected Member Functions | |
void | readData (Istream &is, point &position, const bool readFields, const bool newFormat, const bool doLocate) |
Read particle from stream. Optionally (for old format) return. More... | |
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 (TrackCloudType &, trackingData &, const vector &) |
Overridable function to handle the particle hitting a cyclicAMIPatch. More... | |
template<class TrackCloudType > | |
void | hitCyclicACMIPatch (TrackCloudType &, trackingData &, const vector &) |
Overridable function to handle the particle hitting a. 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... | |
template<class TrackCloudType > | |
void | hitBoundaryFace (const vector &direction, TrackCloudType &cloud, trackingData &td) |
Dispatch function for boundary face interaction. Calls one of. 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 69 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 507 of file particle.C.
Construct from a position and a cell.
Searches for the rest of the required topology.
Definition at line 530 of file particle.C.
particle | ( | const polyMesh & | mesh, |
const vector & | position, | ||
const label | celli, | ||
const label | tetFacei, | ||
const label | tetPti, | ||
const bool | doLocate = true |
||
) |
Construct from position components.
Definition at line 560 of file particle.C.
particle | ( | const polyMesh & | mesh, |
Istream & | is, | ||
const bool | readFields = true , |
||
const bool | newFormat = true , |
||
const bool | doLocate = true |
||
) |
Construct from Istream.
Definition at line 43 of file particleIO.C.
References Foam::readFields().
Construct as a copy with reference to a mesh.
Definition at line 595 of file particle.C.
Copy construct.
Definition at line 611 of file particle.C.
|
virtualdefault |
Destructor.
|
protected |
Read particle from stream. Optionally (for old format) return.
read position. Used by construct-from-Istream
Definition at line 69 of file particleIO.C.
References Istream::beginRawRead(), IOstream::check(), IOstream::checkLabelSize(), IOstream::checkScalarSize(), Istream::endRawRead(), IOstreamOption::format(), FUNCTION_NAME, Foam::expressions::Detail::nComponents(), p, Istream::read(), Foam::readFields(), Foam::readRawLabel(), and s.
Referenced by passivePositionParticle::passivePositionParticle().
|
protected |
Overridable function to handle the particle hitting a patch.
Executed before other patch-hitting functions.
Definition at line 386 of file particleTemplates.C.
|
protected |
Overridable function to handle the particle hitting a wedgePatch.
Definition at line 393 of file particleTemplates.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and td().
|
protected |
Overridable function to handle the particle hitting a.
symmetryPlanePatch
Definition at line 405 of file particleTemplates.C.
References td().
|
protected |
Overridable function to handle the particle hitting a symmetryPatch.
Definition at line 415 of file particleTemplates.C.
References Foam::I.
|
protected |
Overridable function to handle the particle hitting a cyclicPatch.
Definition at line 424 of file particleTemplates.C.
References coupledPolyPatch::forwardT(), cyclicPolyPatch::neighbPatch(), coupledPolyPatch::parallel(), Foam::foamVersion::patch, s, coupledPolyPatch::separated(), coupledPolyPatch::separation(), UList< T >::size(), Foam::T(), cyclicPolyPatch::transformGlobalFace(), and polyPatch::whichFace().
|
protected |
Overridable function to handle the particle hitting a cyclicAMIPatch.
Definition at line 466 of file particleTemplates.C.
References Foam::endl(), coupledPolyPatch::forwardT(), cyclicAMIPolyPatch::fraction(), patchIdentifier::name(), cyclicAMIPolyPatch::neighbPatch(), coupledPolyPatch::parallel(), Foam::foamVersion::patch, cyclicAMIPolyPatch::pointFace(), Foam::pos(), cyclicAMIPolyPatch::reverseTransformDirection(), s, coupledPolyPatch::separated(), coupledPolyPatch::separation(), UList< T >::size(), polyPatch::start(), Foam::T(), td(), WarningInFunction, and polyPatch::whichFace().
|
protected |
Overridable function to handle the particle hitting a.
cyclicACMIPatch
Definition at line 565 of file particleTemplates.C.
References cyclicACMIPolyPatch::mask(), cyclicACMIPolyPatch::nonOverlapPatch(), Foam::foamVersion::patch, cyclicAMIPolyPatch::pointFace(), Foam::pos(), polyPatch::start(), td(), cyclicACMIPolyPatch::tolerance(), and polyPatch::whichFace().
|
protected |
Overridable function to handle the particle hitting a processorPatch.
Definition at line 609 of file particleTemplates.C.
|
protected |
Overridable function to handle the particle hitting a wallPatch.
Definition at line 614 of file particleTemplates.C.
|
protected |
Dispatch function for boundary face interaction. Calls one of.
the above (hitWedgePatch, hitCyclicPatch etc) depending on the patch type
Definition at line 288 of file particleTemplates.C.
References p, Foam::foamVersion::patch, and td().
TypeName | ( | "particle< Type >" | ) |
Runtime type information.
|
inlinestatic |
Definition at line 455 of file particle.H.
Construct a clone.
Reimplemented in molecule, DTRMParticle, wallBoundedParticle, solidParticle, wallBoundedStreamLineParticle, streamLineParticle, trackedParticle, injectedParticle, findCellParticle, passivePositionParticle, indexedParticle, passiveParticle, and passivePositionParticle.
Definition at line 540 of file particle.H.
References autoPtr< T >::New().
Clone a particle.
Definition at line 552 of file particle.H.
References p.
Referenced by passiveParticle::clone(), indexedParticle::clone(), passivePositionParticle::clone(), findCellParticle::clone(), injectedParticle::clone(), trackedParticle::clone(), streamLineParticle::clone(), wallBoundedStreamLineParticle::clone(), solidParticle::clone(), wallBoundedParticle::clone(), DSMCParcel< ParcelType >::clone(), DTRMParticle::clone(), CollidingParcel< ParcelType >::clone(), MPPICParcel< ParcelType >::clone(), molecule::clone(), ReactingHeterogeneousParcel< ParcelType >::clone(), SprayParcel< ParcelType >::clone(), ReactingParcel< ParcelType >::clone(), ReactingMultiphaseParcel< ParcelType >::clone(), ThermoParcel< ParcelType >::clone(), and KinematicParcel< ParcelType >::clone().
Clone a particle with a mesh reference.
Definition at line 561 of file particle.H.
References particle< Type >::mesh(), and p.
|
inline |
Get unique particle creation id.
Definition at line 96 of file particleI.H.
References Foam::endl(), Foam::labelMax, and WarningInFunction.
|
inlinenoexcept |
Return the mesh database.
Definition at line 110 of file particleI.H.
Referenced by injectedParticle::clone(), particle< Type >::Clone(), and wallBoundedParticle::currentEdge().
|
inlinenoexcept |
Return current particle coordinates.
Definition at line 116 of file particleI.H.
|
inlinenoexcept |
Return current cell particle is in.
Definition at line 122 of file particleI.H.
Referenced by passivePositionParticle::writePosition().
|
inlinenoexcept |
Return current cell particle is in for manipulation.
Definition at line 128 of file particleI.H.
|
inlinenoexcept |
Return current tet face particle is in.
Definition at line 134 of file particleI.H.
Referenced by wallBoundedParticle::currentEdge().
|
inlinenoexcept |
Return current tet face particle is in for manipulation.
Definition at line 140 of file particleI.H.
|
inlinenoexcept |
Return current tet face particle is in.
Definition at line 146 of file particleI.H.
|
inlinenoexcept |
Return current tet face particle is in for manipulation.
Definition at line 152 of file particleI.H.
|
inlinenoexcept |
Return current face particle is on otherwise -1.
Definition at line 158 of file particleI.H.
|
inlinenoexcept |
Return current face particle is on for manipulation.
Definition at line 164 of file particleI.H.
|
inlinenoexcept |
Return the fraction of time-step completed.
Definition at line 170 of file particleI.H.
Referenced by streamLineParticle::move().
|
inlinenoexcept |
Return the fraction of time-step completed.
Definition at line 176 of file particleI.H.
|
inlinenoexcept |
Return the originating processor ID.
Definition at line 182 of file particleI.H.
Referenced by Foam::operator==().
|
inlinenoexcept |
Return the originating processor ID.
Definition at line 188 of file particleI.H.
|
inlinenoexcept |
Return the particle ID on the originating processor.
Definition at line 194 of file particleI.H.
Referenced by Foam::operator==(), and particle< Type >::readFields().
|
inlinenoexcept |
Return the particle ID on the originating processor.
Definition at line 200 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 206 of file particleI.H.
References TimeState::deltaTValue(), and dimensioned< Type >::value().
|
inline |
Return the current fraction within the timestep. This differs.
from the stored step fraction due to sub-cycling.
Definition at line 228 of file particleI.H.
References s.
|
inlinenoexcept |
Return indices of the current tet that the particle occupies.
Definition at line 236 of file particleI.H.
|
inline |
Return the current tet transformation tensor.
Definition at line 242 of file particleI.H.
|
inline |
The (unit) normal of the tri on tetFacei_ for the current tet.
Definition at line 253 of file particleI.H.
|
inlinenoexcept |
Is the particle on a face?
Definition at line 259 of file particleI.H.
|
inlinenoexcept |
Is the particle on an internal face?
Definition at line 265 of file particleI.H.
|
inlinenoexcept |
Is the particle on a boundary face?
Definition at line 271 of file particleI.H.
|
inline |
Return the index of patch that the particle is on.
Definition at line 277 of file particleI.H.
|
inline |
Return current particle position.
Definition at line 283 of file particleI.H.
Referenced by Foam::operator<<(), and passivePositionParticle::writePosition().
|
inline |
Reset particle data.
Definition at line 289 of file particleI.H.
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 620 of file particle.C.
References f().
Foam::scalar trackToFace | ( | const vector & | displacement, |
const scalar | fraction | ||
) |
As particle::track, but also stops on internal faces.
Definition at line 639 of file particle.C.
References Foam::endl(), f(), and WarningInFunction.
Referenced by streamLineParticle::move().
Foam::scalar trackToTri | ( | const vector & | displacement, |
const scalar | fraction, | ||
label & | tetTriI | ||
) |
As particle::trackToFace, but also stops on tet triangles. 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 1018 of file particle.C.
Foam::scalar trackToStationaryTri | ( | const vector & | displacement, |
const scalar | fraction, | ||
label & | tetTriI | ||
) |
As particle::trackToTri, but for stationary meshes.
Definition at line 695 of file particle.C.
References Foam::cmptSum(), Foam::ensightOutput::debug, Foam::endl(), Foam::mag(), Foam::max(), Foam::constant::physicoChemical::mu, Foam::Pout, VectorSpace< Form, Cmpt, Ncmpts >::replace(), Foam::T(), and Foam::y0().
Foam::scalar trackToMovingTri | ( | const vector & | displacement, |
const scalar | fraction, | ||
label & | tetTriI | ||
) |
As particle::trackToTri, but for moving meshes.
Definition at line 824 of file particle.C.
References Foam::constant::physicoChemical::b, Foam::cmptSum(), Foam::ensightOutput::debug, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::mag(), Foam::max(), Foam::constant::physicoChemical::mu, Foam::name(), Foam::nl, Foam::Pout, Foam::roots::real, VectorSpace< Form, Cmpt, Ncmpts >::replace(), Foam::sqr(), Foam::T(), cubicEqn::value(), and Foam::y0().
void hitFace | ( | const vector & | direction, |
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 345 of file particleTemplates.C.
References td().
void trackToAndHitFace | ( | const vector & | direction, |
const scalar | fraction, | ||
TrackCloudType & | cloud, | ||
trackingData & | td | ||
) |
Convenience function. Combines trackToFace and hitFace.
Definition at line 372 of file particleTemplates.C.
References td().
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 1035 of file particle.C.
References Foam::cmptMin(), Foam::meshTools::constrainToMeshCentre(), and Foam::pos().
Get the normal and velocity of the current patch location.
Definition at line 297 of file particleI.H.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, n, U, triangle< Point, PointRef >::unitNormal(), and Foam::Zero.
|
virtual |
Transform the physical properties of the particle.
according to the given transformation tensor
Reimplemented in molecule, and solidParticle.
Definition at line 1050 of file particle.C.
Referenced by solidParticle::transformProperties(), and molecule::transformProperties().
|
virtual |
Transform the physical properties of the particle.
according to the given separation vector
Reimplemented in molecule, and solidParticle.
Definition at line 1054 of file particle.C.
void prepareForParallelTransfer | ( | ) |
Convert global addressing to the processor patch local equivalents.
Definition at line 1058 of file particle.C.
References Foam::foamVersion::patch.
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 1066 of file particle.C.
References polyPatch::faceCells(), coupledPolyPatch::forwardT(), coupledPolyPatch::parallel(), s, coupledPolyPatch::separated(), coupledPolyPatch::separation(), UList< T >::size(), polyPatch::start(), and Foam::T().
Referenced by trackedParticle::correctAfterParallelTransfer().
void prepareForInteractionListReferral | ( | const vectorTensorTransform & | transform | ) |
Break the topology and store the particle position so that the.
particle can be referred.
Definition at line 1115 of file particle.C.
References Foam::cmptSum(), Foam::pos(), and Foam::transform().
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 1140 of file particle.C.
References Foam::pos(), and Foam::T().
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 1178 of file particle.C.
References polyMesh::faceOwner(), polyMesh::faces(), and UList< T >::size().
void autoMap | ( | const vector & | position, |
const mapPolyMesh & | mapper | ||
) |
Map after a topology change.
Definition at line 1204 of file particle.C.
References mapPolyMesh::reverseCellMap().
void relocate | ( | const point & | position, |
const label | celli = -1 |
||
) |
Set the addressing based on the provided position.
Definition at line 1220 of file particle.C.
Write the name representation to stream.
Definition at line 38 of file particleTemplates.C.
References Foam::name(), Foam::expressions::Detail::nComponents(), and os().
|
static |
Write a named particle property to stream, optionally filtered based on its name.
Definition at line 64 of file particleTemplates.C.
References UList< T >::empty(), wordRes::match(), Foam::name(), and os().
|
static |
Write a named particle property list to stream, optionally filtered based on its name.
Definition at line 92 of file particleTemplates.C.
References UList< T >::empty(), forAll, wordRes::match(), Foam::name(), os(), and Foam::HashTableOps::values().
|
static |
Read the fields associated with the owner cloud.
Definition at line 133 of file particleTemplates.C.
References Foam::constant::universal::c, IOobjectOption::MUST_READ, particle< Type >::origId(), p, and IOobject::typeHeaderOk().
Referenced by passivePositionParticle::passivePositionParticle(), injectedParticle::readFields(), solidParticle::readFields(), streamLineParticle::readFields(), molecule::readFields(), and wallBoundedParticle::readFields().
|
static |
Write the fields associated with the owner cloud.
Definition at line 163 of file particleTemplates.C.
References Foam::constant::universal::c, Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::nl, IOobjectOption::NO_READ, p, cloud::POSITIONS, IOPosition< CloudType >::write(), and regIOobject::write().
Referenced by injectedParticle::writeFields(), solidParticle::writeFields(), streamLineParticle::writeFields(), molecule::writeFields(), and wallBoundedParticle::writeFields().
void writeProperties | ( | Ostream & | os, |
const wordRes & | filters, | ||
const word & | delim, | ||
const bool | namesOnly | ||
) | const |
Write individual particle properties to stream.
Definition at line 213 of file particleIO.C.
References writeProp.
Referenced by injectedParticle::writeProperties().
|
static |
Read particle fields as objects from the obr registry.
Definition at line 217 of file particleTemplates.C.
References Foam::constant::universal::c, cloud::findIOPosition(), and p.
Referenced by injectedParticle::readObjects().
|
static |
Write particle fields as objects into the obr registry.
Always writes "position", not "coordinate"
Definition at line 266 of file particleTemplates.C.
References Foam::constant::universal::c, and p.
Referenced by injectedParticle::writeObjects().
void writeCoordinates | ( | Ostream & | os | ) | const |
Write the particle barycentric coordinates and cell info.
Definition at line 238 of file particleIO.C.
References IOstreamOption::ASCII, FUNCTION_NAME, os(), and token::SPACE.
|
virtual |
Write the particle position and cell id.
Reimplemented in injectedParticle, and passivePositionParticle.
Definition at line 257 of file particleIO.C.
References IOstreamOption::ASCII, IOstream::check(), IOstreamOption::format(), FUNCTION_NAME, os(), p, s, token::SPACE, and OBJstream::write().
|
static |
String representation of properties.
Definition at line 455 of file particle.H.
|
static |
Cumulative particle counter - used to provide unique ID.
Definition at line 455 of file particle.H.
|
static |
Write particle coordinates file (v1712 and later) Default is true.
Definition at line 466 of file particle.H.
Referenced by injectedParticle::writeFields().
|
static |
Write particle positions file (v1706 format and earlier) Default is true (disable in etc/controlDict)
Definition at line 472 of file particle.H.
Referenced by injectedParticle::writeFields().