mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: avoid spurious ddt warning about unknown field (#1643)
This commit is contained in:
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -53,15 +54,14 @@ bool Foam::functionObjects::ddt::calc()
|
||||
return false;
|
||||
}
|
||||
|
||||
bool processed = false;
|
||||
|
||||
processed = processed || calcDdt<scalar>();
|
||||
processed = processed || calcDdt<vector>();
|
||||
processed = processed || calcDdt<sphericalTensor>();
|
||||
processed = processed || calcDdt<symmTensor>();
|
||||
processed = processed || calcDdt<tensor>();
|
||||
|
||||
return processed;
|
||||
return
|
||||
(
|
||||
calcDdt<scalar>()
|
||||
|| calcDdt<vector>()
|
||||
|| calcDdt<sphericalTensor>()
|
||||
|| calcDdt<symmTensor>()
|
||||
|| calcDdt<tensor>()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -80,10 +80,4 @@ Foam::functionObjects::ddt::ddt
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::functionObjects::ddt::~ddt()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -40,6 +41,7 @@ See also
|
||||
|
||||
SourceFiles
|
||||
ddt.C
|
||||
ddtTemplates.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -65,12 +67,13 @@ class ddt
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Calculate the magnitude of the field and register the result
|
||||
//- Calculate and store the result
|
||||
// \return true if fieldName_ was known and had the correct type
|
||||
template<class Type>
|
||||
bool calcDdt();
|
||||
|
||||
//- Calculate the time derivative of the field and return
|
||||
// true if successful
|
||||
//- Calculate time derivative of the field
|
||||
// \return true on success
|
||||
virtual bool calc();
|
||||
|
||||
|
||||
@ -92,7 +95,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~ddt();
|
||||
virtual ~ddt() = default;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -35,7 +35,7 @@ bool Foam::functionObjects::ddt::calcDdt()
|
||||
{
|
||||
typedef GeometricField<Type, fvPatchField, volMesh> VolFieldType;
|
||||
|
||||
if (foundObject<VolFieldType>(fieldName_))
|
||||
if (foundObject<VolFieldType>(fieldName_, false))
|
||||
{
|
||||
return store
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user