33 const trackingData& td,
34 const point& position,
45 sampledScalars_.setSize(td.vsInterp_.size());
46 forAll(td.vsInterp_, scalarI)
48 sampledScalars_[scalarI].append
50 td.vsInterp_[scalarI].interpolate
59 sampledVectors_.setSize(td.vvInterp_.size());
60 forAll(td.vvInterp_, vectorI)
62 sampledVectors_[vectorI].append
64 td.vvInterp_[vectorI].interpolate
73 const DynamicList<vector>& U = sampledVectors_[td.UIndex_];
108 is >> lifeTime_ >> sampledPositions_ >> sampledScalars
111 sampledScalars_.setSize(sampledScalars.
size());
114 sampledScalars_[i].transfer(sampledScalars[i]);
116 sampledVectors_.setSize(sampledVectors.size());
119 sampledVectors_[i].transfer(sampledVectors[i]);
126 "streamLineParticle::streamLineParticle" 127 "(const Cloud<streamLineParticle>&, Istream&, bool)" 138 lifeTime_(p.lifeTime_),
139 sampledPositions_(p.sampledPositions_),
140 sampledScalars_(p.sampledScalars_)
169 sampledPositions_.append(
position());
177 scalar magU =
mag(U);
193 else if (subIter == 0)
228 Pout<<
"streamLineParticle: Removing stagnant particle:" 229 <<
position() <<
" sampled positions:" 230 << sampledPositions_.size() <<
endl;
237 sampledPositions_.append(
position());
242 Pout<<
"streamLineParticle: Removing particle:" <<
position()
243 <<
" sampled positions:" << sampledPositions_.size()
253 forAll(sampledScalars_, i)
259 forAll(sampledVectors_, i)
276 const scalar trackFraction,
369 bool valid = c.
size();
390 iter().lifeTime_ = lifeTime[i];
391 iter().sampledPositions_.transfer(sampledPositions[i]);
417 lifeTime[i] = iter().lifeTime_;
418 sampledPositions[i] = iter().sampledPositions_;
422 lifeTime.
write(np > 0);
423 sampledPositions.write(np > 0);
431 os << static_cast<const particle&>(
p)
438 os.
check(
"Ostream& operator<<(Ostream&, const streamLineParticle&)");
Symmetry patch for non-planar or multi-plane patches.
const scalar trackLength_
static void writeFields(const Cloud< streamLineParticle > &)
Write.
bool move(trackingData &, const scalar)
Track all particles to their end point.
const polyMesh & mesh() const
Return the mesh database.
#define forAll(list, i)
Loop across all elements in list.
List< DynamicList< vectorList > > & allVectors_
void hitSymmetryPlanePatch(const symmetryPlanePolyPatch &, trackingData &td)
Overridable function to handle the particle hitting a.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
scalar trackToFace(const vector &displacement, const scalar fraction)
As particle::track, but also stops on internal faces.
void size(const label)
Override size to be inconsistent with allocated storage.
void hitCyclicPatch(const cyclicPolyPatch &, trackingData &td)
Overridable function to handle the particle hitting a cyclic.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static void readFields(CloudType &c)
Read the fields associated with the owner cloud.
List< DynamicList< scalarList > > & allScalars_
List< vector > vectorList
A List of vectors.
bool hitPatch(const polyPatch &, trackingData &td, const label patchi, const scalar trackFraction, const tetIndices &tetIs)
Overridable function to handle the particle hitting a patch.
Neighbour processor patch.
label cell() const
Return current cell particle is in.
void hitSymmetryPatch(const symmetryPolyPatch &, trackingData &td)
Overridable function to handle the particle hitting a.
label face() const
Return current face particle is on otherwise -1.
static void writeFields(const CloudType &c)
Write the fields associated with the owner cloud.
DynamicList< vectorList > & allPositions_
particle(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti)
Construct from components.
Particle class that samples fields as it passes through. Used in streamline calculation.
scalar mag() const
The magnitude of the bounding box span.
List< scalar > scalarList
A List of scalars.
Wedge front and back plane patch.
Storage and named access for the indices of a tet which is part of the decomposition of a cell...
bool keepParticle
Flag to indicate whether to keep particle (false = delete)
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
errorManip< error > abort(error &err)
static void readFields(Cloud< streamLineParticle > &)
Read.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
bool onFace() const
Is the particle on a face?
streamLineParticle(const polyMesh &c, const vector &position, const label celli, const label lifeTime)
Construct from components.
scalar stepFraction() const
Return the fraction of time-step completed.
const boundBox & bounds() const
Return mesh bounding box.
vector point
Point is a vector.
prefixOSstream Pout(cout, "Pout")
const dimensionedScalar c
Speed of light in a vacuum.
Ostream & operator<<(Ostream &, const ensightPart &)
void checkFieldIOobject(const Cloud< ParticleType > &c, const IOField< DataType > &data) const
Check lagrangian data field.
dimensioned< scalar > mag(const dimensioned< Type > &)
void hitProcessorPatch(const processorPolyPatch &, trackingData &td)
Mesh consisting of general polyhedral cells.
bool switchProcessor
Flag to switch processor.
A patch is a list of labels that address the faces in the global face list.
virtual bool write(const bool valid=true) const
Write using setting from DB.
IOobject fieldIOobject(const word &fieldName, const IOobject::readOption r) const
Helper to construct IOobject for field and current time.
A primitive field of type <T> with automated input and output.
void hitWedgePatch(const wedgePolyPatch &, trackingData &td)
Overridable function to handle the particle hitting a wedge.
vector position() const
Return current particle position.
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
void hitWallPatch(const wallPolyPatch &, trackingData &td, const tetIndices &)
Overridable function to handle the particle hitting a wallPatch.