mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: Function1 - propagated API change resulting from new objectRegistry access
This commit is contained in:
committed by
Mark Olesen
parent
c1a04abd96
commit
70b55be684
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -33,10 +33,11 @@ template<class Type>
|
|||||||
Foam::Function1Types::Function1Expression<Type>::Function1Expression
|
Foam::Function1Types::Function1Expression<Type>::Function1Expression
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Function1<Type>(entryName, dict),
|
Function1<Type>(entryName, dict, obrPtr),
|
||||||
dict_(dict),
|
dict_(dict),
|
||||||
valueExpr_(),
|
valueExpr_(),
|
||||||
driver_(1, dict_)
|
driver_(1, dict_)
|
||||||
@ -88,6 +89,8 @@ Type Foam::Function1Types::Function1Expression<Type>::value
|
|||||||
|
|
||||||
driver_.setArgument(x);
|
driver_.setArgument(x);
|
||||||
|
|
||||||
|
driver_.resetDb(this->whichDb());
|
||||||
|
|
||||||
driver_.parse(this->valueExpr_);
|
driver_.parse(this->valueExpr_);
|
||||||
|
|
||||||
expressions::exprResult result(driver_.result());
|
expressions::exprResult result(driver_.result());
|
||||||
@ -98,7 +101,9 @@ Type Foam::Function1Types::Function1Expression<Type>::value
|
|||||||
if (!result.hasValue() || !result.size() || !result.isType<Type>())
|
if (!result.hasValue() || !result.size() || !result.isType<Type>())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Could not evaluate: " << this->valueExpr_
|
<< "Could not evaluate: " << this->valueExpr_ << nl
|
||||||
|
<< "Result size:" << result.size()
|
||||||
|
<< " type:" << result.valueType() << nl
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,7 +129,7 @@ void Foam::Function1Types::Function1Expression<Type>::writeData
|
|||||||
Ostream& os
|
Ostream& os
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
// Function1-from-subdict so out dictionary contains
|
// Function1-from-subdict so output dictionary contains
|
||||||
// only the relevant entries.
|
// only the relevant entries.
|
||||||
dict_.writeEntry(this->name(), os);
|
dict_.writeEntry(this->name(), os);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -113,8 +113,13 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from entry name and dictionary
|
//- Construct from entry name, dictionary and optional registry
|
||||||
Function1Expression(const word& entryName, const dictionary& dict);
|
Function1Expression
|
||||||
|
(
|
||||||
|
const word& entryName,
|
||||||
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr = nullptr
|
||||||
|
);
|
||||||
|
|
||||||
//- Copy construct
|
//- Copy construct
|
||||||
explicit Function1Expression(const Function1Expression<Type>& rhs);
|
explicit Function1Expression(const Function1Expression<Type>& rhs);
|
||||||
|
|||||||
@ -210,10 +210,11 @@ Foam::Function1Types::CSV<Type>::CSV
|
|||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr,
|
||||||
const fileName& fName
|
const fileName& fName
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
TableBase<Type>(entryName, dict),
|
TableBase<Type>(entryName, dict, obrPtr),
|
||||||
nHeaderLine_(dict.get<label>("nHeaderLine")),
|
nHeaderLine_(dict.get<label>("nHeaderLine")),
|
||||||
refColumn_(dict.get<label>("refColumn")),
|
refColumn_(dict.get<label>("refColumn")),
|
||||||
componentColumns_(getComponentColumns("componentColumns", dict)),
|
componentColumns_(getComponentColumns("componentColumns", dict)),
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2017-2020 OpenCFD Ltd.
|
Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -125,11 +125,12 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from entry name and dictionary
|
//- Construct from entry name, dictionary and optional registry
|
||||||
CSV
|
CSV
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr = nullptr,
|
||||||
const fileName& fName = fileName::null
|
const fileName& fName = fileName::null
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -34,10 +34,11 @@ template<class Type>
|
|||||||
Foam::Function1Types::Constant<Type>::Constant
|
Foam::Function1Types::Constant<Type>::Constant
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const Type& value
|
const Type& value,
|
||||||
|
const objectRegistry* obrPtr
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Function1<Type>(entryName),
|
Function1<Type>(entryName, obrPtr),
|
||||||
value_(value)
|
value_(value)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -46,10 +47,11 @@ template<class Type>
|
|||||||
Foam::Function1Types::Constant<Type>::Constant
|
Foam::Function1Types::Constant<Type>::Constant
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Function1<Type>(entryName, dict),
|
Function1<Type>(entryName, dict, obrPtr),
|
||||||
value_(Zero)
|
value_(Zero)
|
||||||
{
|
{
|
||||||
const entry* eptr = dict.findEntry(entryName, keyType::LITERAL);
|
const entry* eptr = dict.findEntry(entryName, keyType::LITERAL);
|
||||||
|
|||||||
@ -95,10 +95,20 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
Constant(const word& entryName, const Type& value);
|
Constant
|
||||||
|
(
|
||||||
|
const word& entryName,
|
||||||
|
const Type& value,
|
||||||
|
const objectRegistry* obrPtr = nullptr
|
||||||
|
);
|
||||||
|
|
||||||
//- Construct from entry name and dictionary
|
//- Construct from entry name, dictionary and optional registry
|
||||||
Constant(const word& entryName, const dictionary& dict);
|
Constant
|
||||||
|
(
|
||||||
|
const word& entryName,
|
||||||
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr = nullptr
|
||||||
|
);
|
||||||
|
|
||||||
//- Construct from entry name and Istream
|
//- Construct from entry name and Istream
|
||||||
// Reads the constant value without the Function1 type
|
// Reads the constant value without the Function1 type
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -131,10 +131,15 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from entry name and dictionary
|
//- Construct from entry name, dictionary and optional registry
|
||||||
Cosine(const word& entryName, const dictionary& dict)
|
Cosine
|
||||||
|
(
|
||||||
|
const word& entryName,
|
||||||
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr = nullptr
|
||||||
|
)
|
||||||
:
|
:
|
||||||
Sine<Type>(entryName, dict)
|
Sine<Type>(entryName, dict, obrPtr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//- Copy construct
|
//- Copy construct
|
||||||
|
|||||||
@ -126,10 +126,11 @@ template<class Function1Type>
|
|||||||
Foam::FieldFunction1<Function1Type>::FieldFunction1
|
Foam::FieldFunction1<Function1Type>::FieldFunction1
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Function1Type(entryName, dict)
|
Function1Type(entryName, dict, obrPtr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -104,6 +104,7 @@ class Function1
|
|||||||
const entry* eptr, // Eg, dict.findEntry(entryName)
|
const entry* eptr, // Eg, dict.findEntry(entryName)
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const word& redirectType,
|
const word& redirectType,
|
||||||
|
const objectRegistry* obrPtr,
|
||||||
const bool mandatory
|
const bool mandatory
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -131,9 +132,10 @@ public:
|
|||||||
dictionary,
|
dictionary,
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr
|
||||||
),
|
),
|
||||||
(entryName, dict)
|
(entryName, dict, obrPtr)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -146,7 +148,8 @@ public:
|
|||||||
const objectRegistry* obrPtr = nullptr
|
const objectRegistry* obrPtr = nullptr
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from entry name and dictionary (unused)
|
//- Construct from entry name, (unused) dictionary
|
||||||
|
//- and optional registry
|
||||||
Function1
|
Function1
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
@ -169,6 +172,7 @@ public:
|
|||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const word& redirectType,
|
const word& redirectType,
|
||||||
|
const objectRegistry* obrPtr = nullptr,
|
||||||
const bool mandatory = true
|
const bool mandatory = true
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -179,6 +183,7 @@ public:
|
|||||||
std::initializer_list<std::pair<const char*,int>> compat,
|
std::initializer_list<std::pair<const char*,int>> compat,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const word& redirectType = word::null,
|
const word& redirectType = word::null,
|
||||||
|
const objectRegistry* obrPtr = nullptr,
|
||||||
const bool mandatory = true
|
const bool mandatory = true
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -187,6 +192,7 @@ public:
|
|||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr = nullptr,
|
||||||
const bool mandatory = true
|
const bool mandatory = true
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -195,7 +201,8 @@ public:
|
|||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const word& redirectType = word::null
|
const word& redirectType = word::null,
|
||||||
|
const objectRegistry* obrPtr = nullptr
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -209,6 +216,7 @@ public:
|
|||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
enum keyType::option matchOpt = keyType::LITERAL,
|
enum keyType::option matchOpt = keyType::LITERAL,
|
||||||
|
const objectRegistry* obrPtr = nullptr,
|
||||||
const bool mandatory = true
|
const bool mandatory = true
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -221,7 +229,8 @@ public:
|
|||||||
/// const word& entryName,
|
/// const word& entryName,
|
||||||
/// const dictionary& dict,
|
/// const dictionary& dict,
|
||||||
/// const Type& deflt,
|
/// const Type& deflt,
|
||||||
/// enum keyType::option matchOpt = keyType::LITERAL
|
/// enum keyType::option matchOpt = keyType::LITERAL,
|
||||||
|
/// const objectRegistry* obrPtr = nullptr
|
||||||
/// );
|
/// );
|
||||||
|
|
||||||
|
|
||||||
@ -286,7 +295,12 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from entry name and dictionary
|
//- Construct from entry name and dictionary
|
||||||
FieldFunction1(const word& entryName, const dictionary& dict);
|
FieldFunction1
|
||||||
|
(
|
||||||
|
const word& entryName,
|
||||||
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr = nullptr
|
||||||
|
);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- Construct and return a clone
|
||||||
virtual tmp<Function1<Type>> clone() const;
|
virtual tmp<Function1<Type>> clone() const;
|
||||||
|
|||||||
@ -38,6 +38,7 @@ Foam::Function1<Type>::New
|
|||||||
const entry* eptr,
|
const entry* eptr,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const word& redirectType,
|
const word& redirectType,
|
||||||
|
const objectRegistry* obrPtr,
|
||||||
const bool mandatory
|
const bool mandatory
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -86,7 +87,12 @@ Foam::Function1<Type>::New
|
|||||||
|
|
||||||
return autoPtr<Function1<Type>>
|
return autoPtr<Function1<Type>>
|
||||||
(
|
(
|
||||||
new Function1Types::Constant<Type>(entryName, constValue)
|
new Function1Types::Constant<Type>
|
||||||
|
(
|
||||||
|
entryName,
|
||||||
|
constValue,
|
||||||
|
obrPtr
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,7 +141,7 @@ Foam::Function1<Type>::New
|
|||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ctorPtr(entryName, *coeffs);
|
return ctorPtr(entryName, *coeffs, obrPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -146,6 +152,7 @@ Foam::Function1<Type>::New
|
|||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const word& redirectType,
|
const word& redirectType,
|
||||||
|
const objectRegistry* obrPtr,
|
||||||
const bool mandatory
|
const bool mandatory
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -155,6 +162,7 @@ Foam::Function1<Type>::New
|
|||||||
dict.findEntry(entryName, keyType::LITERAL),
|
dict.findEntry(entryName, keyType::LITERAL),
|
||||||
dict,
|
dict,
|
||||||
redirectType,
|
redirectType,
|
||||||
|
obrPtr,
|
||||||
mandatory
|
mandatory
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -168,6 +176,7 @@ Foam::Function1<Type>::NewCompat
|
|||||||
std::initializer_list<std::pair<const char*,int>> compat,
|
std::initializer_list<std::pair<const char*,int>> compat,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const word& redirectType,
|
const word& redirectType,
|
||||||
|
const objectRegistry* obrPtr,
|
||||||
const bool mandatory
|
const bool mandatory
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -177,6 +186,7 @@ Foam::Function1<Type>::NewCompat
|
|||||||
dict.findCompat(entryName, compat, keyType::LITERAL),
|
dict.findCompat(entryName, compat, keyType::LITERAL),
|
||||||
dict,
|
dict,
|
||||||
redirectType,
|
redirectType,
|
||||||
|
obrPtr,
|
||||||
mandatory
|
mandatory
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -188,10 +198,11 @@ Foam::Function1<Type>::New
|
|||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr,
|
||||||
const bool mandatory
|
const bool mandatory
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return Function1<Type>::New(entryName, dict, word::null, mandatory);
|
return Function1<Type>::New(entryName, dict, word::null, obrPtr, mandatory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -201,11 +212,12 @@ Foam::Function1<Type>::NewIfPresent
|
|||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const word& redirectType
|
const word& redirectType,
|
||||||
|
const objectRegistry* obrPtr
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// mandatory = false
|
// mandatory = false
|
||||||
return Function1<Type>::New(entryName, dict, redirectType, false);
|
return Function1<Type>::New(entryName, dict, redirectType, obrPtr, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -218,6 +230,7 @@ Foam::Function1<Type>::New
|
|||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
enum keyType::option matchOpt,
|
enum keyType::option matchOpt,
|
||||||
|
const objectRegistry* obrPtr,
|
||||||
const bool mandatory
|
const bool mandatory
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -259,6 +272,7 @@ Foam::Function1<Type>::New
|
|||||||
eptr, // Already resolved
|
eptr, // Already resolved
|
||||||
dict,
|
dict,
|
||||||
word::null,
|
word::null,
|
||||||
|
obrPtr,
|
||||||
mandatory
|
mandatory
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -292,12 +306,13 @@ Foam::Function1<Type>::New
|
|||||||
/// const word& entryName,
|
/// const word& entryName,
|
||||||
/// const dictionary& dict,
|
/// const dictionary& dict,
|
||||||
/// const Type& deflt,
|
/// const Type& deflt,
|
||||||
/// enum keyType::option matchOpt
|
/// enum keyType::option matchOpt,
|
||||||
|
/// const objectRegistry* obrPtr
|
||||||
/// )
|
/// )
|
||||||
/// {
|
/// {
|
||||||
/// auto fref
|
/// auto fref
|
||||||
/// (
|
/// (
|
||||||
/// Function1<Type>::New(entryName, dict, cache, matchOpt, false)
|
/// Function1<Type>::New(entryName, dict, cache, matchOpt, obrPtr,false)
|
||||||
/// );
|
/// );
|
||||||
///
|
///
|
||||||
/// if (!fref)
|
/// if (!fref)
|
||||||
@ -308,5 +323,4 @@ Foam::Function1<Type>::New
|
|||||||
/// return fref;
|
/// return fref;
|
||||||
/// }
|
/// }
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -42,10 +42,11 @@ template<class Type>
|
|||||||
Foam::Function1Types::LimitRange<Type>::LimitRange
|
Foam::Function1Types::LimitRange<Type>::LimitRange
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Function1<Type>(entryName)
|
Function1<Type>(entryName, obrPtr)
|
||||||
{
|
{
|
||||||
read(dict);
|
read(dict);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -135,8 +135,13 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from entry name and dictionary
|
//- Construct from entry name, dictionary and optional registry
|
||||||
LimitRange(const word& entryName, const dictionary& dict);
|
LimitRange
|
||||||
|
(
|
||||||
|
const word& entryName,
|
||||||
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr = nullptr
|
||||||
|
);
|
||||||
|
|
||||||
//- Copy construct
|
//- Copy construct
|
||||||
explicit LimitRange(const LimitRange<Type>& rhs);
|
explicit LimitRange(const LimitRange<Type>& rhs);
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2017 OpenFOAM Foundation
|
Copyright (C) 2017 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -30,9 +31,13 @@ License
|
|||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::Function1Types::OneConstant<Type>::OneConstant(const word& entryName)
|
Foam::Function1Types::OneConstant<Type>::OneConstant
|
||||||
|
(
|
||||||
|
const word& entryName,
|
||||||
|
const objectRegistry* obrPtr
|
||||||
|
)
|
||||||
:
|
:
|
||||||
Function1<Type>(entryName)
|
Function1<Type>(entryName, obrPtr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -40,10 +45,11 @@ template<class Type>
|
|||||||
Foam::Function1Types::OneConstant<Type>::OneConstant
|
Foam::Function1Types::OneConstant<Type>::OneConstant
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Function1<Type>(entryName, dict)
|
Function1<Type>(entryName, dict, obrPtr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2017 OpenFOAM Foundation
|
Copyright (C) 2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -75,11 +75,20 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from entry name
|
//- Construct from entry name and optional registry
|
||||||
explicit OneConstant(const word& entryName);
|
explicit OneConstant
|
||||||
|
(
|
||||||
|
const word& entryName,
|
||||||
|
const objectRegistry* obrPtr = nullptr
|
||||||
|
);
|
||||||
|
|
||||||
//- Construct from entry name and dictionary
|
//- Construct from entry name, dictionary and optional registry
|
||||||
OneConstant(const word& entryName, const dictionary& dict);
|
OneConstant
|
||||||
|
(
|
||||||
|
const word& entryName,
|
||||||
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr = nullptr
|
||||||
|
);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- Construct and return a clone
|
||||||
virtual tmp<Function1<Type>> clone() const
|
virtual tmp<Function1<Type>> clone() const
|
||||||
|
|||||||
@ -65,10 +65,11 @@ template<class Type>
|
|||||||
Foam::Function1Types::Polynomial<Type>::Polynomial
|
Foam::Function1Types::Polynomial<Type>::Polynomial
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Function1<Type>(entryName, dict),
|
Function1<Type>(entryName, dict, obrPtr),
|
||||||
coeffs_(),
|
coeffs_(),
|
||||||
canIntegrate_(true)
|
canIntegrate_(true)
|
||||||
{
|
{
|
||||||
@ -104,10 +105,11 @@ template<class Type>
|
|||||||
Foam::Function1Types::Polynomial<Type>::Polynomial
|
Foam::Function1Types::Polynomial<Type>::Polynomial
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const List<Tuple2<Type, Type>>& coeffs
|
const List<Tuple2<Type, Type>>& coeffs,
|
||||||
|
const objectRegistry* obrPtr
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Function1<Type>(entryName),
|
Function1<Type>(entryName, obrPtr),
|
||||||
coeffs_(coeffs),
|
coeffs_(coeffs),
|
||||||
canIntegrate_(true)
|
canIntegrate_(true)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -108,14 +108,20 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from entry name and dictionary
|
//- Construct from entry name, dictionary and optional registry
|
||||||
Polynomial(const word& entryName, const dictionary& dict);
|
Polynomial
|
||||||
|
(
|
||||||
|
const word& entryName,
|
||||||
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr = nullptr
|
||||||
|
);
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
Polynomial
|
Polynomial
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const List<Tuple2<Type, Type>>& coeffs
|
const List<Tuple2<Type, Type>>& coeffs,
|
||||||
|
const objectRegistry* obrPtr = nullptr
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Copy constructor
|
//- Copy constructor
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2017 OpenFOAM Foundation
|
Copyright (C) 2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -28,7 +28,7 @@ License
|
|||||||
|
|
||||||
#include "Scale.H"
|
#include "Scale.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::Function1Types::Scale<Type>::read(const dictionary& coeffs)
|
void Foam::Function1Types::Scale<Type>::read(const dictionary& coeffs)
|
||||||
@ -38,14 +38,17 @@ void Foam::Function1Types::Scale<Type>::read(const dictionary& coeffs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::Function1Types::Scale<Type>::Scale
|
Foam::Function1Types::Scale<Type>::Scale
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Function1<Type>(entryName)
|
Function1<Type>(entryName, obrPtr)
|
||||||
{
|
{
|
||||||
read(dict);
|
read(dict);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2017 OpenFOAM Foundation
|
Copyright (C) 2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -122,11 +122,12 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from entry name and dictionary
|
//- Construct from entry name, dictionary and optional registry
|
||||||
Scale
|
Scale
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr = nullptr
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Copy construct
|
//- Copy construct
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2016-2017 OpenFOAM Foundation
|
Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -34,10 +34,11 @@ template<class Type>
|
|||||||
Foam::Function1Types::Sine<Type>::Sine
|
Foam::Function1Types::Sine<Type>::Sine
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Function1<Type>(entryName, dict),
|
Function1<Type>(entryName, dict, obrPtr),
|
||||||
t0_(dict.getOrDefault<scalar>("t0", 0)),
|
t0_(dict.getOrDefault<scalar>("t0", 0)),
|
||||||
amplitude_(Function1<scalar>::NewIfPresent("amplitude", dict)),
|
amplitude_(Function1<scalar>::NewIfPresent("amplitude", dict)),
|
||||||
period_(Function1<scalar>::NewIfPresent("period", dict)),
|
period_(Function1<scalar>::NewIfPresent("period", dict)),
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2016-2017 OpenFOAM Foundation
|
Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -181,8 +181,13 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from entry name and dictionary
|
//- Construct from entry name, dictionary and optional registry
|
||||||
Sine(const word& entryName, const dictionary& dict);
|
Sine
|
||||||
|
(
|
||||||
|
const word& entryName,
|
||||||
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr = nullptr
|
||||||
|
);
|
||||||
|
|
||||||
//- Copy construct
|
//- Copy construct
|
||||||
explicit Sine(const Sine<Type>& rhs);
|
explicit Sine(const Sine<Type>& rhs);
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2016-2017 OpenFOAM Foundation
|
Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -34,10 +34,11 @@ template<class Type>
|
|||||||
Foam::Function1Types::Square<Type>::Square
|
Foam::Function1Types::Square<Type>::Square
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Sine<Type>(entryName, dict),
|
Sine<Type>(entryName, dict, obrPtr),
|
||||||
mark_(dict.getOrDefaultCompat<scalar>("mark", {{"markSpace", 2006}}, 1)),
|
mark_(dict.getOrDefaultCompat<scalar>("mark", {{"markSpace", 2006}}, 1)),
|
||||||
space_(dict.getOrDefault<scalar>("space", 1))
|
space_(dict.getOrDefault<scalar>("space", 1))
|
||||||
{}
|
{}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2016-2017 OpenFOAM Foundation
|
Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -144,8 +144,13 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from entry name and dictionary
|
//- Construct from entry name, dictionary and optional registry
|
||||||
Square(const word& entryName, const dictionary& dict);
|
Square
|
||||||
|
(
|
||||||
|
const word& entryName,
|
||||||
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr = nullptr
|
||||||
|
);
|
||||||
|
|
||||||
//- Copy construct
|
//- Copy construct
|
||||||
explicit Square(const Square<Type>& rhs);
|
explicit Square(const Square<Type>& rhs);
|
||||||
|
|||||||
@ -34,10 +34,11 @@ template<class Type>
|
|||||||
Foam::Function1Types::Table<Type>::Table
|
Foam::Function1Types::Table<Type>::Table
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
TableBase<Type>(entryName, dict),
|
TableBase<Type>(entryName, dict, obrPtr),
|
||||||
fName_()
|
fName_()
|
||||||
{
|
{
|
||||||
const entry* eptr = dict.findEntry(entryName, keyType::LITERAL);
|
const entry* eptr = dict.findEntry(entryName, keyType::LITERAL);
|
||||||
|
|||||||
@ -119,8 +119,13 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from entry name and dictionary.
|
//- Construct from entry name, dictionary and optional registry
|
||||||
Table(const word& entryName, const dictionary& dict);
|
Table
|
||||||
|
(
|
||||||
|
const word& entryName,
|
||||||
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr = nullptr
|
||||||
|
);
|
||||||
|
|
||||||
//- Copy construct
|
//- Copy construct
|
||||||
explicit Table(const Table<Type>& tbl);
|
explicit Table(const Table<Type>& tbl);
|
||||||
|
|||||||
@ -62,10 +62,11 @@ template<class Type>
|
|||||||
Foam::Function1Types::TableBase<Type>::TableBase
|
Foam::Function1Types::TableBase<Type>::TableBase
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Function1<Type>(name, dict),
|
Function1<Type>(name, dict, obrPtr),
|
||||||
bounding_
|
bounding_
|
||||||
(
|
(
|
||||||
bounds::repeatableBoundingNames.getOrDefault
|
bounds::repeatableBoundingNames.getOrDefault
|
||||||
@ -103,13 +104,6 @@ Foam::Function1Types::TableBase<Type>::TableBase(const TableBase<Type>& tbl)
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
Foam::Function1Types::TableBase<Type>::~TableBase()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -101,14 +101,19 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from dictionary - note table is not populated
|
//- Construct from dictionary - note table is not populated
|
||||||
TableBase(const word& name, const dictionary& dict);
|
TableBase
|
||||||
|
(
|
||||||
|
const word& name,
|
||||||
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr = nullptr
|
||||||
|
);
|
||||||
|
|
||||||
//- Copy constructor. Note: steals interpolator, tableSamples
|
//- Copy constructor. Note: steals interpolator, tableSamples
|
||||||
explicit TableBase(const TableBase<Type>& tbl);
|
explicit TableBase(const TableBase<Type>& tbl);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~TableBase();
|
virtual ~TableBase() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2019 OpenCFD Ltd.
|
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -34,10 +34,11 @@ template<class Type>
|
|||||||
Foam::Function1Types::TableFile<Type>::TableFile
|
Foam::Function1Types::TableFile<Type>::TableFile
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
TableBase<Type>(entryName, dict),
|
TableBase<Type>(entryName, dict, obrPtr),
|
||||||
fName_()
|
fName_()
|
||||||
{
|
{
|
||||||
dict.readEntry("file", fName_);
|
dict.readEntry("file", fName_);
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -101,7 +101,12 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from entry name and "file" found in dictionary
|
//- Construct from entry name and "file" found in dictionary
|
||||||
TableFile(const word& entryName, const dictionary& dict);
|
TableFile
|
||||||
|
(
|
||||||
|
const word& entryName,
|
||||||
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr = nullptr
|
||||||
|
);
|
||||||
|
|
||||||
//- Copy construct
|
//- Copy construct
|
||||||
explicit TableFile(const TableFile<Type>& tbl);
|
explicit TableFile(const TableFile<Type>& tbl);
|
||||||
|
|||||||
@ -1,43 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | www.openfoam.com
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
Copyright (C) 2017 OpenFOAM Foundation
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "Uniform.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
Foam::Function1Types::Uniform<Type>::Uniform
|
|
||||||
(
|
|
||||||
const word& entryName,
|
|
||||||
const dictionary& dict
|
|
||||||
)
|
|
||||||
:
|
|
||||||
Constant<Type>(entryName, dict)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2017 OpenFOAM Foundation
|
Copyright (C) 2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -38,15 +38,12 @@ Description
|
|||||||
<entryName> uniform <value>
|
<entryName> uniform <value>
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
Uniform.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef Function1Types_Uniform_H
|
#ifndef Function1Types_Uniform_H
|
||||||
#define Function1Types_Uniform_H
|
#define Function1Types_Uniform_H
|
||||||
|
|
||||||
#include "Function1.H"
|
#include "Constant.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -81,8 +78,16 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from entry name and dictionary
|
//- Construct from entry name, dictionary and optional registry
|
||||||
Uniform(const word& entryName, const dictionary& dict);
|
Uniform
|
||||||
|
(
|
||||||
|
const word& entryName,
|
||||||
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr = nullptr
|
||||||
|
)
|
||||||
|
:
|
||||||
|
Constant<Type>(entryName, dict, obrPtr)
|
||||||
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -93,12 +98,6 @@ public:
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#ifdef NoRepository
|
|
||||||
#include "Uniform.C"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2017 OpenFOAM Foundation
|
Copyright (C) 2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -31,9 +31,13 @@ License
|
|||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::Function1Types::ZeroConstant<Type>::ZeroConstant(const word& entryName)
|
Foam::Function1Types::ZeroConstant<Type>::ZeroConstant
|
||||||
|
(
|
||||||
|
const word& entryName,
|
||||||
|
const objectRegistry* obrPtr
|
||||||
|
)
|
||||||
:
|
:
|
||||||
Function1<Type>(entryName)
|
Function1<Type>(entryName, obrPtr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -41,10 +45,11 @@ template<class Type>
|
|||||||
Foam::Function1Types::ZeroConstant<Type>::ZeroConstant
|
Foam::Function1Types::ZeroConstant<Type>::ZeroConstant
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Function1<Type>(entryName, dict)
|
Function1<Type>(entryName, dict, obrPtr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2017 OpenFOAM Foundation
|
Copyright (C) 2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -84,11 +84,20 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from entry name
|
//- Construct from entry name and optional registry
|
||||||
explicit ZeroConstant(const word& entryName);
|
explicit ZeroConstant
|
||||||
|
(
|
||||||
|
const word& entryName,
|
||||||
|
const objectRegistry* obrPtr = nullptr
|
||||||
|
);
|
||||||
|
|
||||||
//- Construct from entry name and dictionary
|
//- Construct from entry name, dictionary and optional registry
|
||||||
ZeroConstant(const word& entryName, const dictionary& dict);
|
ZeroConstant
|
||||||
|
(
|
||||||
|
const word& entryName,
|
||||||
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr = nullptr
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2017 OpenFOAM Foundation
|
Copyright (C) 2017 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -43,10 +44,11 @@ namespace Function1Types
|
|||||||
Foam::Function1Types::halfCosineRamp::halfCosineRamp
|
Foam::Function1Types::halfCosineRamp::halfCosineRamp
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ramp(entryName, dict)
|
ramp(entryName, dict, obrPtr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2017 OpenFOAM Foundation
|
Copyright (C) 2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -67,8 +67,13 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from entry name and dictionary
|
//- Construct from entry name, dictionary and optional registry
|
||||||
halfCosineRamp(const word& entryName, const dictionary& dict);
|
halfCosineRamp
|
||||||
|
(
|
||||||
|
const word& entryName,
|
||||||
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr = nullptr
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2017 OpenFOAM Foundation
|
Copyright (C) 2017 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -43,10 +44,11 @@ namespace Function1Types
|
|||||||
Foam::Function1Types::linearRamp::linearRamp
|
Foam::Function1Types::linearRamp::linearRamp
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ramp(entryName, dict)
|
ramp(entryName, dict, obrPtr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2017 OpenFOAM Foundation
|
Copyright (C) 2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -67,8 +67,13 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from entry name and dictionary
|
//- Construct from entry name, dictionary and optional registry
|
||||||
linearRamp(const word& entryName, const dictionary& dict);
|
linearRamp
|
||||||
|
(
|
||||||
|
const word& entryName,
|
||||||
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr = nullptr
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2017 OpenFOAM Foundation
|
Copyright (C) 2017 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -43,10 +44,11 @@ namespace Function1Types
|
|||||||
Foam::Function1Types::quadraticRamp::quadraticRamp
|
Foam::Function1Types::quadraticRamp::quadraticRamp
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ramp(entryName, dict)
|
ramp(entryName, dict, obrPtr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2017 OpenFOAM Foundation
|
Copyright (C) 2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -67,8 +67,13 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from entry name and dictionary
|
//- Construct from entry name, dictionary and optional registry
|
||||||
quadraticRamp(const word& entryName, const dictionary& dict);
|
quadraticRamp
|
||||||
|
(
|
||||||
|
const word& entryName,
|
||||||
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr = nullptr
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2017 OpenFOAM Foundation
|
Copyright (C) 2017 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -43,7 +44,8 @@ namespace Function1Types
|
|||||||
Foam::Function1Types::quarterCosineRamp::quarterCosineRamp
|
Foam::Function1Types::quarterCosineRamp::quarterCosineRamp
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ramp(entryName, dict)
|
ramp(entryName, dict)
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2017 OpenFOAM Foundation
|
Copyright (C) 2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -67,8 +67,13 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from entry name and dictionary
|
//- Construct from entry name, dictionary and optional registry
|
||||||
quarterCosineRamp(const word& entryName, const dictionary& dict);
|
quarterCosineRamp
|
||||||
|
(
|
||||||
|
const word& entryName,
|
||||||
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr = nullptr
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2017 OpenFOAM Foundation
|
Copyright (C) 2017 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -43,10 +44,11 @@ namespace Function1Types
|
|||||||
Foam::Function1Types::quarterSineRamp::quarterSineRamp
|
Foam::Function1Types::quarterSineRamp::quarterSineRamp
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ramp(entryName, dict)
|
ramp(entryName, dict, obrPtr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2017 OpenFOAM Foundation
|
Copyright (C) 2017 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -66,8 +67,13 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from entry name and dictionary
|
//- Construct from entry name, dictionary and optional registry
|
||||||
quarterSineRamp(const word& entryName, const dictionary& dict);
|
quarterSineRamp
|
||||||
|
(
|
||||||
|
const word& entryName,
|
||||||
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr = nullptr
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2017 OpenFOAM Foundation
|
Copyright (C) 2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -40,10 +40,11 @@ void Foam::Function1Types::ramp::read(const dictionary& coeffs)
|
|||||||
Foam::Function1Types::ramp::ramp
|
Foam::Function1Types::ramp::ramp
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Function1<scalar>(entryName, dict)
|
Function1<scalar>(entryName, dict, obrPtr)
|
||||||
{
|
{
|
||||||
read(dict);
|
read(dict);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2017 OpenFOAM Foundation
|
Copyright (C) 2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -119,11 +119,12 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from entry name and dictionary
|
//- Construct from entry name, dictionary and optional registry
|
||||||
ramp
|
ramp
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr = nullptr
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -43,10 +43,11 @@ namespace Function1Types
|
|||||||
Foam::Function1Types::stepFunction::stepFunction
|
Foam::Function1Types::stepFunction::stepFunction
|
||||||
(
|
(
|
||||||
const word& entryName,
|
const word& entryName,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ramp(entryName, dict)
|
ramp(entryName, dict, obrPtr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -66,8 +66,13 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from entry name and dictionary
|
//- Construct from entry name, dictionary and optional registry
|
||||||
stepFunction(const word& entryName, const dictionary& dict);
|
stepFunction
|
||||||
|
(
|
||||||
|
const word& entryName,
|
||||||
|
const dictionary& dict,
|
||||||
|
const objectRegistry* obrPtr = nullptr
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2012-2016 OpenFOAM Foundation
|
Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -40,7 +40,7 @@ Foam::TimeFunction1<Type>::TimeFunction1
|
|||||||
:
|
:
|
||||||
time_(runTime),
|
time_(runTime),
|
||||||
name_(entryName),
|
name_(entryName),
|
||||||
entry_(Function1<Type>::New(entryName, dict))
|
entry_(Function1<Type>::New(entryName, dict, &runTime))
|
||||||
{
|
{
|
||||||
entry_->convertTimeBase(runTime);
|
entry_->convertTimeBase(runTime);
|
||||||
}
|
}
|
||||||
@ -81,7 +81,7 @@ Foam::TimeFunction1<Type>::TimeFunction1
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::TimeFunction1<Type>::reset(const dictionary& dict)
|
void Foam::TimeFunction1<Type>::reset(const dictionary& dict)
|
||||||
{
|
{
|
||||||
entry_ = Function1<Type>::New(name_, dict);
|
entry_ = Function1<Type>::New(name_, dict, &time_);
|
||||||
entry_->convertTimeBase(time_);
|
entry_->convertTimeBase(time_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -253,7 +253,7 @@ void pointNoise::calculate()
|
|||||||
fName = argList::envGlobalPath()/fName;
|
fName = argList::envGlobalPath()/fName;
|
||||||
}
|
}
|
||||||
|
|
||||||
Function1Types::CSV<scalar> data("pressure", dict_, fName);
|
Function1Types::CSV<scalar> data("pressure", dict_, nullptr, fName);
|
||||||
processData(filei, data);
|
processData(filei, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user