functionObjects: New abstract base-class 'fieldExpression' for simple field expression evaluation functionObjects
Updated and simplified 'div', 'grad' and 'mag' functionObjects by deriving from 'fieldExpression'. Corrected the handling of cached gradients in 'grad'.
This commit is contained in:
@ -73,6 +73,29 @@ protected:
|
||||
const fvMesh& mesh_;
|
||||
|
||||
|
||||
// Protected member functions
|
||||
|
||||
//- Find field in the objectRegistry
|
||||
template<class FieldType>
|
||||
bool foundField(const word& fieldName) const;
|
||||
|
||||
//- Lookup field from the objectRegistry
|
||||
template<class FieldType>
|
||||
const FieldType& lookupField(const word& fieldName) const;
|
||||
|
||||
//- Store the given field in the objectRegistry under the given name
|
||||
template<class FieldType>
|
||||
bool store
|
||||
(
|
||||
word& fieldName,
|
||||
tmp<FieldType> tfield,
|
||||
bool cacheable = false
|
||||
);
|
||||
|
||||
//- Write field if present in objectRegistry
|
||||
virtual bool write(const word& fieldName);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Private Member Functions
|
||||
@ -113,6 +136,12 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "fvMeshFunctionObjectTemplates.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
Reference in New Issue
Block a user