33 template<
class ParticleType>
39 template<
class ParticleType>
42 IOobject uniformPropsDictHeader
46 "uniform"/cloud::prefix/
name(),
53 if (uniformPropsDictHeader.headerOk())
55 const IOdictionary uniformPropsDict(uniformPropsDictHeader);
57 word procName(
"processor" +
Foam::name(Pstream::myProcNo()));
58 if (uniformPropsDict.found(procName))
60 uniformPropsDict.subDict(procName).lookup(
"particleCount")
71 template<
class ParticleType>
74 IOdictionary uniformPropsDict
80 "uniform"/cloud::prefix/
name(),
89 np[Pstream::myProcNo()] = particleCount_;
91 Pstream::listCombineGather(np, maxEqOp<label>());
92 Pstream::listCombineScatter(np);
97 uniformPropsDict.add(procName, dictionary());
98 uniformPropsDict.subDict(procName).add(
"particleCount", np[i]);
101 uniformPropsDict.regIOobject::write();
105 template<
class ParticleType>
108 readCloudUniformProperties();
110 IOPosition<ParticleType> ioP(*
this);
114 ioP.readData(*
this, checkClass);
126 WarningIn(
"Cloud<ParticleType>::initCloud(const bool checkClass)")
127 <<
"Cannot read particle positions file " <<
nl
128 <<
" " << ioP.objectPath() <<
nl
129 <<
" assuming the initial cloud contains 0 particles."
138 template<
class ParticleType>
142 const bool checkClass
149 initCloud(checkClass);
153 template<
class ParticleType>
158 const bool checkClass
161 cloud(pMesh, cloudName),
165 initCloud(checkClass);
171 template<
class ParticleType>
174 const word& fieldName,
190 template<
class ParticleType>
191 template<
class DataType>
202 "void Cloud<ParticleType>::checkFieldIOobject"
203 "(const Cloud<ParticleType>&, const IOField<DataType>&) const"
204 ) <<
"Size of " << data.
name()
205 <<
" field " << data.
size()
206 <<
" does not match the number of particles " << c.
size()
212 template<
class ParticleType>
217 template<
class ParticleType>
222 const ParticleType&
p = *this->first();
223 ParticleType::writeFields(p.cloud());
228 template<
class ParticleType>
236 writeCloudUniformProperties();
241 return cloud::writeObject(fmt, ver, cmp);
252 template<
class ParticleType>
258 os.check(
"Ostream& operator<<(Ostream&, const Cloud<ParticleType>&)");