mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Function1's - added objectRegistry access
This commit is contained in:
committed by
Mark Olesen
parent
889bc171d9
commit
098aec4962
@ -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"))
|
||||
|
||||
@ -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());
|
||||
|
||||
@ -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());
|
||||
|
||||
@ -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))
|
||||
|
||||
Reference in New Issue
Block a user