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

Function read

src/sampling/sampledSet/sampledSets/sampledSets.C:286–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284
285
286bool Foam::sampledSets::read(const dictionary& dict)
287{
288 dict_ = dict;
289
290 bool setsFound = dict_.found("sets");
291 if (setsFound)
292 {
293 dict_.lookup("fields") >> fieldSelection_;
294 clearFieldGroups();
295
296 dict.lookup("interpolationScheme") >> interpolationScheme_;
297 dict.lookup("setFormat") >> writeFormat_;
298
299 PtrList<sampledSet> newList
300 (
301 dict_.lookup("sets"),
302 sampledSet::iNew(mesh_, searchEngine_)
303 );
304 transfer(newList);
305 combineSampledSets(masterSampledSets_, indexSets_);
306
307 if (this->size())
308 {
309 Info<< "Reading set description:" << nl;
310 forAll(*this, setI)
311 {
312 Info<< " " << operator[](setI).name() << nl;
313 }
314 Info<< endl;
315 }
316 }
317
318 if (Pstream::master() && debug)
319 {
320 Pout<< "sample fields:" << fieldSelection_ << nl
321 << "sample sets:" << nl << "(" << nl;
322
323 forAll(*this, setI)
324 {
325 Pout<< " " << operator[](setI) << endl;
326 }
327 Pout<< ")" << endl;
328 }
329
330 return true;
331}
332
333
334void Foam::sampledSets::correct()

Callers 2

sampledSets.CFile · 0.70
sampledSurfaces.CFile · 0.50

Calls 9

combineSampledSetsFunction · 0.85
lookupMethod · 0.80
clearFieldGroupsFunction · 0.70
iNewClass · 0.50
transferFunction · 0.50
forAllFunction · 0.50
foundMethod · 0.45
sizeMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected