78 start_(this->position()),
101 is >> start_ >> end_ >> level_ >> i_ >> j_ >> k_;
110 reinterpret_cast<char*
>(&start_),
126 const scalar trackTime
129 td.switchProcessor =
false;
131 scalar tEnd = (1.0 - stepFraction())*trackTime;
133 if (tEnd <= SMALL && onBoundaryFace())
140 td.keepParticle =
false;
144 td.keepParticle =
true;
146 while (
td.keepParticle && !
td.switchProcessor && stepFraction() < 1)
149 td.maxLevel_[cell()] =
max(
td.maxLevel_[cell()], level_);
151 const scalar
f = 1 - stepFraction();
152 const vector s = end_ - start_;
153 trackToAndHitFace(
f*
s,
f, cloud,
td);
157 return td.keepParticle;
174 td.keepParticle =
false;
185 td.keepParticle =
false;
196 td.keepParticle =
false;
207 td.keepParticle =
false;
219 td.keepParticle =
false;
231 td.keepParticle =
false;
242 td.switchProcessor =
true;
253 td.keepParticle =
false;
272 td.featureEdgeVisited_[featI].set(edgeI);
296 reinterpret_cast<const char*
>(&
p.start_),
Base cloud calls templated on particle type.
streamFormat format() const noexcept
Get the current stream format.
@ ASCII
"ascii" (normal default)
virtual bool check(const char *operation) const
Check IOstream status for given operation.
bool fatalCheckNativeSizes(const char *operation) const
Assert that the label/scalar byte-size associated with the stream are the native label/scalar sizes.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
virtual Istream & read(token &)=0
Return next token from stream.
virtual Ostream & write(const char c) override
Write character.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A cloud is a registry collection of lagrangian particles.
void correctAfterParallelTransfer(const label patchi, trackingData &td)
Convert processor patch addressing to the global equivalents.
vector position() const
Return current particle position.
static void readFields(TrackCloudType &c)
Read the fields associated with the owner cloud.
const polyMesh & mesh() const noexcept
Return the mesh database.
const barycentric & coordinates() const noexcept
Return current particle coordinates.
bool onBoundaryFace() const noexcept
Is the particle on a boundary face?
scalar stepFraction() const noexcept
Return the fraction of time-step completed.
void trackToAndHitFace(const vector &direction, const scalar fraction, TrackCloudType &cloud, trackingData &td)
Convenience function. Combines trackToFace and hitFace.
label cell() const noexcept
Return current cell particle is in.
particle(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti)
Construct from components.
Mesh consisting of general polyhedral cells.
Class used to pass tracking data to the trackToFace function.
Particle class that marks cells it passes through. Used to mark cells visited by feature edges.
void correctAfterParallelTransfer(const label, trackingData &)
Convert processor patch addressing to the global equivalents.
void hitWedgePatch(Cloud< trackedParticle > &, trackingData &)
Overridable function to handle the particle hitting a wedge.
bool hitPatch(Cloud< trackedParticle > &, trackingData &)
Overridable function to handle the particle hitting a patch.
label i() const noexcept
Transported label.
bool move(Cloud< trackedParticle > &, trackingData &, const scalar)
Track all particles to their end point.
point & end() noexcept
Point to track to.
void hitSymmetryPatch(Cloud< trackedParticle > &, trackingData &)
Overridable function to handle the particle hitting a.
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.
void hitSymmetryPlanePatch(Cloud< trackedParticle > &, trackingData &)
Overridable function to handle the particle hitting a.
void hitWallPatch(Cloud< trackedParticle > &, trackingData &)
Overridable function to handle the particle hitting a wallPatch.
static const std::size_t sizeofFields_
Size in bytes of the fields.
void hitCyclicACMIPatch(Cloud< trackedParticle > &, trackingData &, const vector &)
Overridable function to handle the particle hitting a cyclicACMI.
label j() const noexcept
Transported label.
void hitCyclicPatch(Cloud< trackedParticle > &, trackingData &)
Overridable function to handle the particle hitting a cyclic.
void hitProcessorPatch(Cloud< trackedParticle > &, trackingData &)
Overridable function to handle the particle hitting a processorPatch.
label k() const noexcept
Transported label.
void hitCyclicAMIPatch(Cloud< trackedParticle > &, trackingData &, const vector &)
Overridable function to handle the particle hitting a cyclicAMI.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
OBJstream os(runTime.globalPath()/outputName)
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))
wallPoints::trackData td(isBlockedFace, regionToBlockSize)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const NameMatchPredicate &selectedFields, DynamicList< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type and store on the objectRegistry.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
vector point
Point is a vector.
Barycentric< scalar > barycentric
A scalar version of the templated Barycentric.