62 stepFractionBehind_(0),
65 origId_(getNewParticleIndex())
74 label& nLocateBoundaryHits
77 coordinates_(- vGreat, - vGreat, - vGreat, - vGreat),
83 stepFractionBehind_(0),
86 origId_(getNewParticleIndex())
90 nLocateBoundaryHits ++;
97 coordinates_(
p.coordinates_),
99 tetFacei_(
p.tetFacei_),
102 stepFraction_(
p.stepFraction_),
103 stepFractionBehind_(
p.stepFractionBehind_),
104 nTracksBehind_(
p.nTracksBehind_),
105 origProc_(
p.origProc_),
125 coordinates_, celli_, tetFacei_, tetPti_, 1,
127 ?
static_cast<const string&
>(
string(
"Particle " +
name(origId())))
128 : NullObjectRef<string>()
136 const vector& displacement,
137 const scalar fraction
143 mesh, displacement, fraction,
144 coordinates_, celli_, tetFacei_, tetPti_, stepFraction_,
145 stepFractionBehind_, nTracksBehind_,
147 ?
static_cast<const string&
>(
string(
"Particle " +
name(origId())))
148 : NullObjectRef<string>()
151 facei_ = onBoundaryAndF.
first() ? tetFacei_ : -1;
153 return onBoundaryAndF.
second();
160 const vector& displacement,
161 const scalar fraction
167 mesh, displacement, fraction,
168 coordinates_, celli_, tetFacei_, tetPti_, stepFraction_,
169 stepFractionBehind_, nTracksBehind_,
171 ?
static_cast<const string&
>(
string(
"Particle " +
name(origId())))
172 : NullObjectRef<string>()
175 facei_ = inNextCellAndF.
first() ? tetFacei_ : -1;
177 return inNextCellAndF.
second();
184 const vector& displacement,
185 const scalar fraction
191 mesh, displacement, fraction,
192 coordinates_, celli_, tetFacei_, tetPti_, stepFraction_,
193 stepFractionBehind_, nTracksBehind_,
195 ?
static_cast<const string&
>(
string(
"Particle " +
name(origId())))
196 : NullObjectRef<string>()
199 facei_ = onFaceAndF.
first() ? tetFacei_ : -1;
201 return onFaceAndF.
second();
230 refCast<const processorPolyPatch>
242 refCast<const processorPolyPatch>
263 const label sendFromPatch,
264 const label sendToPatchFace,
265 const vector& sendToPosition
290 facei_ = sendToPatchFace;
303 const label sendToPatch,
325 patchNLocateBoundaryHits[sendToPatch] ++;
366 const vector pos(coordinates_.b(), coordinates_.c(), coordinates_.d());
383 celli_, tetFacei_, tetPti_, stepFraction_
392 const label procCell,
393 const label procTetFace
403 == (procMesh.
faceOwner()[procTetFace] == procCell)
410 return procMesh.
faces()[procTetFace].
size() - 1 - tetPti_;
void size(const label)
Override size to be inconsistent with allocated storage.
Inter-processor communications stream.
A 2-tuple for storing two objects of different types.
const Type2 & second() const
Return second.
const Type1 & first() const
Return first.
label sendFromPatch
Patch from which to send the particle.
label sendToPatch
Patch to which to send the particle.
const polyMesh & mesh
Reference to the mesh.
label origProc() const
Return the originating processor ID.
void prepareForNonConformalCyclicTransfer(const polyMesh &mesh, const label sendToPatch, const label sendToPatchFace, const vector &sendToPosition)
Make changes prior to a transfer across a non conformal cyclic.
scalar trackToCell(const polyMesh &mesh, const vector &displacement, const scalar fraction)
As particle::track, but stops when a new cell is reached.
void prepareForProcessorTransfer(trackingData &td)
Make changes prior to a transfer across a processor boundary.
particle(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti, const label facei)
Construct from components.
void correctAfterInteractionListReferral(const polyMesh &mesh, const label celli)
Correct the topology after referral. Locates the particle.
void correctAfterNonConformalCyclicTransfer(const polyMesh &mesh, const label sendToPatch, labelList &patchNLocateBoundaryHits)
Make changes following a transfer across a non conformal cyclic.
scalar track(const polyMesh &mesh, const vector &displacement, const scalar fraction)
Track along the displacement for a given fraction of the overall.
scalar trackToFace(const polyMesh &mesh, const vector &displacement, const scalar fraction)
As particle::track, but stops when a face is hit.
void prepareForInteractionListReferral(const polyMesh &mesh, const transformer &transform)
Break the topology and store the cartesian position so that the.
bool locate(const polyMesh &mesh, const vector &position, label celli)
Locate the particle at the given position.
vector deviationFromMeshCentre(const polyMesh &mesh) const
Get the displacement from the mesh centre. Used to correct the.
void correctAfterProcessorTransfer(trackingData &td)
Make changes following a transfer across a processor boundary.
label procTetPt(const polyMesh &mesh, const polyMesh &procMesh, const label procCell, const label procTetFace) const
Return the tet point appropriate for decomposition or.
vector position(const polyMesh &mesh) const
Return current particle position.
virtual void transformProperties(const transformer &)
Transform the physical properties of the particle.
label origId() const
Return the particle ID on the originating processor.
static label particleCount
Cumulative particle counter - used to provide unique ID.
Mesh consisting of general polyhedral cells.
virtual const faceList & faces() const
Return raw faces.
virtual const labelList & faceOwner() const
Return face owner.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
const Vector< label > & geometricD() const
Return the vector of geometric directions in mesh.
label start() const
Return start label of this patch in the polyMesh face list.
const cellList & cells() const
Neighbour processor patch.
virtual const transformer & transform() const
Return null transform between processor patches.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
barycentric coordinates(const polyMesh &mesh, const point &position, const label celli, const label facei, const label faceTrii, const scalar stepFraction)
Return the coordinates given the position and tet topology.
Tuple2< bool, scalar > toCell(const polyMesh &mesh, const Displacement &displacement, const scalar fraction, barycentric &coordinates, label &celli, label &facei, label &faceTrii, scalar &stepFraction, scalar &stepFractionBehind, label &nTracksBehind, const string &debugPrefix=NullObjectRef< string >())
As toFace, except that if the track ends on an internal face then this.
Tuple2< bool, scalar > toBoundary(const polyMesh &mesh, const Displacement &displacement, const scalar fraction, barycentric &coordinates, label &celli, label &facei, label &faceTrii, scalar &stepFraction, scalar &stepFractionBehind, label &nTracksBehind, const string &debugPrefix=NullObjectRef< string >())
As toFace, except that the track continues across multiple cells until.
void outProcessor(const processorPolyPatch &outPatch, barycentric &coordinates, label &celli, label &facei, label &faceTrii)
Complete crossing of a processor patch. Restore the topology.
void inProcessor(const processorPolyPatch &inPatch, label &celli, label &facei)
Initialise crossing of a processor patch. Breaks the topology in order.
point position(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label facei, const label faceTrii, const scalar stepFraction)
Return the position given the coordinates and tet topology.
Tuple2< bool, scalar > toFace(const polyMesh &mesh, const Displacement &displacement, const scalar fraction, barycentric &coordinates, label &celli, label &facei, label &faceTrii, scalar &stepFraction, scalar &stepFractionBehind, label &nTracksBehind, const string &debugPrefix=NullObjectRef< string >())
Track along the displacement for a given fraction of the overall.
bool locate(const polyMesh &mesh, const point &position, barycentric &coordinates, label &celli, label &facei, label &faceTrii, const scalar stepFraction, const string &debugPrefix=NullObjectRef< string >())
Initialise the location at the given position. Returns whether or not a.
dimensionedScalar pos(const dimensionedScalar &ds)
bool operator!=(const particle &, const particle &)
Barycentric< scalar > barycentric
A scalar version of the templated Barycentric.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
void cmptMin(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
dimensionSet transform(const dimensionSet &)
defineTypeNameAndDebug(combustionModel, 0)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
void inv(LagrangianPatchField< tensor > &f, const LagrangianPatchField< tensor > &f1)
Cmpt cmptSum(const VectorSpace< Form, Cmpt, Ncmpts > &vs)