37 const point& position,
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,
147 trackForward_(trackForward),
188 const wallBoundedStreamLineParticle&
p 191 wallBoundedParticle(
p),
192 trackForward_(
p.trackForward_),
193 lifeTime_(
p.lifeTime_),
194 sampledPositions_(
p.sampledPositions_),
195 sampledScalars_(
p.sampledScalars_),
196 sampledVectors_(
p.sampledVectors_)
214 IOField<label> lifeTime
218 c.checkFieldIOobject(
c, lifeTime);
224 c.checkFieldIOobject(
c, sampledPositions);
227 for (wallBoundedStreamLineParticle&
p :
c)
229 p.lifeTime_ = lifeTime[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 277 os << static_cast<const wallBoundedParticle&>(
p)
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.
void size(const label n)
Older name for setAddressableSize.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
void transfer(List< T > &list)
Transfer the contents of the argument List into this list and annul the argument list.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
static void writeFields(const Cloud< wallBoundedStreamLineParticle > &)
Write.
bool empty() const noexcept
True if List is empty (ie, size() is zero)
const PtrList< interpolation< vector > > & vvInterp_
IOField< vectorField > vectorFieldIOField
IO for a Field of vectorField.
static void readFields(CloudType &)
Read.
#define forAll(list, i)
Loop across all elements in list.
label lifeTime_
Lifetime of particle. Particle dies when reaches 0.
List< DynamicList< scalar > > sampledScalars_
Sampled scalars.
bool trackForward_
Track with +U or -U.
virtual bool write(const bool writeOnProc=true) const
Write using setting from DB.
void append(const T &val)
Copy append an element to the end of this list.
errorManip< error > abort(error &err)
Particle class that tracks on triangles of boundary faces. Use trackToEdge similar to trackToFace on ...
static void writeFields(const CloudType &)
Write.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
const PtrList< interpolation< scalar > > & vsInterp_
OBJstream os(runTime.globalPath()/outputName)
vector sample(trackingData &td)
DynamicList< point > sampledPositions_
Sampled positions.
static void readFields(Cloud< wallBoundedStreamLineParticle > &)
Read.
T & last()
Access last element of the list, position [size()-1].
const dimensionedScalar c
Speed of light in a vacuum.
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.
Class used to pass tracking data to the trackToEdge function.
List< DynamicList< vector > > sampledVectors_
Sampled vectors.
vector interpolateFields(const trackingData &td, const point &position, const label celli, const label facei)
vector position() const
Return current particle position.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
const interpolation< vector > & UInterp_
static constexpr const zero Zero
Global zero (0)