ENH: Function1's - added objectRegistry access

This commit is contained in:
Andrew Heather
2021-11-22 11:56:49 +00:00
committed by Mark Olesen
parent 889bc171d9
commit 098aec4962
74 changed files with 173 additions and 136 deletions

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2013-2016 OpenFOAM Foundation
Copyright (C) 2017-2020 OpenCFD Ltd.
Copyright (C) 2017-2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -146,7 +146,7 @@ externalCoupledTemperatureMixedFvPatchScalarField
if (refTempType_ == refTemperatureType::USER)
{
Tref_ = Function1<scalar>::New("Tref", dict);
Tref_ = Function1<scalar>::New("Tref", dict, &db());
}
if (dict.found("refValue"))

View File

@ -47,7 +47,7 @@ bool Foam::functionObjects::reference::calcType()
autoPtr<Function1<Type>> valuePtr
(
Function1<Type>::New("refValue", localDict_, &mesh_)
Function1<Type>::New("refValue", localDict_, &this->mesh_)
);
refValue.value() = valuePtr->value(this->time().value());

View File

@ -155,18 +155,18 @@ bool Foam::functionObjects::setFlow::read(const dictionary& dict)
}
// Scaling is applied across all modes
scalePtr_ = Function1<scalar>::New("scale", dict);
scalePtr_ = Function1<scalar>::New("scale", dict, &mesh_);
switch (mode_)
{
case modeType::FUNCTION:
{
velocityPtr_ = Function1<vector>::New("velocity", dict);
velocityPtr_ = Function1<vector>::New("velocity", dict, &mesh_);
break;
}
case modeType::ROTATION:
{
omegaPtr_ = Function1<scalar>::New("omega", dict);
omegaPtr_ = Function1<scalar>::New("omega", dict, &mesh_);
dict.readEntry("origin", origin_);
const vector refDir(dict.get<vector>("refDir").normalise());

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2013-2016 OpenFOAM Foundation
Copyright (C) 2016-2020 OpenCFD Ltd.
Copyright (C) 2016-2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -92,7 +92,7 @@ bool Foam::functionObjects::setTimeStepFunctionObject::read
{
timeFunctionObject::read(dict);
timeStepPtr_ = Function1<scalar>::New("deltaT", dict);
timeStepPtr_ = Function1<scalar>::New("deltaT", dict, &time_);
// Ensure that adjustTimeStep is active
if (!time_.controlDict().getOrDefault("adjustTimeStep", false))