mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add objectRegistry newIOobject() helper method
- creates an IOobject at the current time instance (timeName) with
NO_READ/NO_WRITE/NO_REGISTER characteristics.
This generalises and replaces the Cloud fieldIOobject() to simplify
some common use.
// Shorter version (new):
volScalarField fld
(
mesh.newIOobject(name),
...
);
// Longer version:
volScalarField fld
(
IOobject
(
name,
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
IOobject::NO_REGISTER
),
...
);
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2019 OpenFOAM Foundation
|
Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
Copyright (C) 2015-2023 OpenCFD Ltd.
|
Copyright (C) 2015-2024 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -151,6 +151,44 @@ Foam::HashTable<Foam::wordHashSet> Foam::objectRegistry::classes() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::IOobject Foam::objectRegistry::newIOobject
|
||||||
|
(
|
||||||
|
const word& name,
|
||||||
|
IOobjectOption::readOption rOpt,
|
||||||
|
IOobjectOption::writeOption wOpt,
|
||||||
|
IOobjectOption::registerOption regOpt
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return IOobject
|
||||||
|
(
|
||||||
|
name,
|
||||||
|
time().timeName(), // instance
|
||||||
|
*this,
|
||||||
|
IOobjectOption(rOpt, wOpt, regOpt)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// FUTURE?
|
||||||
|
//
|
||||||
|
// Foam::IOobject Foam::objectRegistry::newIOobject_constant
|
||||||
|
// (
|
||||||
|
// const word& name,
|
||||||
|
// IOobjectOption::readOption rOpt,
|
||||||
|
// IOobjectOption::writeOption wOpt,
|
||||||
|
// IOobjectOption::registerOption regOpt
|
||||||
|
// ) const
|
||||||
|
// {
|
||||||
|
// return IOobject
|
||||||
|
// (
|
||||||
|
// name,
|
||||||
|
// time().constant(), // instance
|
||||||
|
// *this,
|
||||||
|
// IOobjectOption(rOpt, wOpt, regOpt)
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
Foam::label Foam::objectRegistry::count(const char* clsName) const
|
Foam::label Foam::objectRegistry::count(const char* clsName) const
|
||||||
{
|
{
|
||||||
// No nullptr check - only called with string literals
|
// No nullptr check - only called with string literals
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2019 OpenFOAM Foundation
|
Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2023 OpenCFD Ltd.
|
Copyright (C) 2016-2024 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -239,6 +239,23 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Helper Functions
|
||||||
|
|
||||||
|
//- Create an IOobject at the current time instance (timeName).
|
||||||
|
// By default the object is NO_READ/NO_WRITE/NO_REGISTER
|
||||||
|
IOobject newIOobject
|
||||||
|
(
|
||||||
|
//! The object name
|
||||||
|
const word& name,
|
||||||
|
//! The read option (default: NO_READ)
|
||||||
|
IOobjectOption::readOption rOpt = IOobjectOption::NO_READ,
|
||||||
|
//! The write option (default: NO_WRITE)
|
||||||
|
IOobjectOption::writeOption wOpt = IOobjectOption::NO_WRITE,
|
||||||
|
//! The register option (default: NO_REGISTER)
|
||||||
|
IOobjectOption::registerOption regOpt = IOobjectOption::NO_REGISTER
|
||||||
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// Summary of classes
|
// Summary of classes
|
||||||
|
|
||||||
//- A summary hash of classes used and their associated object names.
|
//- A summary hash of classes used and their associated object names.
|
||||||
|
|||||||
@ -394,14 +394,14 @@ void Foam::streamLineParticle::readFields(Cloud<streamLineParticle>& c)
|
|||||||
|
|
||||||
IOField<label> lifeTime
|
IOField<label> lifeTime
|
||||||
(
|
(
|
||||||
c.fieldIOobject("lifeTime", IOobject::MUST_READ),
|
c.newIOobject("lifeTime", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, lifeTime);
|
c.checkFieldIOobject(c, lifeTime);
|
||||||
|
|
||||||
vectorFieldIOField sampledPositions
|
vectorFieldIOField sampledPositions
|
||||||
(
|
(
|
||||||
c.fieldIOobject("sampledPositions", IOobject::MUST_READ),
|
c.newIOobject("sampledPositions", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, sampledPositions);
|
c.checkFieldIOobject(c, sampledPositions);
|
||||||
@ -425,12 +425,12 @@ void Foam::streamLineParticle::writeFields(const Cloud<streamLineParticle>& c)
|
|||||||
|
|
||||||
IOField<label> lifeTime
|
IOField<label> lifeTime
|
||||||
(
|
(
|
||||||
c.fieldIOobject("lifeTime", IOobject::NO_READ),
|
c.newIOobject("lifeTime", IOobject::NO_READ),
|
||||||
np
|
np
|
||||||
);
|
);
|
||||||
vectorFieldIOField sampledPositions
|
vectorFieldIOField sampledPositions
|
||||||
(
|
(
|
||||||
c.fieldIOobject("sampledPositions", IOobject::NO_READ),
|
c.newIOobject("sampledPositions", IOobject::NO_READ),
|
||||||
np
|
np
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -427,19 +427,19 @@ void Foam::wallBoundedParticle::readFields(TrackCloudType& c)
|
|||||||
|
|
||||||
IOField<point> localPosition
|
IOField<point> localPosition
|
||||||
(
|
(
|
||||||
c.fieldIOobject("position", IOobject::MUST_READ)
|
c.newIOobject("position", IOobject::MUST_READ)
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, localPosition);
|
c.checkFieldIOobject(c, localPosition);
|
||||||
|
|
||||||
IOField<label> meshEdgeStart
|
IOField<label> meshEdgeStart
|
||||||
(
|
(
|
||||||
c.fieldIOobject("meshEdgeStart", IOobject::MUST_READ)
|
c.newIOobject("meshEdgeStart", IOobject::MUST_READ)
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, meshEdgeStart);
|
c.checkFieldIOobject(c, meshEdgeStart);
|
||||||
|
|
||||||
IOField<label> diagEdge
|
IOField<label> diagEdge
|
||||||
(
|
(
|
||||||
c.fieldIOobject("diagEdge", IOobject::MUST_READ)
|
c.newIOobject("diagEdge", IOobject::MUST_READ)
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, diagEdge);
|
c.checkFieldIOobject(c, diagEdge);
|
||||||
|
|
||||||
@ -464,17 +464,17 @@ void Foam::wallBoundedParticle::writeFields(const TrackCloudType& c)
|
|||||||
|
|
||||||
IOField<point> localPosition
|
IOField<point> localPosition
|
||||||
(
|
(
|
||||||
c.fieldIOobject("position", IOobject::NO_READ),
|
c.newIOobject("position", IOobject::NO_READ),
|
||||||
np
|
np
|
||||||
);
|
);
|
||||||
IOField<label> meshEdgeStart
|
IOField<label> meshEdgeStart
|
||||||
(
|
(
|
||||||
c.fieldIOobject("meshEdgeStart", IOobject::NO_READ),
|
c.newIOobject("meshEdgeStart", IOobject::NO_READ),
|
||||||
np
|
np
|
||||||
);
|
);
|
||||||
IOField<label> diagEdge
|
IOField<label> diagEdge
|
||||||
(
|
(
|
||||||
c.fieldIOobject("diagEdge", IOobject::NO_READ),
|
c.newIOobject("diagEdge", IOobject::NO_READ),
|
||||||
np
|
np
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -213,13 +213,13 @@ void Foam::wallBoundedStreamLineParticle::readFields
|
|||||||
|
|
||||||
IOField<label> lifeTime
|
IOField<label> lifeTime
|
||||||
(
|
(
|
||||||
c.fieldIOobject("lifeTime", IOobject::MUST_READ)
|
c.newIOobject("lifeTime", IOobject::MUST_READ)
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, lifeTime);
|
c.checkFieldIOobject(c, lifeTime);
|
||||||
|
|
||||||
vectorFieldIOField sampledPositions
|
vectorFieldIOField sampledPositions
|
||||||
(
|
(
|
||||||
c.fieldIOobject("sampledPositions", IOobject::MUST_READ)
|
c.newIOobject("sampledPositions", IOobject::MUST_READ)
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, sampledPositions);
|
c.checkFieldIOobject(c, sampledPositions);
|
||||||
|
|
||||||
@ -244,12 +244,12 @@ void Foam::wallBoundedStreamLineParticle::writeFields
|
|||||||
|
|
||||||
IOField<label> lifeTime
|
IOField<label> lifeTime
|
||||||
(
|
(
|
||||||
c.fieldIOobject("lifeTime", IOobject::NO_READ),
|
c.newIOobject("lifeTime", IOobject::NO_READ),
|
||||||
np
|
np
|
||||||
);
|
);
|
||||||
vectorFieldIOField sampledPositions
|
vectorFieldIOField sampledPositions
|
||||||
(
|
(
|
||||||
c.fieldIOobject("sampledPositions", IOobject::NO_READ),
|
c.newIOobject("sampledPositions", IOobject::NO_READ),
|
||||||
np
|
np
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -91,15 +91,15 @@ void Foam::DSMCParcel<ParcelType>::readFields(Cloud<DSMCParcel<ParcelType>>& c)
|
|||||||
|
|
||||||
ParcelType::readFields(c);
|
ParcelType::readFields(c);
|
||||||
|
|
||||||
IOField<vector> U(c.fieldIOobject("U", IOobject::MUST_READ), readOnProc);
|
IOField<vector> U(c.newIOobject("U", IOobject::MUST_READ), readOnProc);
|
||||||
c.checkFieldIOobject(c, U);
|
c.checkFieldIOobject(c, U);
|
||||||
|
|
||||||
IOField<scalar> Ei(c.fieldIOobject("Ei", IOobject::MUST_READ), readOnProc);
|
IOField<scalar> Ei(c.newIOobject("Ei", IOobject::MUST_READ), readOnProc);
|
||||||
c.checkFieldIOobject(c, Ei);
|
c.checkFieldIOobject(c, Ei);
|
||||||
|
|
||||||
IOField<label> typeId
|
IOField<label> typeId
|
||||||
(
|
(
|
||||||
c.fieldIOobject("typeId", IOobject::MUST_READ),
|
c.newIOobject("typeId", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, typeId);
|
c.checkFieldIOobject(c, typeId);
|
||||||
@ -126,9 +126,9 @@ void Foam::DSMCParcel<ParcelType>::writeFields
|
|||||||
const label np = c.size();
|
const label np = c.size();
|
||||||
const bool writeOnProc = c.size();
|
const bool writeOnProc = c.size();
|
||||||
|
|
||||||
IOField<vector> U(c.fieldIOobject("U", IOobject::NO_READ), np);
|
IOField<vector> U(c.newIOobject("U", IOobject::NO_READ), np);
|
||||||
IOField<scalar> Ei(c.fieldIOobject("Ei", IOobject::NO_READ), np);
|
IOField<scalar> Ei(c.newIOobject("Ei", IOobject::NO_READ), np);
|
||||||
IOField<label> typeId(c.fieldIOobject("typeId", IOobject::NO_READ), np);
|
IOField<label> typeId(c.newIOobject("typeId", IOobject::NO_READ), np);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
for (const DSMCParcel<ParcelType>& p : c)
|
for (const DSMCParcel<ParcelType>& p : c)
|
||||||
|
|||||||
@ -226,13 +226,6 @@ public:
|
|||||||
|
|
||||||
// Read
|
// Read
|
||||||
|
|
||||||
//- Helper to construct IOobject for field and current time.
|
|
||||||
IOobject fieldIOobject
|
|
||||||
(
|
|
||||||
const word& fieldName,
|
|
||||||
IOobjectOption::readOption rOpt = IOobjectOption::NO_READ
|
|
||||||
) const;
|
|
||||||
|
|
||||||
//- Check lagrangian data field
|
//- Check lagrangian data field
|
||||||
template<class DataType>
|
template<class DataType>
|
||||||
void checkFieldIOobject
|
void checkFieldIOobject
|
||||||
@ -287,6 +280,20 @@ public:
|
|||||||
// Stores the particles global positions in the database
|
// Stores the particles global positions in the database
|
||||||
// for use during mapping.
|
// for use during mapping.
|
||||||
void storeGlobalPositions() const;
|
void storeGlobalPositions() const;
|
||||||
|
|
||||||
|
|
||||||
|
// Housekeeping
|
||||||
|
|
||||||
|
//- Helper to construct IOobject for field and current time.
|
||||||
|
FOAM_DEPRECATED_FOR(2024-01, "newIOobject()")
|
||||||
|
IOobject fieldIOobject
|
||||||
|
(
|
||||||
|
const word& fieldName,
|
||||||
|
IOobjectOption::readOption rOpt = IOobjectOption::NO_READ
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return this->newIOobject(fieldName, rOpt);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -177,25 +177,6 @@ Foam::Cloud<ParticleType>::Cloud
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParticleType>
|
|
||||||
Foam::IOobject Foam::Cloud<ParticleType>::fieldIOobject
|
|
||||||
(
|
|
||||||
const word& fieldName,
|
|
||||||
IOobjectOption::readOption rOpt
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
return IOobject
|
|
||||||
(
|
|
||||||
fieldName,
|
|
||||||
time().timeName(),
|
|
||||||
*this,
|
|
||||||
rOpt,
|
|
||||||
IOobjectOption::NO_WRITE,
|
|
||||||
IOobjectOption::NO_REGISTER
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
template<class DataType>
|
template<class DataType>
|
||||||
void Foam::Cloud<ParticleType>::checkFieldIOobject
|
void Foam::Cloud<ParticleType>::checkFieldIOobject
|
||||||
|
|||||||
@ -104,16 +104,16 @@ void Foam::injectedParticle::readFields(Cloud<injectedParticle>& c)
|
|||||||
|
|
||||||
particle::readFields(c);
|
particle::readFields(c);
|
||||||
|
|
||||||
IOField<label> tag(c.fieldIOobject("tag", IOobject::MUST_READ));
|
IOField<label> tag(c.newIOobject("tag", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, tag);
|
c.checkFieldIOobject(c, tag);
|
||||||
|
|
||||||
IOField<scalar> soi(c.fieldIOobject("soi", IOobject::MUST_READ));
|
IOField<scalar> soi(c.newIOobject("soi", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, soi);
|
c.checkFieldIOobject(c, soi);
|
||||||
|
|
||||||
IOField<scalar> d(c.fieldIOobject("d", IOobject::MUST_READ));
|
IOField<scalar> d(c.newIOobject("d", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, d);
|
c.checkFieldIOobject(c, d);
|
||||||
|
|
||||||
IOField<vector> U(c.fieldIOobject("U", IOobject::MUST_READ));
|
IOField<vector> U(c.newIOobject("U", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, U);
|
c.checkFieldIOobject(c, U);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
@ -144,10 +144,10 @@ void Foam::injectedParticle::writeFields(const Cloud<injectedParticle>& c)
|
|||||||
|
|
||||||
const label np = c.size();
|
const label np = c.size();
|
||||||
|
|
||||||
IOField<label> tag(c.fieldIOobject("tag", IOobject::NO_READ), np);
|
IOField<label> tag(c.newIOobject("tag", IOobject::NO_READ), np);
|
||||||
IOField<scalar> soi(c.fieldIOobject("soi", IOobject::NO_READ), np);
|
IOField<scalar> soi(c.newIOobject("soi", IOobject::NO_READ), np);
|
||||||
IOField<scalar> d(c.fieldIOobject("d", IOobject::NO_READ), np);
|
IOField<scalar> d(c.newIOobject("d", IOobject::NO_READ), np);
|
||||||
IOField<vector> U(c.fieldIOobject("U", IOobject::NO_READ), np);
|
IOField<vector> U(c.newIOobject("U", IOobject::NO_READ), np);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
|
|
||||||
|
|||||||
@ -141,7 +141,7 @@ void Foam::particle::readFields(TrackCloudType& c)
|
|||||||
{
|
{
|
||||||
const bool readOnProc = c.size();
|
const bool readOnProc = c.size();
|
||||||
|
|
||||||
IOobject procIO(c.fieldIOobject("origProcId", IOobject::MUST_READ));
|
IOobject procIO(c.newIOobject("origProcId", IOobject::MUST_READ));
|
||||||
|
|
||||||
const bool haveFile = procIO.typeHeaderOk<IOField<label>>(true);
|
const bool haveFile = procIO.typeHeaderOk<IOField<label>>(true);
|
||||||
|
|
||||||
@ -150,7 +150,7 @@ void Foam::particle::readFields(TrackCloudType& c)
|
|||||||
|
|
||||||
IOField<label> origId
|
IOField<label> origId
|
||||||
(
|
(
|
||||||
c.fieldIOobject("origId", IOobject::MUST_READ),
|
c.newIOobject("origId", IOobject::MUST_READ),
|
||||||
readOnProc && haveFile
|
readOnProc && haveFile
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, origId);
|
c.checkFieldIOobject(c, origId);
|
||||||
@ -197,12 +197,12 @@ void Foam::particle::writeFields(const TrackCloudType& c)
|
|||||||
|
|
||||||
IOField<label> origProc
|
IOField<label> origProc
|
||||||
(
|
(
|
||||||
c.fieldIOobject("origProcId", IOobject::NO_READ),
|
c.newIOobject("origProcId", IOobject::NO_READ),
|
||||||
np
|
np
|
||||||
);
|
);
|
||||||
IOField<label> origId
|
IOField<label> origId
|
||||||
(
|
(
|
||||||
c.fieldIOobject("origId", IOobject::NO_READ),
|
c.newIOobject("origId", IOobject::NO_READ),
|
||||||
np
|
np
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -101,33 +101,33 @@ void Foam::CollidingParcel<ParcelType>::readFields(CloudType& c)
|
|||||||
|
|
||||||
ParcelType::readFields(c);
|
ParcelType::readFields(c);
|
||||||
|
|
||||||
IOField<vector> f(c.fieldIOobject("f", IOobject::MUST_READ), readOnProc);
|
IOField<vector> f(c.newIOobject("f", IOobject::MUST_READ), readOnProc);
|
||||||
c.checkFieldIOobject(c, f);
|
c.checkFieldIOobject(c, f);
|
||||||
|
|
||||||
IOField<vector> angularMomentum
|
IOField<vector> angularMomentum
|
||||||
(
|
(
|
||||||
c.fieldIOobject("angularMomentum", IOobject::MUST_READ),
|
c.newIOobject("angularMomentum", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, angularMomentum);
|
c.checkFieldIOobject(c, angularMomentum);
|
||||||
|
|
||||||
IOField<vector> torque
|
IOField<vector> torque
|
||||||
(
|
(
|
||||||
c.fieldIOobject("torque", IOobject::MUST_READ),
|
c.newIOobject("torque", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, torque);
|
c.checkFieldIOobject(c, torque);
|
||||||
|
|
||||||
labelFieldCompactIOField collisionRecordsPairAccessed
|
labelFieldCompactIOField collisionRecordsPairAccessed
|
||||||
(
|
(
|
||||||
c.fieldIOobject("collisionRecordsPairAccessed", IOobject::MUST_READ),
|
c.newIOobject("collisionRecordsPairAccessed", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldFieldIOobject(c, collisionRecordsPairAccessed);
|
c.checkFieldFieldIOobject(c, collisionRecordsPairAccessed);
|
||||||
|
|
||||||
labelFieldCompactIOField collisionRecordsPairOrigProcOfOther
|
labelFieldCompactIOField collisionRecordsPairOrigProcOfOther
|
||||||
(
|
(
|
||||||
c.fieldIOobject
|
c.newIOobject
|
||||||
(
|
(
|
||||||
"collisionRecordsPairOrigProcOfOther",
|
"collisionRecordsPairOrigProcOfOther",
|
||||||
IOobject::MUST_READ
|
IOobject::MUST_READ
|
||||||
@ -138,7 +138,7 @@ void Foam::CollidingParcel<ParcelType>::readFields(CloudType& c)
|
|||||||
|
|
||||||
labelFieldCompactIOField collisionRecordsPairOrigIdOfOther
|
labelFieldCompactIOField collisionRecordsPairOrigIdOfOther
|
||||||
(
|
(
|
||||||
c.fieldIOobject
|
c.newIOobject
|
||||||
(
|
(
|
||||||
"collisionRecordsPairOrigIdOfOther",
|
"collisionRecordsPairOrigIdOfOther",
|
||||||
IOobject::MUST_READ
|
IOobject::MUST_READ
|
||||||
@ -149,28 +149,28 @@ void Foam::CollidingParcel<ParcelType>::readFields(CloudType& c)
|
|||||||
|
|
||||||
pairDataFieldCompactIOField collisionRecordsPairData
|
pairDataFieldCompactIOField collisionRecordsPairData
|
||||||
(
|
(
|
||||||
c.fieldIOobject("collisionRecordsPairData", IOobject::MUST_READ),
|
c.newIOobject("collisionRecordsPairData", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldFieldIOobject(c, collisionRecordsPairData);
|
c.checkFieldFieldIOobject(c, collisionRecordsPairData);
|
||||||
|
|
||||||
labelFieldCompactIOField collisionRecordsWallAccessed
|
labelFieldCompactIOField collisionRecordsWallAccessed
|
||||||
(
|
(
|
||||||
c.fieldIOobject("collisionRecordsWallAccessed", IOobject::MUST_READ),
|
c.newIOobject("collisionRecordsWallAccessed", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldFieldIOobject(c, collisionRecordsWallAccessed);
|
c.checkFieldFieldIOobject(c, collisionRecordsWallAccessed);
|
||||||
|
|
||||||
vectorFieldCompactIOField collisionRecordsWallPRel
|
vectorFieldCompactIOField collisionRecordsWallPRel
|
||||||
(
|
(
|
||||||
c.fieldIOobject("collisionRecordsWallPRel", IOobject::MUST_READ),
|
c.newIOobject("collisionRecordsWallPRel", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldFieldIOobject(c, collisionRecordsWallPRel);
|
c.checkFieldFieldIOobject(c, collisionRecordsWallPRel);
|
||||||
|
|
||||||
wallDataFieldCompactIOField collisionRecordsWallData
|
wallDataFieldCompactIOField collisionRecordsWallData
|
||||||
(
|
(
|
||||||
c.fieldIOobject("collisionRecordsWallData", IOobject::MUST_READ),
|
c.newIOobject("collisionRecordsWallData", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldFieldIOobject(c, collisionRecordsWallData);
|
c.checkFieldFieldIOobject(c, collisionRecordsWallData);
|
||||||
@ -209,22 +209,22 @@ void Foam::CollidingParcel<ParcelType>::writeFields(const CloudType& c)
|
|||||||
const bool writeOnProc = c.size();
|
const bool writeOnProc = c.size();
|
||||||
|
|
||||||
|
|
||||||
IOField<vector> f(c.fieldIOobject("f", IOobject::NO_READ), np);
|
IOField<vector> f(c.newIOobject("f", IOobject::NO_READ), np);
|
||||||
IOField<vector> angMom
|
IOField<vector> angMom
|
||||||
(
|
(
|
||||||
c.fieldIOobject("angularMomentum", IOobject::NO_READ),
|
c.newIOobject("angularMomentum", IOobject::NO_READ),
|
||||||
np
|
np
|
||||||
);
|
);
|
||||||
IOField<vector> torque(c.fieldIOobject("torque", IOobject::NO_READ), np);
|
IOField<vector> torque(c.newIOobject("torque", IOobject::NO_READ), np);
|
||||||
|
|
||||||
labelFieldCompactIOField collisionRecordsPairAccessed
|
labelFieldCompactIOField collisionRecordsPairAccessed
|
||||||
(
|
(
|
||||||
c.fieldIOobject("collisionRecordsPairAccessed", IOobject::NO_READ),
|
c.newIOobject("collisionRecordsPairAccessed", IOobject::NO_READ),
|
||||||
np
|
np
|
||||||
);
|
);
|
||||||
labelFieldCompactIOField collisionRecordsPairOrigProcOfOther
|
labelFieldCompactIOField collisionRecordsPairOrigProcOfOther
|
||||||
(
|
(
|
||||||
c.fieldIOobject
|
c.newIOobject
|
||||||
(
|
(
|
||||||
"collisionRecordsPairOrigProcOfOther",
|
"collisionRecordsPairOrigProcOfOther",
|
||||||
IOobject::NO_READ
|
IOobject::NO_READ
|
||||||
@ -233,27 +233,27 @@ void Foam::CollidingParcel<ParcelType>::writeFields(const CloudType& c)
|
|||||||
);
|
);
|
||||||
labelFieldCompactIOField collisionRecordsPairOrigIdOfOther
|
labelFieldCompactIOField collisionRecordsPairOrigIdOfOther
|
||||||
(
|
(
|
||||||
c.fieldIOobject("collisionRecordsPairOrigIdOfOther", IOobject::NO_READ),
|
c.newIOobject("collisionRecordsPairOrigIdOfOther", IOobject::NO_READ),
|
||||||
np
|
np
|
||||||
);
|
);
|
||||||
pairDataFieldCompactIOField collisionRecordsPairData
|
pairDataFieldCompactIOField collisionRecordsPairData
|
||||||
(
|
(
|
||||||
c.fieldIOobject("collisionRecordsPairData", IOobject::NO_READ),
|
c.newIOobject("collisionRecordsPairData", IOobject::NO_READ),
|
||||||
np
|
np
|
||||||
);
|
);
|
||||||
labelFieldCompactIOField collisionRecordsWallAccessed
|
labelFieldCompactIOField collisionRecordsWallAccessed
|
||||||
(
|
(
|
||||||
c.fieldIOobject("collisionRecordsWallAccessed", IOobject::NO_READ),
|
c.newIOobject("collisionRecordsWallAccessed", IOobject::NO_READ),
|
||||||
np
|
np
|
||||||
);
|
);
|
||||||
vectorFieldCompactIOField collisionRecordsWallPRel
|
vectorFieldCompactIOField collisionRecordsWallPRel
|
||||||
(
|
(
|
||||||
c.fieldIOobject("collisionRecordsWallPRel", IOobject::NO_READ),
|
c.newIOobject("collisionRecordsWallPRel", IOobject::NO_READ),
|
||||||
np
|
np
|
||||||
);
|
);
|
||||||
wallDataFieldCompactIOField collisionRecordsWallData
|
wallDataFieldCompactIOField collisionRecordsWallData
|
||||||
(
|
(
|
||||||
c.fieldIOobject("collisionRecordsWallData", IOobject::NO_READ),
|
c.newIOobject("collisionRecordsWallData", IOobject::NO_READ),
|
||||||
np
|
np
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -126,77 +126,77 @@ void Foam::KinematicParcel<ParcelType>::readFields(CloudType& c)
|
|||||||
|
|
||||||
IOField<label> active
|
IOField<label> active
|
||||||
(
|
(
|
||||||
c.fieldIOobject("active", IOobject::MUST_READ),
|
c.newIOobject("active", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, active);
|
c.checkFieldIOobject(c, active);
|
||||||
|
|
||||||
IOField<label> typeId
|
IOField<label> typeId
|
||||||
(
|
(
|
||||||
c.fieldIOobject("typeId", IOobject::MUST_READ),
|
c.newIOobject("typeId", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, typeId);
|
c.checkFieldIOobject(c, typeId);
|
||||||
|
|
||||||
IOField<scalar> nParticle
|
IOField<scalar> nParticle
|
||||||
(
|
(
|
||||||
c.fieldIOobject("nParticle", IOobject::MUST_READ),
|
c.newIOobject("nParticle", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, nParticle);
|
c.checkFieldIOobject(c, nParticle);
|
||||||
|
|
||||||
IOField<scalar> d
|
IOField<scalar> d
|
||||||
(
|
(
|
||||||
c.fieldIOobject("d", IOobject::MUST_READ),
|
c.newIOobject("d", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, d);
|
c.checkFieldIOobject(c, d);
|
||||||
|
|
||||||
IOField<scalar> dTarget
|
IOField<scalar> dTarget
|
||||||
(
|
(
|
||||||
c.fieldIOobject("dTarget", IOobject::MUST_READ),
|
c.newIOobject("dTarget", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, dTarget);
|
c.checkFieldIOobject(c, dTarget);
|
||||||
|
|
||||||
IOField<vector> U
|
IOField<vector> U
|
||||||
(
|
(
|
||||||
c.fieldIOobject("U", IOobject::MUST_READ),
|
c.newIOobject("U", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, U);
|
c.checkFieldIOobject(c, U);
|
||||||
|
|
||||||
IOField<scalar> rho
|
IOField<scalar> rho
|
||||||
(
|
(
|
||||||
c.fieldIOobject("rho", IOobject::MUST_READ),
|
c.newIOobject("rho", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, rho);
|
c.checkFieldIOobject(c, rho);
|
||||||
|
|
||||||
IOField<scalar> age
|
IOField<scalar> age
|
||||||
(
|
(
|
||||||
c.fieldIOobject("age", IOobject::MUST_READ),
|
c.newIOobject("age", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, age);
|
c.checkFieldIOobject(c, age);
|
||||||
|
|
||||||
IOField<scalar> tTurb
|
IOField<scalar> tTurb
|
||||||
(
|
(
|
||||||
c.fieldIOobject("tTurb", IOobject::MUST_READ),
|
c.newIOobject("tTurb", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, tTurb);
|
c.checkFieldIOobject(c, tTurb);
|
||||||
|
|
||||||
IOField<vector> UTurb
|
IOField<vector> UTurb
|
||||||
(
|
(
|
||||||
c.fieldIOobject("UTurb", IOobject::MUST_READ),
|
c.newIOobject("UTurb", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, UTurb);
|
c.checkFieldIOobject(c, UTurb);
|
||||||
|
|
||||||
IOField<vector> UCorrect
|
IOField<vector> UCorrect
|
||||||
(
|
(
|
||||||
c.fieldIOobject("UCorrect", IOobject::MUST_READ),
|
c.newIOobject("UCorrect", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, UCorrect);
|
c.checkFieldIOobject(c, UCorrect);
|
||||||
@ -231,21 +231,21 @@ void Foam::KinematicParcel<ParcelType>::writeFields(const CloudType& c)
|
|||||||
const label np = c.size();
|
const label np = c.size();
|
||||||
const bool writeOnProc = c.size();
|
const bool writeOnProc = c.size();
|
||||||
|
|
||||||
IOField<label> active(c.fieldIOobject("active", IOobject::NO_READ), np);
|
IOField<label> active(c.newIOobject("active", IOobject::NO_READ), np);
|
||||||
IOField<label> typeId(c.fieldIOobject("typeId", IOobject::NO_READ), np);
|
IOField<label> typeId(c.newIOobject("typeId", IOobject::NO_READ), np);
|
||||||
IOField<scalar> nParticle
|
IOField<scalar> nParticle
|
||||||
(
|
(
|
||||||
c.fieldIOobject("nParticle", IOobject::NO_READ),
|
c.newIOobject("nParticle", IOobject::NO_READ),
|
||||||
np
|
np
|
||||||
);
|
);
|
||||||
IOField<scalar> d(c.fieldIOobject("d", IOobject::NO_READ), np);
|
IOField<scalar> d(c.newIOobject("d", IOobject::NO_READ), np);
|
||||||
IOField<scalar> dTarget(c.fieldIOobject("dTarget", IOobject::NO_READ), np);
|
IOField<scalar> dTarget(c.newIOobject("dTarget", IOobject::NO_READ), np);
|
||||||
IOField<vector> U(c.fieldIOobject("U", IOobject::NO_READ), np);
|
IOField<vector> U(c.newIOobject("U", IOobject::NO_READ), np);
|
||||||
IOField<scalar> rho(c.fieldIOobject("rho", IOobject::NO_READ), np);
|
IOField<scalar> rho(c.newIOobject("rho", IOobject::NO_READ), np);
|
||||||
IOField<scalar> age(c.fieldIOobject("age", IOobject::NO_READ), np);
|
IOField<scalar> age(c.newIOobject("age", IOobject::NO_READ), np);
|
||||||
IOField<scalar> tTurb(c.fieldIOobject("tTurb", IOobject::NO_READ), np);
|
IOField<scalar> tTurb(c.newIOobject("tTurb", IOobject::NO_READ), np);
|
||||||
IOField<vector> UTurb(c.fieldIOobject("UTurb", IOobject::NO_READ), np);
|
IOField<vector> UTurb(c.newIOobject("UTurb", IOobject::NO_READ), np);
|
||||||
IOField<vector> UCorrect(c.fieldIOobject("UCorrect", IOobject::NO_READ), np);
|
IOField<vector> UCorrect(c.newIOobject("UCorrect", IOobject::NO_READ), np);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
|
|
||||||
|
|||||||
@ -94,7 +94,7 @@ void Foam::MPPICParcel<ParcelType>::readFields(CloudType& c)
|
|||||||
|
|
||||||
IOField<vector> UCorrect
|
IOField<vector> UCorrect
|
||||||
(
|
(
|
||||||
c.fieldIOobject("UCorrect", IOobject::MUST_READ),
|
c.newIOobject("UCorrect", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, UCorrect);
|
c.checkFieldIOobject(c, UCorrect);
|
||||||
@ -118,8 +118,7 @@ void Foam::MPPICParcel<ParcelType>::writeFields(const CloudType& c)
|
|||||||
const label np = c.size();
|
const label np = c.size();
|
||||||
const bool writeOnProc = c.size();
|
const bool writeOnProc = c.size();
|
||||||
|
|
||||||
IOField<vector>
|
IOField<vector> UCorrect(c.newIOobject("UCorrect", IOobject::NO_READ), np);
|
||||||
UCorrect(c.fieldIOobject("UCorrect", IOobject::NO_READ), np);
|
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
|
|
||||||
|
|||||||
@ -93,7 +93,7 @@ void Foam::ReactingHeterogeneousParcel<ParcelType>::readFields
|
|||||||
|
|
||||||
IOField<scalar> mass0
|
IOField<scalar> mass0
|
||||||
(
|
(
|
||||||
c.fieldIOobject("mass0", IOobject::MUST_READ),
|
c.newIOobject("mass0", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, mass0);
|
c.checkFieldIOobject(c, mass0);
|
||||||
@ -123,7 +123,7 @@ void Foam::ReactingHeterogeneousParcel<ParcelType>::readFields
|
|||||||
// Read F
|
// Read F
|
||||||
IOField<scalar> F
|
IOField<scalar> F
|
||||||
(
|
(
|
||||||
c.fieldIOobject
|
c.newIOobject
|
||||||
(
|
(
|
||||||
"F" + name(i),
|
"F" + name(i),
|
||||||
IOobject::MUST_READ
|
IOobject::MUST_READ
|
||||||
@ -144,7 +144,7 @@ void Foam::ReactingHeterogeneousParcel<ParcelType>::readFields
|
|||||||
{
|
{
|
||||||
IOField<scalar> Y
|
IOField<scalar> Y
|
||||||
(
|
(
|
||||||
c.fieldIOobject
|
c.newIOobject
|
||||||
(
|
(
|
||||||
"Y" + solidNames[j],
|
"Y" + solidNames[j],
|
||||||
IOobject::MUST_READ
|
IOobject::MUST_READ
|
||||||
@ -188,7 +188,7 @@ void Foam::ReactingHeterogeneousParcel<ParcelType>::writeFields
|
|||||||
const label np = c.size();
|
const label np = c.size();
|
||||||
const bool writeOnProc = c.size();
|
const bool writeOnProc = c.size();
|
||||||
|
|
||||||
IOField<scalar> mass0(c.fieldIOobject("mass0", IOobject::NO_READ), np);
|
IOField<scalar> mass0(c.newIOobject("mass0", IOobject::NO_READ), np);
|
||||||
|
|
||||||
label nF = 0;
|
label nF = 0;
|
||||||
label i = 0;
|
label i = 0;
|
||||||
@ -208,7 +208,7 @@ void Foam::ReactingHeterogeneousParcel<ParcelType>::writeFields
|
|||||||
{
|
{
|
||||||
IOField<scalar> F
|
IOField<scalar> F
|
||||||
(
|
(
|
||||||
c.fieldIOobject
|
c.newIOobject
|
||||||
(
|
(
|
||||||
"F" + name(i),
|
"F" + name(i),
|
||||||
IOobject::NO_READ
|
IOobject::NO_READ
|
||||||
@ -231,7 +231,7 @@ void Foam::ReactingHeterogeneousParcel<ParcelType>::writeFields
|
|||||||
{
|
{
|
||||||
IOField<scalar> Y
|
IOField<scalar> Y
|
||||||
(
|
(
|
||||||
c.fieldIOobject
|
c.newIOobject
|
||||||
(
|
(
|
||||||
"Y" + solidNames[j],
|
"Y" + solidNames[j],
|
||||||
IOobject::NO_READ
|
IOobject::NO_READ
|
||||||
|
|||||||
@ -119,7 +119,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
|
|||||||
{
|
{
|
||||||
IOField<scalar> YGas
|
IOField<scalar> YGas
|
||||||
(
|
(
|
||||||
c.fieldIOobject
|
c.newIOobject
|
||||||
(
|
(
|
||||||
"Y" + gasNames[j] + stateLabels[idGas],
|
"Y" + gasNames[j] + stateLabels[idGas],
|
||||||
IOobject::MUST_READ
|
IOobject::MUST_READ
|
||||||
@ -139,7 +139,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
|
|||||||
{
|
{
|
||||||
IOField<scalar> YLiquid
|
IOField<scalar> YLiquid
|
||||||
(
|
(
|
||||||
c.fieldIOobject
|
c.newIOobject
|
||||||
(
|
(
|
||||||
"Y" + liquidNames[j] + stateLabels[idLiquid],
|
"Y" + liquidNames[j] + stateLabels[idLiquid],
|
||||||
IOobject::MUST_READ
|
IOobject::MUST_READ
|
||||||
@ -159,7 +159,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
|
|||||||
{
|
{
|
||||||
IOField<scalar> YSolid
|
IOField<scalar> YSolid
|
||||||
(
|
(
|
||||||
c.fieldIOobject
|
c.newIOobject
|
||||||
(
|
(
|
||||||
"Y" + solidNames[j] + stateLabels[idSolid],
|
"Y" + solidNames[j] + stateLabels[idSolid],
|
||||||
IOobject::MUST_READ
|
IOobject::MUST_READ
|
||||||
@ -208,7 +208,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields
|
|||||||
{
|
{
|
||||||
IOField<scalar> YGas
|
IOField<scalar> YGas
|
||||||
(
|
(
|
||||||
c.fieldIOobject
|
c.newIOobject
|
||||||
(
|
(
|
||||||
"Y" + gasNames[j] + stateLabels[idGas],
|
"Y" + gasNames[j] + stateLabels[idGas],
|
||||||
IOobject::NO_READ
|
IOobject::NO_READ
|
||||||
@ -232,7 +232,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields
|
|||||||
{
|
{
|
||||||
IOField<scalar> YLiquid
|
IOField<scalar> YLiquid
|
||||||
(
|
(
|
||||||
c.fieldIOobject
|
c.newIOobject
|
||||||
(
|
(
|
||||||
"Y" + liquidNames[j] + stateLabels[idLiquid],
|
"Y" + liquidNames[j] + stateLabels[idLiquid],
|
||||||
IOobject::NO_READ
|
IOobject::NO_READ
|
||||||
@ -256,7 +256,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields
|
|||||||
{
|
{
|
||||||
IOField<scalar> YSolid
|
IOField<scalar> YSolid
|
||||||
(
|
(
|
||||||
c.fieldIOobject
|
c.newIOobject
|
||||||
(
|
(
|
||||||
"Y" + solidNames[j] + stateLabels[idSolid],
|
"Y" + solidNames[j] + stateLabels[idSolid],
|
||||||
IOobject::NO_READ
|
IOobject::NO_READ
|
||||||
|
|||||||
@ -112,7 +112,7 @@ void Foam::ReactingParcel<ParcelType>::readFields
|
|||||||
|
|
||||||
IOField<scalar> mass0
|
IOField<scalar> mass0
|
||||||
(
|
(
|
||||||
c.fieldIOobject("mass0", IOobject::MUST_READ),
|
c.newIOobject("mass0", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, mass0);
|
c.checkFieldIOobject(c, mass0);
|
||||||
@ -146,7 +146,7 @@ void Foam::ReactingParcel<ParcelType>::readFields
|
|||||||
{
|
{
|
||||||
IOField<scalar> Y
|
IOField<scalar> Y
|
||||||
(
|
(
|
||||||
c.fieldIOobject
|
c.newIOobject
|
||||||
(
|
(
|
||||||
"Y" + phaseTypes[j] + stateLabels[j],
|
"Y" + phaseTypes[j] + stateLabels[j],
|
||||||
IOobject::MUST_READ
|
IOobject::MUST_READ
|
||||||
@ -187,7 +187,7 @@ void Foam::ReactingParcel<ParcelType>::writeFields
|
|||||||
const bool writeOnProc = c.size();
|
const bool writeOnProc = c.size();
|
||||||
|
|
||||||
{
|
{
|
||||||
IOField<scalar> mass0(c.fieldIOobject("mass0", IOobject::NO_READ), np);
|
IOField<scalar> mass0(c.newIOobject("mass0", IOobject::NO_READ), np);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
for (const ReactingParcel<ParcelType>& p : c)
|
for (const ReactingParcel<ParcelType>& p : c)
|
||||||
@ -210,7 +210,7 @@ void Foam::ReactingParcel<ParcelType>::writeFields
|
|||||||
{
|
{
|
||||||
IOField<scalar> Y
|
IOField<scalar> Y
|
||||||
(
|
(
|
||||||
c.fieldIOobject
|
c.newIOobject
|
||||||
(
|
(
|
||||||
"Y" + phaseTypes[j] + stateLabels[j],
|
"Y" + phaseTypes[j] + stateLabels[j],
|
||||||
IOobject::NO_READ
|
IOobject::NO_READ
|
||||||
|
|||||||
@ -94,10 +94,10 @@ void Foam::ThermoParcel<ParcelType>::readFields(CloudType& c)
|
|||||||
|
|
||||||
ParcelType::readFields(c);
|
ParcelType::readFields(c);
|
||||||
|
|
||||||
IOField<scalar> T(c.fieldIOobject("T", IOobject::MUST_READ), readOnProc);
|
IOField<scalar> T(c.newIOobject("T", IOobject::MUST_READ), readOnProc);
|
||||||
c.checkFieldIOobject(c, T);
|
c.checkFieldIOobject(c, T);
|
||||||
|
|
||||||
IOField<scalar> Cp(c.fieldIOobject("Cp", IOobject::MUST_READ), readOnProc);
|
IOField<scalar> Cp(c.newIOobject("Cp", IOobject::MUST_READ), readOnProc);
|
||||||
c.checkFieldIOobject(c, Cp);
|
c.checkFieldIOobject(c, Cp);
|
||||||
|
|
||||||
|
|
||||||
@ -121,8 +121,8 @@ void Foam::ThermoParcel<ParcelType>::writeFields(const CloudType& c)
|
|||||||
const label np = c.size();
|
const label np = c.size();
|
||||||
const bool writeOnProc = c.size();
|
const bool writeOnProc = c.size();
|
||||||
|
|
||||||
IOField<scalar> T(c.fieldIOobject("T", IOobject::NO_READ), np);
|
IOField<scalar> T(c.newIOobject("T", IOobject::NO_READ), np);
|
||||||
IOField<scalar> Cp(c.fieldIOobject("Cp", IOobject::NO_READ), np);
|
IOField<scalar> Cp(c.newIOobject("Cp", IOobject::NO_READ), np);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
for (const ThermoParcel<ParcelType>& p : c)
|
for (const ThermoParcel<ParcelType>& p : c)
|
||||||
|
|||||||
@ -114,40 +114,40 @@ void Foam::molecule::readFields(Cloud<molecule>& mC)
|
|||||||
|
|
||||||
particle::readFields(mC);
|
particle::readFields(mC);
|
||||||
|
|
||||||
IOField<tensor> Q(mC.fieldIOobject("Q", IOobject::MUST_READ), readOnProc);
|
IOField<tensor> Q(mC.newIOobject("Q", IOobject::MUST_READ), readOnProc);
|
||||||
mC.checkFieldIOobject(mC, Q);
|
mC.checkFieldIOobject(mC, Q);
|
||||||
|
|
||||||
IOField<vector> v(mC.fieldIOobject("v", IOobject::MUST_READ), readOnProc);
|
IOField<vector> v(mC.newIOobject("v", IOobject::MUST_READ), readOnProc);
|
||||||
mC.checkFieldIOobject(mC, v);
|
mC.checkFieldIOobject(mC, v);
|
||||||
|
|
||||||
IOField<vector> a(mC.fieldIOobject("a", IOobject::MUST_READ), readOnProc);
|
IOField<vector> a(mC.newIOobject("a", IOobject::MUST_READ), readOnProc);
|
||||||
mC.checkFieldIOobject(mC, a);
|
mC.checkFieldIOobject(mC, a);
|
||||||
|
|
||||||
IOField<vector> pi(mC.fieldIOobject("pi", IOobject::MUST_READ), readOnProc);
|
IOField<vector> pi(mC.newIOobject("pi", IOobject::MUST_READ), readOnProc);
|
||||||
mC.checkFieldIOobject(mC, pi);
|
mC.checkFieldIOobject(mC, pi);
|
||||||
|
|
||||||
IOField<vector> tau
|
IOField<vector> tau
|
||||||
(
|
(
|
||||||
mC.fieldIOobject("tau", IOobject::MUST_READ),
|
mC.newIOobject("tau", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
mC.checkFieldIOobject(mC, tau);
|
mC.checkFieldIOobject(mC, tau);
|
||||||
|
|
||||||
IOField<vector> specialPosition
|
IOField<vector> specialPosition
|
||||||
(
|
(
|
||||||
mC.fieldIOobject("specialPosition", IOobject::MUST_READ),
|
mC.newIOobject("specialPosition", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
mC.checkFieldIOobject(mC, specialPosition);
|
mC.checkFieldIOobject(mC, specialPosition);
|
||||||
|
|
||||||
IOField<label> special
|
IOField<label> special
|
||||||
(
|
(
|
||||||
mC.fieldIOobject("special", IOobject::MUST_READ),
|
mC.newIOobject("special", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
mC.checkFieldIOobject(mC, special);
|
mC.checkFieldIOobject(mC, special);
|
||||||
|
|
||||||
IOField<label> id(mC.fieldIOobject("id", IOobject::MUST_READ), readOnProc);
|
IOField<label> id(mC.newIOobject("id", IOobject::MUST_READ), readOnProc);
|
||||||
mC.checkFieldIOobject(mC, id);
|
mC.checkFieldIOobject(mC, id);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
@ -174,48 +174,48 @@ void Foam::molecule::writeFields(const Cloud<molecule>& mC)
|
|||||||
const label np = mC.size();
|
const label np = mC.size();
|
||||||
const bool writeOnProc = mC.size();
|
const bool writeOnProc = mC.size();
|
||||||
|
|
||||||
IOField<tensor> Q(mC.fieldIOobject("Q", IOobject::NO_READ), np);
|
IOField<tensor> Q(mC.newIOobject("Q", IOobject::NO_READ), np);
|
||||||
IOField<vector> v(mC.fieldIOobject("v", IOobject::NO_READ), np);
|
IOField<vector> v(mC.newIOobject("v", IOobject::NO_READ), np);
|
||||||
IOField<vector> a(mC.fieldIOobject("a", IOobject::NO_READ), np);
|
IOField<vector> a(mC.newIOobject("a", IOobject::NO_READ), np);
|
||||||
IOField<vector> pi(mC.fieldIOobject("pi", IOobject::NO_READ), np);
|
IOField<vector> pi(mC.newIOobject("pi", IOobject::NO_READ), np);
|
||||||
IOField<vector> tau(mC.fieldIOobject("tau", IOobject::NO_READ), np);
|
IOField<vector> tau(mC.newIOobject("tau", IOobject::NO_READ), np);
|
||||||
IOField<vector> specialPosition
|
IOField<vector> specialPosition
|
||||||
(
|
(
|
||||||
mC.fieldIOobject("specialPosition", IOobject::NO_READ),
|
mC.newIOobject("specialPosition", IOobject::NO_READ),
|
||||||
np
|
np
|
||||||
);
|
);
|
||||||
IOField<label> special(mC.fieldIOobject("special", IOobject::NO_READ), np);
|
IOField<label> special(mC.newIOobject("special", IOobject::NO_READ), np);
|
||||||
IOField<label> id(mC.fieldIOobject("id", IOobject::NO_READ), np);
|
IOField<label> id(mC.newIOobject("id", IOobject::NO_READ), np);
|
||||||
|
|
||||||
// Post processing fields
|
// Post processing fields
|
||||||
|
|
||||||
IOField<vector> piGlobal
|
IOField<vector> piGlobal
|
||||||
(
|
(
|
||||||
mC.fieldIOobject("piGlobal", IOobject::NO_READ),
|
mC.newIOobject("piGlobal", IOobject::NO_READ),
|
||||||
np
|
np
|
||||||
);
|
);
|
||||||
|
|
||||||
IOField<vector> tauGlobal
|
IOField<vector> tauGlobal
|
||||||
(
|
(
|
||||||
mC.fieldIOobject("tauGlobal", IOobject::NO_READ),
|
mC.newIOobject("tauGlobal", IOobject::NO_READ),
|
||||||
np
|
np
|
||||||
);
|
);
|
||||||
|
|
||||||
IOField<vector> orientation1
|
IOField<vector> orientation1
|
||||||
(
|
(
|
||||||
mC.fieldIOobject("orientation1", IOobject::NO_READ),
|
mC.newIOobject("orientation1", IOobject::NO_READ),
|
||||||
np
|
np
|
||||||
);
|
);
|
||||||
|
|
||||||
IOField<vector> orientation2
|
IOField<vector> orientation2
|
||||||
(
|
(
|
||||||
mC.fieldIOobject("orientation2", IOobject::NO_READ),
|
mC.newIOobject("orientation2", IOobject::NO_READ),
|
||||||
np
|
np
|
||||||
);
|
);
|
||||||
|
|
||||||
IOField<vector> orientation3
|
IOField<vector> orientation3
|
||||||
(
|
(
|
||||||
mC.fieldIOobject("orientation3", IOobject::NO_READ),
|
mC.newIOobject("orientation3", IOobject::NO_READ),
|
||||||
np
|
np
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -82,10 +82,10 @@ void Foam::solidParticle::readFields(Cloud<solidParticle>& c)
|
|||||||
|
|
||||||
particle::readFields(c);
|
particle::readFields(c);
|
||||||
|
|
||||||
IOField<scalar> d(c.fieldIOobject("d", IOobject::MUST_READ), readOnProc);
|
IOField<scalar> d(c.newIOobject("d", IOobject::MUST_READ), readOnProc);
|
||||||
c.checkFieldIOobject(c, d);
|
c.checkFieldIOobject(c, d);
|
||||||
|
|
||||||
IOField<vector> U(c.fieldIOobject("U", IOobject::MUST_READ), readOnProc);
|
IOField<vector> U(c.newIOobject("U", IOobject::MUST_READ), readOnProc);
|
||||||
c.checkFieldIOobject(c, U);
|
c.checkFieldIOobject(c, U);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
@ -105,8 +105,8 @@ void Foam::solidParticle::writeFields(const Cloud<solidParticle>& c)
|
|||||||
const label np = c.size();
|
const label np = c.size();
|
||||||
const bool writeOnProc = c.size();
|
const bool writeOnProc = c.size();
|
||||||
|
|
||||||
IOField<scalar> d(c.fieldIOobject("d", IOobject::NO_READ), np);
|
IOField<scalar> d(c.newIOobject("d", IOobject::NO_READ), np);
|
||||||
IOField<vector> U(c.fieldIOobject("U", IOobject::NO_READ), np);
|
IOField<vector> U(c.newIOobject("U", IOobject::NO_READ), np);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
for (const solidParticle& p : c)
|
for (const solidParticle& p : c)
|
||||||
|
|||||||
@ -139,85 +139,85 @@ void Foam::SprayParcel<ParcelType>::readFields
|
|||||||
|
|
||||||
ParcelType::readFields(c, compModel);
|
ParcelType::readFields(c, compModel);
|
||||||
|
|
||||||
IOField<scalar> d0(c.fieldIOobject("d0", IOobject::MUST_READ), readOnProc);
|
IOField<scalar> d0(c.newIOobject("d0", IOobject::MUST_READ), readOnProc);
|
||||||
c.checkFieldIOobject(c, d0);
|
c.checkFieldIOobject(c, d0);
|
||||||
|
|
||||||
IOField<vector> position0
|
IOField<vector> position0
|
||||||
(
|
(
|
||||||
c.fieldIOobject("position0", IOobject::MUST_READ),
|
c.newIOobject("position0", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, position0);
|
c.checkFieldIOobject(c, position0);
|
||||||
|
|
||||||
IOField<scalar> sigma
|
IOField<scalar> sigma
|
||||||
(
|
(
|
||||||
c.fieldIOobject("sigma", IOobject::MUST_READ),
|
c.newIOobject("sigma", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, sigma);
|
c.checkFieldIOobject(c, sigma);
|
||||||
|
|
||||||
IOField<scalar> mu(c.fieldIOobject("mu", IOobject::MUST_READ), readOnProc);
|
IOField<scalar> mu(c.newIOobject("mu", IOobject::MUST_READ), readOnProc);
|
||||||
c.checkFieldIOobject(c, mu);
|
c.checkFieldIOobject(c, mu);
|
||||||
|
|
||||||
IOField<scalar> liquidCore
|
IOField<scalar> liquidCore
|
||||||
(
|
(
|
||||||
c.fieldIOobject("liquidCore", IOobject::MUST_READ),
|
c.newIOobject("liquidCore", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, liquidCore);
|
c.checkFieldIOobject(c, liquidCore);
|
||||||
|
|
||||||
IOField<scalar> KHindex
|
IOField<scalar> KHindex
|
||||||
(
|
(
|
||||||
c.fieldIOobject("KHindex", IOobject::MUST_READ),
|
c.newIOobject("KHindex", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, KHindex);
|
c.checkFieldIOobject(c, KHindex);
|
||||||
|
|
||||||
IOField<scalar> y
|
IOField<scalar> y
|
||||||
(
|
(
|
||||||
c.fieldIOobject("y", IOobject::MUST_READ),
|
c.newIOobject("y", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, y);
|
c.checkFieldIOobject(c, y);
|
||||||
|
|
||||||
IOField<scalar> yDot
|
IOField<scalar> yDot
|
||||||
(
|
(
|
||||||
c.fieldIOobject("yDot", IOobject::MUST_READ),
|
c.newIOobject("yDot", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, yDot);
|
c.checkFieldIOobject(c, yDot);
|
||||||
|
|
||||||
IOField<scalar> tc
|
IOField<scalar> tc
|
||||||
(
|
(
|
||||||
c.fieldIOobject("tc", IOobject::MUST_READ),
|
c.newIOobject("tc", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, tc);
|
c.checkFieldIOobject(c, tc);
|
||||||
|
|
||||||
IOField<scalar> ms
|
IOField<scalar> ms
|
||||||
(
|
(
|
||||||
c.fieldIOobject("ms", IOobject::MUST_READ),
|
c.newIOobject("ms", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, ms);
|
c.checkFieldIOobject(c, ms);
|
||||||
|
|
||||||
IOField<scalar> injector
|
IOField<scalar> injector
|
||||||
(
|
(
|
||||||
c.fieldIOobject("injector", IOobject::MUST_READ),
|
c.newIOobject("injector", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, injector);
|
c.checkFieldIOobject(c, injector);
|
||||||
|
|
||||||
IOField<scalar> tMom
|
IOField<scalar> tMom
|
||||||
(
|
(
|
||||||
c.fieldIOobject("tMom", IOobject::MUST_READ),
|
c.newIOobject("tMom", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, tMom);
|
c.checkFieldIOobject(c, tMom);
|
||||||
|
|
||||||
IOField<scalar> user
|
IOField<scalar> user
|
||||||
(
|
(
|
||||||
c.fieldIOobject("user", IOobject::MUST_READ),
|
c.newIOobject("user", IOobject::MUST_READ),
|
||||||
readOnProc
|
readOnProc
|
||||||
);
|
);
|
||||||
c.checkFieldIOobject(c, user);
|
c.checkFieldIOobject(c, user);
|
||||||
@ -265,31 +265,31 @@ void Foam::SprayParcel<ParcelType>::writeFields
|
|||||||
const label np = c.size();
|
const label np = c.size();
|
||||||
const bool writeOnProc = c.size();
|
const bool writeOnProc = c.size();
|
||||||
|
|
||||||
IOField<scalar> d0(c.fieldIOobject("d0", IOobject::NO_READ), np);
|
IOField<scalar> d0(c.newIOobject("d0", IOobject::NO_READ), np);
|
||||||
IOField<vector> position0
|
IOField<vector> position0
|
||||||
(
|
(
|
||||||
c.fieldIOobject("position0", IOobject::NO_READ),
|
c.newIOobject("position0", IOobject::NO_READ),
|
||||||
np
|
np
|
||||||
);
|
);
|
||||||
IOField<scalar> sigma(c.fieldIOobject("sigma", IOobject::NO_READ), np);
|
IOField<scalar> sigma(c.newIOobject("sigma", IOobject::NO_READ), np);
|
||||||
IOField<scalar> mu(c.fieldIOobject("mu", IOobject::NO_READ), np);
|
IOField<scalar> mu(c.newIOobject("mu", IOobject::NO_READ), np);
|
||||||
IOField<scalar> liquidCore
|
IOField<scalar> liquidCore
|
||||||
(
|
(
|
||||||
c.fieldIOobject("liquidCore", IOobject::NO_READ),
|
c.newIOobject("liquidCore", IOobject::NO_READ),
|
||||||
np
|
np
|
||||||
);
|
);
|
||||||
IOField<scalar> KHindex(c.fieldIOobject("KHindex", IOobject::NO_READ), np);
|
IOField<scalar> KHindex(c.newIOobject("KHindex", IOobject::NO_READ), np);
|
||||||
IOField<scalar> y(c.fieldIOobject("y", IOobject::NO_READ), np);
|
IOField<scalar> y(c.newIOobject("y", IOobject::NO_READ), np);
|
||||||
IOField<scalar> yDot(c.fieldIOobject("yDot", IOobject::NO_READ), np);
|
IOField<scalar> yDot(c.newIOobject("yDot", IOobject::NO_READ), np);
|
||||||
IOField<scalar> tc(c.fieldIOobject("tc", IOobject::NO_READ), np);
|
IOField<scalar> tc(c.newIOobject("tc", IOobject::NO_READ), np);
|
||||||
IOField<scalar> ms(c.fieldIOobject("ms", IOobject::NO_READ), np);
|
IOField<scalar> ms(c.newIOobject("ms", IOobject::NO_READ), np);
|
||||||
IOField<scalar> injector
|
IOField<scalar> injector
|
||||||
(
|
(
|
||||||
c.fieldIOobject("injector", IOobject::NO_READ),
|
c.newIOobject("injector", IOobject::NO_READ),
|
||||||
np
|
np
|
||||||
);
|
);
|
||||||
IOField<scalar> tMom(c.fieldIOobject("tMom", IOobject::NO_READ), np);
|
IOField<scalar> tMom(c.newIOobject("tMom", IOobject::NO_READ), np);
|
||||||
IOField<scalar> user(c.fieldIOobject("user", IOobject::NO_READ), np);
|
IOField<scalar> user(c.newIOobject("user", IOobject::NO_READ), np);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
for (const SprayParcel<ParcelType>& p : c)
|
for (const SprayParcel<ParcelType>& p : c)
|
||||||
|
|||||||
Reference in New Issue
Block a user