67 td.vsInterp_[i].interpolate(
position, celli, facei)
77 td.vvInterp_[i].interpolate(
position, celli, facei)
80 if (
td.vvInterp_.get(i) == &(
td.UInterp_))
102 vector U = interpolateFields(
td, localPosition_, cell(), face());
104 const scalar magU =
mag(
U);
127 const point& position,
129 const label tetFacei,
131 const label meshEdgeStart,
132 const label diagEdge,
133 const bool trackForward,
192 trackForward_(
p.trackForward_),
193 lifeTime_(
p.lifeTime_),
194 sampledPositions_(
p.sampledPositions_),
214 IOField<label> lifeTime
218 c.checkFieldIOobject(c, lifeTime);
224 c.checkFieldIOobject(c, sampledPositions);
227 for (wallBoundedStreamLineParticle&
p : c)
229 p.lifeTime_ = lifeTime[i];
230 p.sampledPositions_.transfer(sampledPositions[i]);
238 const Cloud<wallBoundedStreamLineParticle>& c
243 const label np = c.size();
245 IOField<label> lifeTime
257 for (
const wallBoundedStreamLineParticle&
p : c)
259 lifeTime[i] =
p.lifeTime_;
260 sampledPositions[i] =
p.sampledPositions_;
265 sampledPositions.write();
274 const wallBoundedStreamLineParticle&
p
Base cloud calls templated on particle type.
A primitive field of type <T> with automated input and output.
@ NO_READ
Nothing to be read.
@ MUST_READ
Reading required.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void resize(const label len)
Adjust allocated size of list.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
void size(const label n)
Older name for setAddressableSize.
A cell is defined as a list of faces with extra functionality.
A face is a list of labels corresponding to mesh vertices.
vector position() const
Return current particle position.
const polyMesh & mesh() const noexcept
Return the mesh database.
Mesh consisting of general polyhedral cells.
virtual bool write(const bool writeOnProc=true) const
Write using setting from DB.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
Particle class that tracks on triangles of boundary faces. Use trackToEdge similar to trackToFace on ...
wallBoundedParticle(const polyMesh &c, const point &position, const label celli, const label tetFacei, const label tetPti, const label meshEdgeStart, const label diagEdge)
Construct from components.
label meshEdgeStart() const noexcept
The mesh edge label or -1.
static void writeFields(const CloudType &)
Write.
label diagEdge() const noexcept
The diagonal edge label or -1.
point localPosition_
Particle position is updated locally as opposed to via track.
static void readFields(CloudType &)
Read.
Class used to pass tracking data to the trackToEdge function.
Particle class that samples fields as it passes through. Used in streamline calculation.
vector interpolateFields(const trackingData &td, const point &position, const label celli, const label facei)
static void writeFields(const Cloud< wallBoundedStreamLineParticle > &)
Write.
label lifeTime_
Lifetime of particle. Particle dies when reaches 0.
DynamicList< point > sampledPositions_
Sampled positions.
bool trackForward_
Track with +U or -U.
wallBoundedStreamLineParticle(const polyMesh &c, const point &position, const label celli, const label tetFacei, const label tetPti, const label meshEdgeStart, const label diagEdge, const bool trackForward, const label lifeTime)
Construct from components.
List< DynamicList< vector > > sampledVectors_
Sampled vectors.
vector sample(trackingData &td)
List< DynamicList< scalar > > sampledScalars_
Sampled scalars.
static void readFields(Cloud< wallBoundedStreamLineParticle > &)
Read.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
wallPoints::trackData td(isBlockedFace, regionToBlockSize)
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.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
IOField< vectorField > vectorFieldIOField
IO for a Field of vectorField.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
errorManip< error > abort(error &err)
vector point
Point is a vector.
static constexpr const zero Zero
Global zero (0).
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
#define forAll(list, i)
Loop across all elements in list.