78 start_(this->position()),
101 is >> start_ >> end_ >> level_ >> i_ >> j_ >> k_;
108 readRawScalar(is, start_.data(), vector::nComponents);
109 readRawScalar(is, end_.data(), vector::nComponents);
121 reinterpret_cast<char*>(&start_),
137 const scalar trackTime
140 td.switchProcessor =
false;
142 scalar tEnd = (1.0 - stepFraction())*trackTime;
144 if (tEnd <= SMALL && onBoundaryFace())
151 td.keepParticle =
false;
155 td.keepParticle =
true;
157 while (td.keepParticle && !td.switchProcessor && stepFraction() < 1)
160 td.maxLevel_[cell()] =
max(td.maxLevel_[cell()], level_);
162 const scalar
f = 1 - stepFraction();
163 const vector s = end_ - start_;
164 trackToAndHitFace(
f*
s,
f, cloud, td);
168 return td.keepParticle;
185 td.keepParticle =
false;
196 td.keepParticle =
false;
207 td.keepParticle =
false;
218 td.keepParticle =
false;
230 td.keepParticle =
false;
242 td.keepParticle =
false;
253 td.switchProcessor =
true;
264 td.keepParticle =
false;
283 td.featureEdgeVisited_[featI].set(edgeI);
294 os << static_cast<const particle&>(
p)
304 os << static_cast<const particle&>(
p);
307 reinterpret_cast<const char*>(&
p.start_),
void hitWallPatch(Cloud< trackedParticle > &, trackingData &)
Overridable function to handle the particle hitting a wallPatch.
void correctAfterParallelTransfer(const label patchi, trackingData &td)
Convert processor patch addressing to the global equivalents.
virtual Ostream & write(const char c)
Write character.
std::enable_if< std::is_floating_point< T >::value, bool >::type checkScalarSize() const noexcept
Check if the scalar byte-size associated with the stream is the same as the given type...
virtual bool check(const char *operation) const
Check IOstream status for given operation.
void hitCyclicAMIPatch(Cloud< trackedParticle > &, trackingData &, const vector &)
Overridable function to handle the particle hitting a cyclicAMI.
bool hitPatch(Cloud< trackedParticle > &, trackingData &)
Overridable function to handle the particle hitting a patch.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
void hitCyclicACMIPatch(Cloud< trackedParticle > &, trackingData &, const vector &)
Overridable function to handle the particle hitting a cyclicACMI.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
virtual bool endRawRead()=0
End of low-level raw binary read.
label k
Boltzmann constant.
bool move(Cloud< trackedParticle > &, trackingData &, const scalar)
Track all particles to their end point.
trackedParticle(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPtI, const point &end, const label level, const label i, const label j, const label k)
Construct from components.
Particle class that marks cells it passes through. Used to mark cells visited by feature edges...
virtual Istream & read(token &)=0
Return next token from stream.
void hitSymmetryPlanePatch(Cloud< trackedParticle > &, trackingData &)
Overridable function to handle the particle hitting a.
A cloud is a registry collection of lagrangian particles.
void hitWedgePatch(Cloud< trackedParticle > &, trackingData &)
Overridable function to handle the particle hitting a wedge.
Base cloud calls templated on particle type.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
void correctAfterParallelTransfer(const label, trackingData &)
Convert processor patch addressing to the global equivalents.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
OBJstream os(runTime.globalPath()/outputName)
Class used to pass tracking data to the trackToFace function.
static const std::size_t sizeofFields_
Size in bytes of the fields.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
label readRawLabel(Istream &is)
Read raw label from binary stream.
PtrList< coordinateSystem > coordinates(solidRegions.size())
void hitSymmetryPatch(Cloud< trackedParticle > &, trackingData &)
Overridable function to handle the particle hitting a.
static void readFields(TrackCloudType &c)
Read the fields associated with the owner cloud.
virtual bool beginRawRead()=0
Start of low-level raw binary read.
void hitProcessorPatch(Cloud< trackedParticle > &, trackingData &)
Overridable function to handle the particle hitting a processorPatch.
void hitCyclicPatch(Cloud< trackedParticle > &, trackingData &)
Overridable function to handle the particle hitting a cyclic.
std::enable_if< std::is_integral< T >::value, bool >::type checkLabelSize() const noexcept
Check if the label byte-size associated with the stream is the same as the given type.
Mesh consisting of general polyhedral cells.
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const wordHashSet &selectedFields, LIFOStack< regIOobject *> &storedObjects)
Read the selected GeometricFields of the templated type.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
streamFormat format() const noexcept
Get the current stream format.