functionObjects: Added fields() function to provide list of required fields to postProcess
With this change each functionObject provides the list of fields required so that the postProcess utility can pre-load them before executing the list of functionObjects. This provides a more convenient interface than using the -field or -fields command-line options to postProcess which are now redundant.
This commit is contained in:
@ -163,8 +163,8 @@ public:
|
||||
//- Return the region name
|
||||
inline const word& regionName() const;
|
||||
|
||||
//- Return the list of field names
|
||||
inline const wordList& fields() const;
|
||||
//- Return the list of fields required
|
||||
inline virtual wordList fields() const;
|
||||
|
||||
//- Return the output field values flag
|
||||
inline const Switch& writeFields() const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -40,7 +40,7 @@ inline const Foam::word& Foam::functionObjects::fieldValue::regionName() const
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::wordList& Foam::functionObjects::fieldValue::fields() const
|
||||
inline Foam::wordList Foam::functionObjects::fieldValue::fields() const
|
||||
{
|
||||
return fields_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user