MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / write

Function write

src/sampling/sampledSet/sampledSets/sampledSets.C:241–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239
240
241bool Foam::sampledSets::write()
242{
243 if (size())
244 {
245 const label nFields = classifyFields();
246
247 if (Pstream::master())
248 {
249 if (debug)
250 {
251 Pout<< "timeName = " << mesh_.time().timeName() << nl
252 << "scalarFields " << scalarFields_ << nl
253 << "vectorFields " << vectorFields_ << nl
254 << "sphTensorFields " << sphericalTensorFields_ << nl
255 << "symTensorFields " << symmTensorFields_ <<nl
256 << "tensorFields " << tensorFields_ <<nl;
257 }
258
259 if (nFields)
260 {
261 if (debug)
262 {
263 Pout<< "Creating directory "
264 << outputPath_/mesh_.time().timeName()
265 << nl << endl;
266 }
267
268 mkDir(outputPath_/mesh_.time().timeName());
269 }
270 }
271
272 if (nFields)
273 {
274 sampleAndWrite(scalarFields_);
275 sampleAndWrite(vectorFields_);
276 sampleAndWrite(sphericalTensorFields_);
277 sampleAndWrite(symmTensorFields_);
278 sampleAndWrite(tensorFields_);
279 }
280 }
281
282 return true;
283}
284
285
286bool Foam::sampledSets::read(const dictionary& dict)

Callers 12

midPointSet.CFile · 0.50
cloudSet.CFile · 0.50
polyLineSet.CFile · 0.50
circleSet.CFile · 0.50
patchSeedSet.CFile · 0.50
faceOnlySet.CFile · 0.50
uniformSet.CFile · 0.50
patchCloudSet.CFile · 0.50
arraySet.CFile · 0.50
sampledSet.CFile · 0.50

Calls 3

sizeFunction · 0.85
timeMethod · 0.80
mkDirFunction · 0.50

Tested by

no test coverage detected