Go to the documentation of this file.
80 readRawScalar(is, &
soi_);
81 readRawScalar(is, &
d_);
108 c.checkFieldIOobject(
c, tag);
111 c.checkFieldIOobject(
c, soi);
114 c.checkFieldIOobject(
c, d);
117 c.checkFieldIOobject(
c,
U);
120 for (injectedParticle&
p :
c)
154 for (
const injectedParticle&
p :
c)
186 #define writeProp(Name, Value) \
187 particle::writeProperty(os, Name, Value, namesOnly, delim, filters)
206 if (!
c.size())
return;
208 const auto& tag = cloud::lookupIOField<label>(
"tag", obr);
209 const auto& soi = cloud::lookupIOField<scalar>(
"soi", obr);
210 const auto& d = cloud::lookupIOField<scalar>(
"d", obr);
211 const auto&
U = cloud::lookupIOField<vector>(
"U", obr);
229 const Cloud<injectedParticle>&
c,
236 const label np =
c.size();
238 auto& tag = cloud::createIOField<label>(
"tag", np, obr);
239 auto& soi = cloud::createIOField<scalar>(
"soi", np, obr);
240 auto& d = cloud::createIOField<scalar>(
"d", np, obr);
241 auto&
U = cloud::createIOField<vector>(
"U", np, obr);
245 for (
const injectedParticle&
p :
c)
265 positionsCompat1706
p;
269 offsetof(positionsCompat1706, facei)
270 - offsetof(positionsCompat1706, position));
272 p.position = position_;
275 os.
write(
reinterpret_cast<const char*
>(&
p.position),
s);
288 const injectedParticle&
p
295 os << static_cast<const particle&>(
p)
303 os << static_cast<const particle&>(
p);
306 reinterpret_cast<const char*
>(&
p.tag_),
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.
A primitive field of type <T> with automated input and output.
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))
static void writeFields(const Cloud< injectedParticle > &c)
static constexpr const zero Zero
streamFormat format() const noexcept
static void readObjects(CloudType &c, const objectRegistry &obr)
static void readFields(TrackCloudType &c)
static void writeFields(const TrackCloudType &c)
A class for handling character strings derived from std::string.
virtual Ostream & write(const char c)
static void readObjects(Cloud< injectedParticle > &c, const objectRegistry &obr)
Mesh consisting of general polyhedral cells.
static bool writeLagrangianPositions
void writeProperties(Ostream &os, const wordRes &filters, const word &delim, const bool namesOnly) const
Registry of regIOobjects.
static void writeObjects(const CloudType &c, objectRegistry &obr)
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()
std::enable_if< std::is_floating_point< T >::value, bool >::type checkScalarSize() const noexcept
Primarily stores particle properties so that it can be injected at a later time. Note that this store...
static void readFields(Cloud< injectedParticle > &c)
virtual bool check(const char *operation) const
#define writeProp(Name, Value)
OBJstream os(runTime.globalPath()/outputName)
static string propertyList_
injectedParticle(const polyMesh &mesh, const vector &position, const label celli=-1)
static const std::size_t sizeofFields
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const wordHashSet &selectedFields, LIFOStack< regIOobject * > &storedObjects)
static bool writeLagrangianCoordinates
@ ASCII
"ascii" (normal default)
virtual bool beginRawRead()=0
A List of wordRe with additional matching capabilities.
void writeProperties(Ostream &os, const wordRes &filters, const word &delim, const bool namesOnly) const
static void writeObjects(const Cloud< injectedParticle > &c, objectRegistry &obr)
const dimensionedScalar c
virtual void writePosition(Ostream &) const
label readRawLabel(Istream &is)
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A cell is defined as a list of faces with extra functionality.
static constexpr direction nComponents
virtual Istream & read(token &)=0