STYLE: remove unused/stray methods, fix stray deprecated usages

STYLE: use separate value/dimensions for GeometricField

- simplifies calling parameters

COMP: limit enumeration range when reporting chemkin error
This commit is contained in:
Mark Olesen
2024-01-02 18:20:33 +01:00
parent dde4b12687
commit ad85b684bb
41 changed files with 148 additions and 201 deletions

View File

@ -90,31 +90,6 @@ bool Foam::functionObjects::age::converged
}
template<class GeoField>
Foam::autoPtr<GeoField>
Foam::functionObjects::age::newField
(
const word& baseName,
const wordList patches
) const
{
return autoPtr<GeoField>::New
(
IOobject
(
scopedName(baseName),
time_.timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh_,
dimensioned<typename GeoField::value_type>(dimTime, Zero),
patches
);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::functionObjects::age::age

View File

@ -141,14 +141,6 @@ class age
//- Return true if convergence is reached
bool converged(const int nCorr, const scalar initialResidual) const;
//- Create and allocate a new zero geometric field
template<class GeoField>
autoPtr<GeoField> newField
(
const word& baseName,
const wordList
) const;
public:

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2021-2022 OpenCFD Ltd.
Copyright (C) 2021-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -37,11 +37,11 @@ Foam::autoPtr<Foam::binModel> Foam::binModel::New
const word& outputPrefix
)
{
word modelType(dict.get<word>("binModel"));
const word modelType(dict.get<word>("binModel"));
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
auto* ctorPtr = dictionaryConstructorTable(modelType);
if (!cstrIter.good())
if (!ctorPtr)
{
FatalIOErrorInLookup
(
@ -52,7 +52,7 @@ Foam::autoPtr<Foam::binModel> Foam::binModel::New
) << exit(FatalIOError);
}
return autoPtr<binModel>(cstrIter()(dict, mesh, outputPrefix));
return autoPtr<binModel>(ctorPtr(dict, mesh, outputPrefix));
}

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2018-2021 OpenCFD Ltd.
Copyright (C) 2018-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -71,13 +71,14 @@ Foam::functionObjects::momentum::newField
(
scopedName(baseName),
time_.timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
mesh_.thisDb(),
IOobjectOption::NO_READ,
IOobjectOption::NO_WRITE,
registerObject
),
mesh_,
dimensioned<typename GeoField::value_type>(dims, Zero)
Foam::zero{}, // value
dims
);
}