ENH: DimensionedField, GeometricField enhancements and style changes

- constCast() convenience methods.
  This simplies coding in places, especially in solvers

- inline some methods within headers, for better overview/maintenance

- only set DimensionedField default value on construct if not read

- storeOldTimes() does not require const_cast
This commit is contained in:
Mark Olesen
2025-05-20 07:59:23 +02:00
parent ae3adc1007
commit 4e513cec18
31 changed files with 96 additions and 197 deletions

View File

@ -135,7 +135,7 @@ public:
virtual volScalarField& he()
{
NotImplemented;
return const_cast<volScalarField&>(volScalarField::null());
return volScalarField::null().constCast();
}
//- Enthalpy/Internal energy [J/kg]

View File

@ -243,7 +243,7 @@ public:
virtual volScalarField& he()
{
NotImplemented;
return const_cast<volScalarField&>(volScalarField::null());
return volScalarField::null().constCast();
}
//- Enthalpy/Internal energy [J/kg]

View File

@ -86,7 +86,7 @@ public:
virtual volScalarField& he()
{
NotImplemented;
return const_cast<volScalarField&>(volScalarField::null());
return volScalarField::null().constCast();
}
//- Return access to the internal energy field [J/Kg]