36 #ifndef streamlinesParticle_H
37 #define streamlinesParticle_H
53 class streamlinesParticle;
54 class streamlinesCloud;
56 Ostream&
operator<<(Ostream&,
const streamlinesParticle&);
76 #define DeclareTypeInterpolator(Type, nullArg) \
77 const PtrList<interpolation<Type>>& Type##Interp_;
79 #undef DeclareTypeInterpolator
101 #define DeclareAllTypes(Type, nullArg) \
102 List<DynamicField<Type>>& all##Type##s_;
104 #undef DeclareAllTypes
118 const bool trackForward,
119 const bool trackOutside,
120 const label nSubCycle,
121 const scalar trackLength,
134 Type##Interp_(Type##Interp),
147 , all##Type##s_(all##Type##
s)
165 label trackPartIndex_;
180 #define DeclareSampledTypes(Type, nullArg) \
181 List<DynamicField<Type>> sampled##Type##s_;
183 #undef DeclareSampledTypes
198 void endTrack(trackingData&);
208 const polyMesh& mesh,
211 label& nLocateBoundaryHits,
212 const label lifeTime,
213 const label trackIndex
260 const vector& displacement,
261 const scalar fraction,
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...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A cloud is a collection of lagrangian particles.
Abstract base class for interpolation.
vector position(const polyMesh &mesh) const
Return current particle position.
A Cloud of streamlines particles.
const interpolation< vector > & UInterp_
FOR_ALL_FIELD_TYPES(DeclareTypeInterpolator)
DynamicField< point > & allPositions_
DynamicField< scalar > & allAges_
DynamicField< label > & allTrackParts_
DynamicField< label > & allTracks_
const scalar trackLength_
trackingData(streamlinesCloud &cloud, #define TypeInterpolatorArg(Type, nullArg) const interpolation< vector > &UInterp, const bool trackForward, const bool trackOutside, const label nSubCycle, const scalar trackLength, DynamicField< point > &allPositions, DynamicField< label > &allTracks, DynamicField< label > &allTrackParts, DynamicField< scalar > &allAges #define AllTypesArg(Type, nullArg))
Construct from components.
Particle class that samples fields as it passes through. Used in streamlines calculation.
bool move(streamlinesCloud &, trackingData &)
Track all particles to their end point.
static void writeFields(const Cloud< streamlinesParticle > &)
Write.
void hitProcessorPatch(streamlinesCloud &, trackingData &)
Overridable function to handle the particle hitting a.
bool hitNonConformalCyclicPatch(const vector &displacement, const scalar fraction, const label patchi, streamlinesCloud &cloud, trackingData &td)
Overridable function to handle the particle hitting an.
void hitSymmetryPatch(streamlinesCloud &, trackingData &)
Overridable function to handle the particle hitting a.
static autoPtr< streamlinesParticle > New(Istream &is)
Construct from Istream and return.
void hitCyclicPatch(streamlinesCloud &, trackingData &)
Overridable function to handle the particle hitting a cyclic.
void hitWallPatch(streamlinesCloud &, trackingData &)
Overridable function to handle the particle hitting a wallPatch.
void hitSymmetryPlanePatch(streamlinesCloud &, trackingData &)
Overridable function to handle the particle hitting a.
static void readFields(Cloud< streamlinesParticle > &)
Read.
streamlinesParticle(const polyMesh &mesh, const vector &position, const label celli, label &nLocateBoundaryHits, const label lifeTime, const label trackIndex)
Construct from components.
virtual void transformProperties(const transformer &)
Transform the physical properties of the particle.
friend Ostream & operator<<(Ostream &, const streamlinesParticle &)
autoPtr< particle > clone() const
Construct and return a clone.
void hitWedgePatch(streamlinesCloud &, trackingData &)
Overridable function to handle the particle hitting a wedge.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
vector point
Point is a vector.
Vector< scalar > vector
A scalar version of the templated Vector.
Ostream & operator<<(Ostream &os, const fvConstraints &constraints)
#define AllTypesInit(Type, nullArg)
#define DeclareAllTypes(Type, nullArg)
#define DeclareTypeInterpolator(Type, nullArg)
#define TypeInterpolatorInit(Type, nullArg)
#define DeclareSampledTypes(Type, nullArg)
Sampled types.
#define AllTypesArg(Type, nullArg)
#define TypeInterpolatorArg(Type, nullArg)