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
@ -37,7 +37,7 @@ Description
|
||||
It accepts primitive or dictionary entries for dispatching to different
|
||||
function types, but wraps unspecified types as "constant".
|
||||
|
||||
In the dictionary form, the coefficents are the dictionary itself.
|
||||
In the dictionary form, the coefficients are the dictionary itself.
|
||||
This is arguably the more readable form.
|
||||
For example,
|
||||
\verbatim
|
||||
@ -49,7 +49,7 @@ Description
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
In the primitive form, the coefficents are provided separately.
|
||||
In the primitive form, the coefficients are provided separately.
|
||||
For example,
|
||||
\verbatim
|
||||
<entryName> linearRamp;
|
||||
|
||||
@ -34,7 +34,7 @@ void Foam::Function1Types::LimitRange<Type>::read(const dictionary& coeffs)
|
||||
{
|
||||
min_ = coeffs.get<scalar>("min");
|
||||
max_ = coeffs.get<scalar>("max");
|
||||
value_ = Function1<Type>::New("value", coeffs);
|
||||
value_ = Function1<Type>::New("value", coeffs, this->obrPtr_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -33,8 +33,8 @@ License
|
||||
template<class Type>
|
||||
void Foam::Function1Types::Scale<Type>::read(const dictionary& coeffs)
|
||||
{
|
||||
scale_ = Function1<scalar>::New("scale", coeffs);
|
||||
value_ = Function1<Type>::New("value", coeffs);
|
||||
scale_ = Function1<scalar>::New("scale", coeffs, this->obrPtr_);
|
||||
value_ = Function1<Type>::New("value", coeffs, this->obrPtr_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -40,15 +40,21 @@ Foam::Function1Types::Sine<Type>::Sine
|
||||
:
|
||||
Function1<Type>(entryName, dict, obrPtr),
|
||||
t0_(dict.getOrDefault<scalar>("t0", 0)),
|
||||
amplitude_(Function1<scalar>::NewIfPresent("amplitude", dict)),
|
||||
period_(Function1<scalar>::NewIfPresent("period", dict)),
|
||||
amplitude_
|
||||
(
|
||||
Function1<scalar>::NewIfPresent("amplitude", dict, word::null, obrPtr)
|
||||
),
|
||||
period_
|
||||
(
|
||||
Function1<scalar>::NewIfPresent("period", dict, word::null, obrPtr)
|
||||
),
|
||||
frequency_(nullptr),
|
||||
scale_(Function1<Type>::New("scale", dict)),
|
||||
level_(Function1<Type>::New("level", dict))
|
||||
scale_(Function1<Type>::New("scale", dict, obrPtr)),
|
||||
level_(Function1<Type>::New("level", dict, obrPtr))
|
||||
{
|
||||
if (!period_)
|
||||
{
|
||||
frequency_ = Function1<scalar>::New("frequency", dict);
|
||||
frequency_ = Function1<scalar>::New("frequency", dict, obrPtr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user