ENH: delay evaluation of surfaces for surfaceFieldValue (issue #1202)

- complete any pending initialisation on write().
  Allows lazier evaluation until when the surfaces are actually needed.
This commit is contained in:
Mark Olesen
2019-02-12 12:39:49 +01:00
parent a16f21c6f3
commit 63389af16f
4 changed files with 207 additions and 181 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011-2016 OpenFOAM Foundation
@ -29,6 +29,20 @@ License
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
inline bool Foam::functionObjects::fieldValues::surfaceFieldValue::
withSurfaceFields() const
{
return (stFaceZone == regionType_ || stPatch == regionType_);
}
inline bool Foam::functionObjects::fieldValues::surfaceFieldValue::
withTopologicalMerge() const
{
return (stFaceZone == regionType_ || stPatch == regionType_);
}
inline const Foam::labelList&
Foam::functionObjects::fieldValues::surfaceFieldValue::faceId() const
{
@ -68,7 +82,7 @@ Foam::functionObjects::fieldValues::surfaceFieldValue::usesWeight() const
}
inline const Foam::functionObjects::fieldValues::surfaceFieldValue::regionTypes&
inline Foam::functionObjects::fieldValues::surfaceFieldValue::regionTypes
Foam::functionObjects::fieldValues::surfaceFieldValue::regionType() const
{
return regionType_;