Go to the documentation of this file.
36 const std::size_t Foam::particle::sizeofPosition
38 offsetof(particle, facei_) - offsetof(particle, coordinates_)
41 const std::size_t Foam::particle::sizeofFields
71 is >> coordinates_ >> celli_ >> tetFacei_ >> tetPti_;
74 is >> facei_ >> stepFraction_ >> origProc_ >> origId_;
91 readRawScalar(is, &stepFraction_);
102 is.
read(
reinterpret_cast<char*
>(&coordinates_), sizeofFields);
106 is.
read(
reinterpret_cast<char*
>(&coordinates_), sizeofPosition);
112 positionsCompat1706
p;
116 is >>
p.position >>
p.celli;
140 readRawScalar(is, &
p.stepFraction);
156 sizeof(positionsCompat1706)
157 - offsetof(positionsCompat1706,
position)
159 is.
read(
reinterpret_cast<char*
>(&
p.position),
s);
166 offsetof(positionsCompat1706, facei)
167 - offsetof(positionsCompat1706,
position)
169 is.
read(
reinterpret_cast<char*
>(&
p.position),
s);
176 stepFraction_ =
p.stepFraction;
177 origProc_ =
p.origProc;
187 "Particle initialised with a location outside of the mesh."
205 #define writeProp(Name, Value) \
206 particle::writeProperty(os, Name, Value, namesOnly, delim, filters)
214 writeProp(
"stepFraction", stepFraction_);
233 os.
write(
reinterpret_cast<const char*
>(&coordinates_), sizeofPosition);
249 positionsCompat1706
p;
253 offsetof(positionsCompat1706, facei)
254 - offsetof(positionsCompat1706, position)
257 p.position = position();
260 os.
write(
reinterpret_cast<const char*
>(&
p.position),
s);
285 reinterpret_cast<const char*
>(&
p.coordinates_),
286 particle::sizeofFields
void writeCoordinates(Ostream &os) const
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
A class for handling words, derived from Foam::string.
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))
streamFormat format() const noexcept
static void readFields(TrackCloudType &c)
A class for handling character strings derived from std::string.
virtual Ostream & write(const char c)
#define writeProp(Name, Value)
Mesh consisting of general polyhedral cells.
void writeProperties(Ostream &os, const wordRes &filters, const word &delim, const bool namesOnly) const
Ostream & operator<<(Ostream &, const boundaryPatch &p)
std::enable_if< std::is_integral< T >::value, bool >::type checkLabelSize() const noexcept
virtual bool endRawRead()=0
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
static string propertyList()
virtual void writePosition(Ostream &os) const
std::enable_if< std::is_floating_point< T >::value, bool >::type checkScalarSize() const noexcept
virtual bool check(const char *operation) const
OBJstream os(runTime.globalPath()/outputName)
static string propertyList_
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const wordHashSet &selectedFields, LIFOStack< regIOobject * > &storedObjects)
@ ASCII
"ascii" (normal default)
virtual bool beginRawRead()=0
Inter-processor communications stream.
A List of wordRe with additional matching capabilities.
label readRawLabel(Istream &is)
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
particle(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti)
static constexpr direction nComponents
virtual Istream & read(token &)=0