mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: extend command-line options for particleTracks
- can specify format, stride without modifying a dictionary (increases flexibility, eases testing)
This commit is contained in:
@ -0,0 +1,30 @@
|
||||
// Read particleTrackProperties dictionary and extract values from it
|
||||
|
||||
const word dictName("particleTrackProperties");
|
||||
|
||||
#include "setConstantMeshDictionaryIO.H"
|
||||
|
||||
IOdictionary propsDict(dictIO);
|
||||
|
||||
const word cloudName(propsDict.get<word>("cloud"));
|
||||
|
||||
label sampleFrequency(propsDict.get<label>("sampleFrequency"));
|
||||
|
||||
label maxPositions(propsDict.get<label>("maxPositions"));
|
||||
|
||||
label maxTracks(propsDict.getOrDefault<label>("maxTracks", -1));
|
||||
|
||||
word setFormat(propsDict.getOrDefault<word>("setFormat", "vtk"));
|
||||
|
||||
// Optional - if empty, select all
|
||||
const wordRes fieldNames(propsDict.getOrDefault<wordRes>("fields", wordRes()));
|
||||
|
||||
const word UName(propsDict.getOrDefault<word>("U", "U"));
|
||||
|
||||
const dictionary formatOptions
|
||||
(
|
||||
propsDict.subOrEmptyDict("formatOptions", keyType::LITERAL)
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user