| 284 | |
| 285 | |
| 286 | bool 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 | |
| 334 | void Foam::sampledSets::correct() |
no test coverage detected