mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: expose fieldNames() selection for sampledSets/sampledSurfaces
- consistent with probes. Allows reporting/querying
This commit is contained in:
@ -184,7 +184,15 @@ int main(int argc, char *argv[])
|
|||||||
// Construct from Time and dictionary, without loadFromFiles
|
// Construct from Time and dictionary, without loadFromFiles
|
||||||
sampledSurfaces sampling("test-sample", runTime, *sampleDict);
|
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())
|
if (sampling.empty())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -306,6 +306,9 @@ public:
|
|||||||
// \return old value
|
// \return old value
|
||||||
bool verbose(const bool on) noexcept;
|
bool verbose(const bool on) noexcept;
|
||||||
|
|
||||||
|
//- Return names of fields to sample
|
||||||
|
const wordRes& fieldNames() const noexcept { return fieldSelection_; }
|
||||||
|
|
||||||
//- Read the sampledSets
|
//- Read the sampledSets
|
||||||
virtual bool read(const dictionary&);
|
virtual bool read(const dictionary&);
|
||||||
|
|
||||||
|
|||||||
@ -349,6 +349,9 @@ public:
|
|||||||
// \return old value
|
// \return old value
|
||||||
bool verbose(const bool on) noexcept;
|
bool verbose(const bool on) noexcept;
|
||||||
|
|
||||||
|
//- Return names of fields to sample
|
||||||
|
const wordRes& fieldNames() const noexcept { return fieldSelection_; }
|
||||||
|
|
||||||
//- Read the sampledSurfaces dictionary
|
//- Read the sampledSurfaces dictionary
|
||||||
virtual bool read(const dictionary& dict);
|
virtual bool read(const dictionary& dict);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user