ENH: expose fieldNames() selection for sampledSets/sampledSurfaces
- consistent with probes. Allows reporting/querying
This commit is contained in:
parent
d296713af1
commit
1faa143a7c
@ -184,7 +184,15 @@ int main(int argc, char *argv[])
|
||||
// Construct from Time and dictionary, without loadFromFiles
|
||||
sampledSurfaces sampling("test-sample", runTime, *sampleDict);
|
||||
|
||||
Info<< "Loaded " << sampling.size() << " surface samplers" << nl;
|
||||
#if (OPENFOAM <= 2306)
|
||||
Info<< "Loaded " << sampling.size() << " surface samplers, fields: "
|
||||
<< flatOutput(sampleDict->getOrDefault<wordRes>("fields", wordRes()))
|
||||
<< nl;
|
||||
#else
|
||||
Info<< "Loaded " << sampling.size() << " surface samplers, fields: "
|
||||
<< flatOutput(sampling.fieldNames())
|
||||
<< nl;
|
||||
#endif
|
||||
|
||||
if (sampling.empty())
|
||||
{
|
||||
|
@ -306,6 +306,9 @@ public:
|
||||
// \return old value
|
||||
bool verbose(const bool on) noexcept;
|
||||
|
||||
//- Return names of fields to sample
|
||||
const wordRes& fieldNames() const noexcept { return fieldSelection_; }
|
||||
|
||||
//- Read the sampledSets
|
||||
virtual bool read(const dictionary&);
|
||||
|
||||
|
@ -349,6 +349,9 @@ public:
|
||||
// \return old value
|
||||
bool verbose(const bool on) noexcept;
|
||||
|
||||
//- Return names of fields to sample
|
||||
const wordRes& fieldNames() const noexcept { return fieldSelection_; }
|
||||
|
||||
//- Read the sampledSurfaces dictionary
|
||||
virtual bool read(const dictionary& dict);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user