foamNewBC: Reinstate time method
This serves as an example of the creation of a private method. It no longer needs to convert the Function1 argument to user time, following the addition of generalised unit conversion.
This commit is contained in:
@ -29,6 +29,15 @@ License
|
|||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "surfaceFields.H"
|
#include "surfaceFields.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::scalar Foam::CLASS::t() const
|
||||||
|
{
|
||||||
|
return this->db().time().value();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -162,7 +171,7 @@ void Foam::CLASS::updateCoeffs()
|
|||||||
(
|
(
|
||||||
data_
|
data_
|
||||||
+ fieldData_
|
+ fieldData_
|
||||||
+ scalarData_*timeVsData_->value(this->db().time().value())
|
+ scalarData_*timeVsData_->value(t())
|
||||||
);
|
);
|
||||||
|
|
||||||
const scalarField& phip =
|
const scalarField& phip =
|
||||||
|
|||||||
@ -118,6 +118,12 @@ class CONSTRUCT
|
|||||||
bool boolData_;
|
bool boolData_;
|
||||||
|
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Return current time
|
||||||
|
scalar t() const;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
|
|||||||
Reference in New Issue
Block a user