Rename DataEntry -> Function1

Function1 is an abstract base-class of run-time selectable unary
functions which may be composed of other Function1's allowing the user
to specify complex functions of a single scalar variable, e.g. time.
The implementations need not be a simple or continuous functions;
interpolated tables and polynomials are also supported.  In fact form of
mapping between a single scalar input and a single primitive type output
is supportable.

The primary application of Function1 is in time-varying boundary
conditions, it also used for other functions of time, e.g. injected mass
is spray simulations but is not limited to functions of time.
This commit is contained in:
Henry Weller
2016-02-08 16:18:07 +00:00
parent c3f6a149d2
commit 968c888fc4
102 changed files with 497 additions and 494 deletions

View File

@ -0,0 +1,3 @@
Test-Function1.C
EXE = $(FOAM_USER_APPBIN)/Test-Function1

View File

@ -22,15 +22,15 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application Application
testDataEntry Test-Function1
Description Description
Tests DataEntry Tests Function1
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "fvCFD.H" #include "fvCFD.H"
#include "DataEntry.H" #include "Function1.H"
#include "IOdictionary.H" #include "IOdictionary.H"
#include "linearInterpolationWeights.H" #include "linearInterpolationWeights.H"
#include "splineInterpolationWeights.H" #include "splineInterpolationWeights.H"
@ -54,8 +54,8 @@ int main(int argc, char *argv[])
//values[0] = 0.0; //values[0] = 0.0;
//values[1] = 1.0; //values[1] = 1.0;
//linearInterpolationWeights interpolator linearInterpolationWeights interpolator
splineInterpolationWeights interpolator //splineInterpolationWeights interpolator
( (
samples samples
); );
@ -98,11 +98,11 @@ int main(int argc, char *argv[])
return 1; return 1;
} }
IOdictionary dataEntryProperties IOdictionary function1Properties
( (
IOobject IOobject
( (
"dataEntryProperties", "function1Properties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ_IF_MODIFIED, IOobject::MUST_READ_IF_MODIFIED,
@ -110,19 +110,19 @@ int main(int argc, char *argv[])
) )
); );
autoPtr<DataEntry<scalar>> dataEntry autoPtr<Function1<scalar>> function1
( (
DataEntry<scalar>::New Function1<scalar>::New
( (
"dataEntry", "function1",
dataEntryProperties function1Properties
) )
); );
scalar x0 = readScalar(dataEntryProperties.lookup("x0")); scalar x0 = readScalar(function1Properties.lookup("x0"));
scalar x1 = readScalar(dataEntryProperties.lookup("x1")); scalar x1 = readScalar(function1Properties.lookup("x1"));
Info<< "Data entry type: " << dataEntry().type() << nl << endl; Info<< "Data entry type: " << function1().type() << nl << endl;
Info<< "Inputs" << nl Info<< "Inputs" << nl
<< " x0 = " << x0 << nl << " x0 = " << x0 << nl
@ -130,12 +130,12 @@ int main(int argc, char *argv[])
<< endl; << endl;
Info<< "Interpolation" << nl Info<< "Interpolation" << nl
<< " f(x0) = " << dataEntry().value(x0) << nl << " f(x0) = " << function1().value(x0) << nl
<< " f(x1) = " << dataEntry().value(x1) << nl << " f(x1) = " << function1().value(x1) << nl
<< endl; << endl;
Info<< "Integration" << nl Info<< "Integration" << nl
<< " int(f(x)) lim(x0->x1) = " << dataEntry().integrate(x0, x1) << nl << " int(f(x)) lim(x0->x1) = " << function1().integrate(x0, x1) << nl
<< endl; << endl;
return 0; return 0;

View File

@ -11,7 +11,7 @@ FoamFile
format ascii; format ascii;
class dictionary; class dictionary;
location "constant"; location "constant";
object dataEntryProperties; object function1Properties;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -19,7 +19,7 @@ x0 0.5;
x1 1; x1 1;
dataEntry table ((0 0)(10 1)); function1 table ((0 0)(10 1));
// ************************************************************************* // // ************************************************************************* //

View File

@ -1,3 +0,0 @@
Test-DataEntry.C
EXE = $(FOAM_USER_APPBIN)/Test-DataEntry

View File

@ -135,7 +135,7 @@ int main(int argc, char *argv[])
#include "createFields.H" #include "createFields.H"
Info<< "Reading data file" << endl; Info<< "Reading data file" << endl;
DataEntryTypes::CSV<scalar> pData("pressure", dict, "Data"); Function1Types::CSV<scalar> pData("pressure", dict, "Data");
// time history data // time history data
const scalarField t(pData.x()); const scalarField t(pData.x());

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -76,7 +76,7 @@ CONSTRUCT
scalarData_(readScalar(dict.lookup("scalarData"))), scalarData_(readScalar(dict.lookup("scalarData"))),
data_(pTraits<TYPE>(dict.lookup("data"))), data_(pTraits<TYPE>(dict.lookup("data"))),
fieldData_("fieldData", dict, p.size()), fieldData_("fieldData", dict, p.size()),
timeVsData_(DataEntry<TYPE>::New("timeVsData", dict)), timeVsData_(Function1<TYPE>::New("timeVsData", dict)),
wordData_(dict.lookupOrDefault<word>("wordName", "wordDefault")), wordData_(dict.lookupOrDefault<word>("wordName", "wordDefault")),
labelData_(-1), labelData_(-1),
boolData_(false) boolData_(false)
@ -203,7 +203,10 @@ void Foam::CLASS::updateCoeffs()
); );
const scalarField& phip = const scalarField& phip =
this->patch().template lookupPatchField<surfaceScalarField, scalar>("phi"); this->patch().template lookupPatchField<surfaceScalarField, scalar>
(
"phi"
);
this->valueFraction() = 1.0 - pos(phip); this->valueFraction() = 1.0 - pos(phip);
PARENT::updateCoeffs(); PARENT::updateCoeffs();

View File

@ -80,7 +80,7 @@ SourceFiles
#define CONSTRUCT_H #define CONSTRUCT_H
#include "BASEFvPatchFields.H" #include "BASEFvPatchFields.H"
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -110,7 +110,7 @@ class CONSTRUCT
FIELD fieldData_; FIELD fieldData_;
//- Type specified as a function of time for time-varying BCs //- Type specified as a function of time for time-varying BCs
autoPtr<DataEntry<TYPE>> timeVsData_; autoPtr<Function1<TYPE>> timeVsData_;
//- Word entry, e.g. pName_ for name of the pressure field on database //- Word entry, e.g. pName_ for name of the pressure field on database
word wordData_; word wordData_;

View File

@ -123,7 +123,7 @@ DebugSwitches
DICGaussSeidel 0; DICGaussSeidel 0;
DILU 0; DILU 0;
DILUGaussSeidel 0; DILUGaussSeidel 0;
DataEntry 0; Function1 0;
DeardorffDiffStress 0; DeardorffDiffStress 0;
DispersionModel 0; DispersionModel 0;
DispersionRASModel 0; DispersionRASModel 0;

View File

@ -72,7 +72,7 @@ primitives/septernion/septernion.C
primitives/triad/triad.C primitives/triad/triad.C
/* functions, data entries */ /* functions, data entries */
primitives/functions/DataEntry/makeDataEntries.C primitives/functions/Function1/makeDataEntries.C
primitives/functions/Polynomial/polynomialFunction.C primitives/functions/Polynomial/polynomialFunction.C
primitives/subModelBase/subModelBase.C primitives/subModelBase/subModelBase.C

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -50,7 +50,7 @@ uniformFixedValuePointPatchField
) )
: :
fixedValuePointPatchField<Type>(p, iF, dict, false), fixedValuePointPatchField<Type>(p, iF, dict, false),
uniformValue_(DataEntry<Type>::New("uniformValue", dict)) uniformValue_(Function1<Type>::New("uniformValue", dict))
{ {
if (dict.found("value")) if (dict.found("value"))
{ {

View File

@ -36,7 +36,7 @@ Description
} }
\endverbatim \endverbatim
The uniformValue entry is a DataEntry type, able to describe time The uniformValue entry is a Function1 type, able to describe time
varying functions. The example above gives the usage for supplying a varying functions. The example above gives the usage for supplying a
constant value. constant value.
@ -49,7 +49,7 @@ SourceFiles
#define uniformFixedValuePointPatchField_H #define uniformFixedValuePointPatchField_H
#include "fixedValuePointPatchField.H" #include "fixedValuePointPatchField.H"
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -67,7 +67,7 @@ class uniformFixedValuePointPatchField
{ {
// Private data // Private data
autoPtr<DataEntry<Type>> uniformValue_; autoPtr<Function1<Type>> uniformValue_;
public: public:
@ -150,7 +150,7 @@ public:
// Access // Access
//- Return the fluctuation scale //- Return the fluctuation scale
const DataEntry<Type>& uniformValue() const const Function1<Type>& uniformValue() const
{ {
return uniformValue_; return uniformValue_;
} }

View File

@ -30,7 +30,7 @@ License
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template<> template<>
Foam::label Foam::DataEntryTypes::CSV<Foam::label>::readValue Foam::label Foam::Function1Types::CSV<Foam::label>::readValue
( (
const List<string>& splitted const List<string>& splitted
) )
@ -48,7 +48,7 @@ Foam::label Foam::DataEntryTypes::CSV<Foam::label>::readValue
template<> template<>
Foam::scalar Foam::DataEntryTypes::CSV<Foam::scalar>::readValue Foam::scalar Foam::Function1Types::CSV<Foam::scalar>::readValue
( (
const List<string>& splitted const List<string>& splitted
) )
@ -66,7 +66,7 @@ Foam::scalar Foam::DataEntryTypes::CSV<Foam::scalar>::readValue
template<class Type> template<class Type>
Type Foam::DataEntryTypes::CSV<Type>::readValue(const List<string>& splitted) Type Foam::Function1Types::CSV<Type>::readValue(const List<string>& splitted)
{ {
Type result; Type result;
@ -89,7 +89,7 @@ Type Foam::DataEntryTypes::CSV<Type>::readValue(const List<string>& splitted)
template<class Type> template<class Type>
void Foam::DataEntryTypes::CSV<Type>::read() void Foam::Function1Types::CSV<Type>::read()
{ {
fileName expandedFile(fName_); fileName expandedFile(fName_);
IFstream is(expandedFile.expand()); IFstream is(expandedFile.expand());
@ -200,7 +200,7 @@ void Foam::DataEntryTypes::CSV<Type>::read()
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Type> template<class Type>
Foam::DataEntryTypes::CSV<Type>::CSV Foam::Function1Types::CSV<Type>::CSV
( (
const word& entryName, const word& entryName,
const dictionary& dict, const dictionary& dict,
@ -231,7 +231,7 @@ Foam::DataEntryTypes::CSV<Type>::CSV
template<class Type> template<class Type>
Foam::DataEntryTypes::CSV<Type>::CSV(const CSV<Type>& tbl) Foam::Function1Types::CSV<Type>::CSV(const CSV<Type>& tbl)
: :
TableBase<Type>(tbl), TableBase<Type>(tbl),
nHeaderLine_(tbl.nHeaderLine_), nHeaderLine_(tbl.nHeaderLine_),
@ -246,14 +246,14 @@ Foam::DataEntryTypes::CSV<Type>::CSV(const CSV<Type>& tbl)
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class Type> template<class Type>
Foam::DataEntryTypes::CSV<Type>::~CSV() Foam::Function1Types::CSV<Type>::~CSV()
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type> template<class Type>
const Foam::fileName& Foam::DataEntryTypes::CSV<Type>::fName() const const Foam::fileName& Foam::Function1Types::CSV<Type>::fName() const
{ {
return fName_; return fName_;
} }

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class Class
Foam::DataEntryTypes::CSV Foam::Function1Types::CSV
Description Description
Templated CSV container data entry. Reference column is always a scalar, Templated CSV container data entry. Reference column is always a scalar,
@ -51,7 +51,7 @@ SourceFiles
#ifndef CSV_H #ifndef CSV_H
#define CSV_H #define CSV_H
#include "DataEntry.H" #include "Function1.H"
#include "TableBase.H" #include "TableBase.H"
#include "Tuple2.H" #include "Tuple2.H"
#include "labelList.H" #include "labelList.H"
@ -63,15 +63,15 @@ namespace Foam
{ {
// Forward declaration of friend functions and operators // Forward declaration of friend functions and operators
namespace DataEntryTypes namespace Function1Types
{ {
template<class Type> class CSV; template<class Type> class CSV;
}; };
template<class Type> template<class Type>
Ostream& operator<<(Ostream&, const DataEntryTypes::CSV<Type>&); Ostream& operator<<(Ostream&, const Function1Types::CSV<Type>&);
namespace DataEntryTypes namespace Function1Types
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
@ -139,9 +139,9 @@ public:
CSV(const CSV<Type>& tbl); CSV(const CSV<Type>& tbl);
//- Construct and return a clone //- Construct and return a clone
virtual tmp<DataEntry<Type>> clone() const virtual tmp<Function1<Type>> clone() const
{ {
return tmp<DataEntry<Type>>(new CSV<Type>(*this)); return tmp<Function1<Type>>(new CSV<Type>(*this));
} }
@ -180,7 +180,7 @@ Foam::scalar CSV<scalar>::readValue(const List<string>& splitted);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace DataEntryTypes } // End namespace Function1Types
} // End namespace Foam } // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -23,7 +23,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
@ -31,10 +31,10 @@ template<class Type>
Foam::Ostream& Foam::operator<< Foam::Ostream& Foam::operator<<
( (
Ostream& os, Ostream& os,
const DataEntryTypes::CSV<Type>& tbl const Function1Types::CSV<Type>& tbl
) )
{ {
os << static_cast<const DataEntry<Type>& >(tbl) os << static_cast<const Function1<Type>& >(tbl)
<< token::SPACE << tbl.nHeaderLine_ << token::SPACE << tbl.nHeaderLine_
<< token::SPACE << tbl.timeColumn_ << token::SPACE << tbl.timeColumn_
<< token::SPACE << tbl.componentColumns_ << token::SPACE << tbl.componentColumns_
@ -50,9 +50,9 @@ Foam::Ostream& Foam::operator<<
template<class Type> template<class Type>
void Foam::DataEntryTypes::CSV<Type>::writeData(Ostream& os) const void Foam::Function1Types::CSV<Type>::writeData(Ostream& os) const
{ {
DataEntry<Type>::writeData(os); Function1<Type>::writeData(os);
os << token::END_STATEMENT << nl; os << token::END_STATEMENT << nl;
os << indent << word(this->name() + "Coeffs") << nl; os << indent << word(this->name() + "Coeffs") << nl;
os << indent << token::BEGIN_BLOCK << incrIndent << nl; os << indent << token::BEGIN_BLOCK << incrIndent << nl;

View File

@ -28,13 +28,13 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Type> template<class Type>
Foam::DataEntryTypes::Constant<Type>::Constant Foam::Function1Types::Constant<Type>::Constant
( (
const word& entryName, const word& entryName,
const dictionary& dict const dictionary& dict
) )
: :
DataEntry<Type>(entryName), Function1<Type>(entryName),
value_(pTraits<Type>::zero) value_(pTraits<Type>::zero)
{ {
Istream& is(dict.lookup(entryName)); Istream& is(dict.lookup(entryName));
@ -44,21 +44,21 @@ Foam::DataEntryTypes::Constant<Type>::Constant
template<class Type> template<class Type>
Foam::DataEntryTypes::Constant<Type>::Constant Foam::Function1Types::Constant<Type>::Constant
( (
const word& entryName, const word& entryName,
Istream& is Istream& is
) )
: :
DataEntry<Type>(entryName), Function1<Type>(entryName),
value_(pTraits<Type>(is)) value_(pTraits<Type>(is))
{} {}
template<class Type> template<class Type>
Foam::DataEntryTypes::Constant<Type>::Constant(const Constant<Type>& cnst) Foam::Function1Types::Constant<Type>::Constant(const Constant<Type>& cnst)
: :
DataEntry<Type>(cnst), Function1<Type>(cnst),
value_(cnst.value_) value_(cnst.value_)
{} {}
@ -66,21 +66,21 @@ Foam::DataEntryTypes::Constant<Type>::Constant(const Constant<Type>& cnst)
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class Type> template<class Type>
Foam::DataEntryTypes::Constant<Type>::~Constant() Foam::Function1Types::Constant<Type>::~Constant()
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type> template<class Type>
Type Foam::DataEntryTypes::Constant<Type>::value(const scalar x) const Type Foam::Function1Types::Constant<Type>::value(const scalar x) const
{ {
return value_; return value_;
} }
template<class Type> template<class Type>
Type Foam::DataEntryTypes::Constant<Type>::integrate Type Foam::Function1Types::Constant<Type>::integrate
( (
const scalar x1, const scalar x1,
const scalar x2 const scalar x2

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class Class
Foam::DataEntryTypes::Constant Foam::Function1Types::Constant
Description Description
Templated basic entry that holds a constant value. Templated basic entry that holds a constant value.
@ -40,7 +40,7 @@ SourceFiles
#ifndef Constant_H #ifndef Constant_H
#define Constant_H #define Constant_H
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -48,15 +48,15 @@ namespace Foam
{ {
// Forward declaration of friend functions and operators // Forward declaration of friend functions and operators
namespace DataEntryTypes namespace Function1Types
{ {
template<class Type> class Constant; template<class Type> class Constant;
}; };
template<class Type> template<class Type>
Ostream& operator<<(Ostream&, const DataEntryTypes::Constant<Type>&); Ostream& operator<<(Ostream&, const Function1Types::Constant<Type>&);
namespace DataEntryTypes namespace Function1Types
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
@ -66,7 +66,7 @@ namespace DataEntryTypes
template<class Type> template<class Type>
class Constant class Constant
: :
public DataEntry<Type> public Function1<Type>
{ {
// Private data // Private data
@ -92,7 +92,7 @@ public:
Constant(const word& entryName, const dictionary& dict); Constant(const word& entryName, const dictionary& dict);
//- Construct from entry name and Istream //- Construct from entry name and Istream
// Reads the constant value without the DataEntry type // Reads the constant value without the Function1 type
// for backward compatibility // for backward compatibility
Constant(const word& entryName, Istream& is); Constant(const word& entryName, Istream& is);
@ -100,9 +100,9 @@ public:
Constant(const Constant<Type>& cnst); Constant(const Constant<Type>& cnst);
//- Construct and return a clone //- Construct and return a clone
virtual tmp<DataEntry<Type>> clone() const virtual tmp<Function1<Type>> clone() const
{ {
return tmp<DataEntry<Type>>(new Constant<Type>(*this)); return tmp<Function1<Type>>(new Constant<Type>(*this));
} }
@ -135,14 +135,14 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace DataEntryTypes } // End namespace Function1Types
} // End namespace Foam } // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository #ifdef NoRepository
# include "Constant.C" # include "Constant.C"
# include "DataEntryNew.C" # include "Function1New.C"
#endif #endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -31,10 +31,10 @@ template<class Type>
Foam::Ostream& Foam::operator<< Foam::Ostream& Foam::operator<<
( (
Ostream& os, Ostream& os,
const DataEntryTypes::Constant<Type>& cnst const Function1Types::Constant<Type>& cnst
) )
{ {
os << static_cast<const DataEntry<Type>& >(cnst) os << static_cast<const Function1<Type>& >(cnst)
<< token::SPACE << cnst.value_; << token::SPACE << cnst.value_;
// Check state of Ostream // Check state of Ostream
@ -48,9 +48,9 @@ Foam::Ostream& Foam::operator<<
template<class Type> template<class Type>
void Foam::DataEntryTypes::Constant<Type>::writeData(Ostream& os) const void Foam::Function1Types::Constant<Type>::writeData(Ostream& os) const
{ {
DataEntry<Type>::writeData(os); Function1<Type>::writeData(os);
os << token::SPACE << value_ << token::END_STATEMENT << nl; os << token::SPACE << value_ << token::END_STATEMENT << nl;
} }

View File

@ -23,13 +23,13 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "DataEntry.H" #include "Function1.H"
#include "Time.H" #include "Time.H"
// * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
template<class Type> template<class Type>
Foam::DataEntry<Type>::DataEntry(const word& entryName) Foam::Function1<Type>::Function1(const word& entryName)
: :
refCount(), refCount(),
name_(entryName) name_(entryName)
@ -37,7 +37,7 @@ Foam::DataEntry<Type>::DataEntry(const word& entryName)
template<class Type> template<class Type>
Foam::DataEntry<Type>::DataEntry(const DataEntry<Type>& de) Foam::Function1<Type>::Function1(const Function1<Type>& de)
: :
refCount(), refCount(),
name_(de.name_) name_(de.name_)
@ -47,28 +47,28 @@ Foam::DataEntry<Type>::DataEntry(const DataEntry<Type>& de)
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class Type> template<class Type>
Foam::DataEntry<Type>::~DataEntry() Foam::Function1<Type>::~Function1()
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type> template<class Type>
const Foam::word& Foam::DataEntry<Type>::name() const const Foam::word& Foam::Function1<Type>::name() const
{ {
return name_; return name_;
} }
template<class Type> template<class Type>
void Foam::DataEntry<Type>::convertTimeBase(const Time&) void Foam::Function1<Type>::convertTimeBase(const Time&)
{ {
// do nothing // do nothing
} }
template<class Type> template<class Type>
Type Foam::DataEntry<Type>::value(const scalar x) const Type Foam::Function1<Type>::value(const scalar x) const
{ {
NotImplemented; NotImplemented;
@ -77,7 +77,7 @@ Type Foam::DataEntry<Type>::value(const scalar x) const
template<class Type> template<class Type>
Type Foam::DataEntry<Type>::integrate(const scalar x1, const scalar x2) const Type Foam::Function1<Type>::integrate(const scalar x1, const scalar x2) const
{ {
NotImplemented; NotImplemented;
@ -86,7 +86,7 @@ Type Foam::DataEntry<Type>::integrate(const scalar x1, const scalar x2) const
template<class Type> template<class Type>
Foam::tmp<Foam::Field<Type>> Foam::DataEntry<Type>::value Foam::tmp<Foam::Field<Type>> Foam::Function1<Type>::value
( (
const scalarField& x const scalarField& x
) const ) const
@ -103,7 +103,7 @@ Foam::tmp<Foam::Field<Type>> Foam::DataEntry<Type>::value
template<class Type> template<class Type>
Foam::tmp<Foam::Field<Type>> Foam::DataEntry<Type>::integrate Foam::tmp<Foam::Field<Type>> Foam::Function1<Type>::integrate
( (
const scalarField& x1, const scalarField& x1,
const scalarField& x2 const scalarField& x2
@ -122,6 +122,6 @@ Foam::tmp<Foam::Field<Type>> Foam::DataEntry<Type>::integrate
// * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * // // * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * //
#include "DataEntryIO.C" #include "Function1IO.C"
// ************************************************************************* // // ************************************************************************* //

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class Class
Foam::DataEntry Foam::Function1
Description Description
Top level data entry class for use in dictionaries. Provides a mechanism Top level data entry class for use in dictionaries. Provides a mechanism
@ -31,13 +31,13 @@ Description
limits. limits.
SourceFiles SourceFiles
DataEntry.C Function1.C
DataEntryNew.C Function1New.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef DataEntry_H #ifndef Function1_H
#define DataEntry_H #define Function1_H
#include "dictionary.H" #include "dictionary.H"
#include "Field.H" #include "Field.H"
@ -51,22 +51,22 @@ namespace Foam
class Time; class Time;
// Forward declaration of friend functions and operators // Forward declaration of friend functions and operators
template<class Type> class DataEntry; template<class Type> class Function1;
template<class Type> Ostream& operator<<(Ostream&, const DataEntry<Type>&); template<class Type> Ostream& operator<<(Ostream&, const Function1<Type>&);
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class DataEntry Declaration Class Function1 Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class Type> template<class Type>
class DataEntry class Function1
: :
public refCount public refCount
{ {
// Private Member Functions // Private Member Functions
//- Disallow default bitwise assignment //- Disallow default bitwise assignment
void operator=(const DataEntry<Type>&); void operator=(const Function1<Type>&);
protected: protected:
@ -80,13 +80,13 @@ protected:
public: public:
//- Runtime type information //- Runtime type information
TypeName("DataEntry") TypeName("Function1")
//- Declare runtime constructor selection table //- Declare runtime constructor selection table
declareRunTimeSelectionTable declareRunTimeSelectionTable
( (
autoPtr, autoPtr,
DataEntry, Function1,
dictionary, dictionary,
( (
const word& entryName, const word& entryName,
@ -99,20 +99,20 @@ public:
// Constructor // Constructor
//- Construct from entry name //- Construct from entry name
DataEntry(const word& entryName); Function1(const word& entryName);
//- Copy constructor //- Copy constructor
DataEntry(const DataEntry<Type>& de); Function1(const Function1<Type>& de);
//- Construct and return a clone //- Construct and return a clone
virtual tmp<DataEntry<Type>> clone() const virtual tmp<Function1<Type>> clone() const
{ {
return tmp<DataEntry<Type>>(new DataEntry<Type>(*this)); return tmp<Function1<Type>>(new Function1<Type>(*this));
} }
//- Selector //- Selector
static autoPtr<DataEntry<Type>> New static autoPtr<Function1<Type>> New
( (
const word& entryName, const word& entryName,
const dictionary& dict const dictionary& dict
@ -120,7 +120,7 @@ public:
//- Destructor //- Destructor
virtual ~DataEntry(); virtual ~Function1();
// Member Functions // Member Functions
@ -162,7 +162,7 @@ public:
friend Ostream& operator<< <Type> friend Ostream& operator<< <Type>
( (
Ostream& os, Ostream& os,
const DataEntry<Type>& de const Function1<Type>& de
); );
//- Write in dictionary format //- Write in dictionary format
@ -176,29 +176,29 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makeDataEntry(Type) \ #define makeFunction1(Type) \
\ \
defineNamedTemplateTypeNameAndDebug(DataEntry<Type>, 0); \ defineNamedTemplateTypeNameAndDebug(Function1<Type>, 0); \
\ \
defineTemplateRunTimeSelectionTable \ defineTemplateRunTimeSelectionTable \
( \ ( \
DataEntry<Type>, \ Function1<Type>, \
dictionary \ dictionary \
); );
#define makeDataEntryType(SS, Type) \ #define makeFunction1Type(SS, Type) \
\ \
defineNamedTemplateTypeNameAndDebug(DataEntryTypes::SS<Type>, 0); \ defineNamedTemplateTypeNameAndDebug(Function1Types::SS<Type>, 0); \
\ \
DataEntry<Type>::adddictionaryConstructorToTable<DataEntryTypes::SS<Type>> \ Function1<Type>::adddictionaryConstructorToTable<Function1Types::SS<Type>> \
add##SS##Type##ConstructorToTable_; add##SS##Type##ConstructorToTable_;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository #ifdef NoRepository
# include "DataEntry.C" # include "Function1.C"
# include "Constant.H" # include "Constant.H"
#endif #endif

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -23,10 +23,10 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef DataEntryFws_H #ifndef Function1Fws_H
#define DataEntryFws_H #define Function1Fws_H
#include "DataEntry.H" #include "Function1.H"
#include "vector.H" #include "vector.H"
#include "symmTensor.H" #include "symmTensor.H"
#include "sphericalTensor.H" #include "sphericalTensor.H"
@ -36,12 +36,12 @@ License
namespace Foam namespace Foam
{ {
typedef DataEntry<label> labelDataEntry; typedef Function1<label> labelFunction1;
typedef DataEntry<scalar> scalarDataEntry; typedef Function1<scalar> scalarFunction1;
typedef DataEntry<vector> vectorDataEntry; typedef Function1<vector> vectorFunction1;
typedef DataEntry<symmTensor> symmTensorDataEntry; typedef Function1<symmTensor> symmTensorFunction1;
typedef DataEntry<sphericalTensor> sphericalTensorDataEntry; typedef Function1<sphericalTensor> sphericalTensorFunction1;
typedef DataEntry<tensor> tensorDataEntry; typedef Function1<tensor> tensorFunction1;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -23,7 +23,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
@ -31,13 +31,13 @@ template<class Type>
Foam::Ostream& Foam::operator<< Foam::Ostream& Foam::operator<<
( (
Ostream& os, Ostream& os,
const DataEntry<Type>& de const Function1<Type>& de
) )
{ {
// Check state of Ostream // Check state of Ostream
os.check os.check
( (
"Ostream& operator<<(Ostream&, const DataEntry<Type>&)" "Ostream& operator<<(Ostream&, const Function1<Type>&)"
); );
os << de.name_; os << de.name_;
@ -47,7 +47,7 @@ Foam::Ostream& Foam::operator<<
template<class Type> template<class Type>
void Foam::DataEntry<Type>::writeData(Ostream& os) const void Foam::Function1<Type>::writeData(Ostream& os) const
{ {
os.writeKeyword(name_) << type(); os.writeKeyword(name_) << type();
} }

View File

@ -28,7 +28,7 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template<class Type> template<class Type>
Foam::autoPtr<Foam::DataEntry<Type>> Foam::DataEntry<Type>::New Foam::autoPtr<Foam::Function1<Type>> Foam::Function1<Type>::New
( (
const word& entryName, const word& entryName,
const dictionary& dict const dictionary& dict
@ -37,31 +37,31 @@ Foam::autoPtr<Foam::DataEntry<Type>> Foam::DataEntry<Type>::New
Istream& is(dict.lookup(entryName, false)); Istream& is(dict.lookup(entryName, false));
token firstToken(is); token firstToken(is);
word DataEntryType; word Function1Type;
if (!firstToken.isWord()) if (!firstToken.isWord())
{ {
is.putBack(firstToken); is.putBack(firstToken);
return autoPtr<DataEntry<Type>> return autoPtr<Function1<Type>>
( (
new DataEntryTypes::Constant<Type>(entryName, is) new Function1Types::Constant<Type>(entryName, is)
); );
} }
else else
{ {
DataEntryType = firstToken.wordToken(); Function1Type = firstToken.wordToken();
} }
typename dictionaryConstructorTable::iterator cstrIter = typename dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(DataEntryType); dictionaryConstructorTablePtr_->find(Function1Type);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalErrorInFunction FatalErrorInFunction
<< "Unknown DataEntry type " << "Unknown Function1 type "
<< DataEntryType << " for DataEntry " << Function1Type << " for Function1 "
<< entryName << nl << nl << entryName << nl << nl
<< "Valid DataEntry types are:" << nl << "Valid Function1 types are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << nl << dictionaryConstructorTablePtr_->sortedToc() << nl
<< exit(FatalError); << exit(FatalError);
} }

View File

@ -28,13 +28,13 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Type> template<class Type>
Foam::DataEntryTypes::Polynomial<Type>::Polynomial Foam::Function1Types::Polynomial<Type>::Polynomial
( (
const word& entryName, const word& entryName,
const dictionary& dict const dictionary& dict
) )
: :
DataEntry<Type>(entryName), Function1<Type>(entryName),
coeffs_(), coeffs_(),
canIntegrate_(true) canIntegrate_(true)
{ {
@ -72,13 +72,13 @@ Foam::DataEntryTypes::Polynomial<Type>::Polynomial
template<class Type> template<class Type>
Foam::DataEntryTypes::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
) )
: :
DataEntry<Type>(entryName), Function1<Type>(entryName),
coeffs_(coeffs), coeffs_(coeffs),
canIntegrate_(true) canIntegrate_(true)
{ {
@ -111,9 +111,9 @@ Foam::DataEntryTypes::Polynomial<Type>::Polynomial
template<class Type> template<class Type>
Foam::DataEntryTypes::Polynomial<Type>::Polynomial(const Polynomial& poly) Foam::Function1Types::Polynomial<Type>::Polynomial(const Polynomial& poly)
: :
DataEntry<Type>(poly), Function1<Type>(poly),
coeffs_(poly.coeffs_), coeffs_(poly.coeffs_),
canIntegrate_(poly.canIntegrate_) canIntegrate_(poly.canIntegrate_)
{} {}
@ -122,14 +122,14 @@ Foam::DataEntryTypes::Polynomial<Type>::Polynomial(const Polynomial& poly)
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class Type> template<class Type>
Foam::DataEntryTypes::Polynomial<Type>::~Polynomial() Foam::Function1Types::Polynomial<Type>::~Polynomial()
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type> template<class Type>
void Foam::DataEntryTypes::Polynomial<Type>::convertTimeBase(const Time& t) void Foam::Function1Types::Polynomial<Type>::convertTimeBase(const Time& t)
{ {
forAll(coeffs_, i) forAll(coeffs_, i)
{ {
@ -144,7 +144,7 @@ void Foam::DataEntryTypes::Polynomial<Type>::convertTimeBase(const Time& t)
template<class Type> template<class Type>
Type Foam::DataEntryTypes::Polynomial<Type>::value(const scalar x) const Type Foam::Function1Types::Polynomial<Type>::value(const scalar x) const
{ {
Type y(pTraits<Type>::zero); Type y(pTraits<Type>::zero);
forAll(coeffs_, i) forAll(coeffs_, i)
@ -161,7 +161,7 @@ Type Foam::DataEntryTypes::Polynomial<Type>::value(const scalar x) const
template<class Type> template<class Type>
Type Foam::DataEntryTypes::Polynomial<Type>::integrate Type Foam::Function1Types::Polynomial<Type>::integrate
( (
const scalar x1, const scalar x1,
const scalar x2 const scalar x2

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class Class
Foam::DataEntryTypes::PolynomialEntry Foam::Function1Types::PolynomialEntry
Description Description
PolynomialEntry container data entry for scalars. Items are stored in a PolynomialEntry container data entry for scalars. Items are stored in a
@ -45,9 +45,9 @@ SourceFiles
#ifndef PolynomialEntry_H #ifndef PolynomialEntry_H
#define PolynomialEntry_H #define PolynomialEntry_H
#include "DataEntry.H" #include "Function1.H"
#include "Tuple2.H" #include "Tuple2.H"
#include "DataEntryFwd.H" #include "Function1Fwd.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -55,15 +55,15 @@ namespace Foam
{ {
// Forward declaration of friend functions and operators // Forward declaration of friend functions and operators
namespace DataEntryTypes namespace Function1Types
{ {
template<class Type> class Polynomial; template<class Type> class Polynomial;
}; };
template<class Type> template<class Type>
Ostream& operator<<(Ostream&, const DataEntryTypes::Polynomial<Type>&); Ostream& operator<<(Ostream&, const Function1Types::Polynomial<Type>&);
namespace DataEntryTypes namespace Function1Types
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
@ -73,7 +73,7 @@ namespace DataEntryTypes
template<class Type> template<class Type>
class Polynomial class Polynomial
: :
public DataEntry<Type> public Function1<Type>
{ {
// Private data // Private data
@ -111,9 +111,9 @@ public:
Polynomial(const Polynomial& poly); Polynomial(const Polynomial& poly);
//- Construct and return a clone //- Construct and return a clone
virtual tmp<DataEntry<Type>> clone() const virtual tmp<Function1<Type>> clone() const
{ {
return tmp<DataEntry<Type>>(new Polynomial(*this)); return tmp<Function1<Type>>(new Polynomial(*this));
} }
@ -154,7 +154,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace DataEntryTypes } // End namespace Function1Types
} // End namespace Foam } // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -31,10 +31,10 @@ template<class Type>
Foam::Ostream& Foam::operator<< Foam::Ostream& Foam::operator<<
( (
Ostream& os, Ostream& os,
const DataEntryTypes::Polynomial<Type>& poly const Function1Types::Polynomial<Type>& poly
) )
{ {
os << static_cast<const DataEntry<Type>& >(poly) os << static_cast<const Function1<Type>& >(poly)
<< token::SPACE << poly.coeffs_; << token::SPACE << poly.coeffs_;
// Check state of Ostream // Check state of Ostream
@ -48,9 +48,9 @@ Foam::Ostream& Foam::operator<<
template<class Type> template<class Type>
void Foam::DataEntryTypes::Polynomial<Type>::writeData(Ostream& os) const void Foam::Function1Types::Polynomial<Type>::writeData(Ostream& os) const
{ {
DataEntry<Type>::writeData(os); Function1<Type>::writeData(os);
os << nl << indent << coeffs_ << token::END_STATEMENT << nl; os << nl << indent << coeffs_ << token::END_STATEMENT << nl;
} }

View File

@ -29,7 +29,7 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Type> template<class Type>
void Foam::DataEntryTypes::Sine<Type>::read(const dictionary& coeffs) void Foam::Function1Types::Sine<Type>::read(const dictionary& coeffs)
{ {
t0_ = coeffs.lookupOrDefault<scalar>("t0", 0); t0_ = coeffs.lookupOrDefault<scalar>("t0", 0);
amplitude_ = coeffs.lookupOrDefault<scalar>("amplitude", 1); amplitude_ = coeffs.lookupOrDefault<scalar>("amplitude", 1);
@ -40,23 +40,23 @@ void Foam::DataEntryTypes::Sine<Type>::read(const dictionary& coeffs)
template<class Type> template<class Type>
Foam::DataEntryTypes::Sine<Type>::Sine Foam::Function1Types::Sine<Type>::Sine
( (
const word& entryName, const word& entryName,
const dictionary& dict, const dictionary& dict,
const word& ext const word& ext
) )
: :
DataEntry<Type>(entryName) Function1<Type>(entryName)
{ {
read(dict.subDict(entryName + ext)); read(dict.subDict(entryName + ext));
} }
template<class Type> template<class Type>
Foam::DataEntryTypes::Sine<Type>::Sine(const Sine<Type>& se) Foam::Function1Types::Sine<Type>::Sine(const Sine<Type>& se)
: :
DataEntry<Type>(se), Function1<Type>(se),
t0_(se.t0_), t0_(se.t0_),
amplitude_(se.amplitude_), amplitude_(se.amplitude_),
frequency_(se.frequency_), frequency_(se.frequency_),
@ -67,14 +67,14 @@ Foam::DataEntryTypes::Sine<Type>::Sine(const Sine<Type>& se)
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class Type> template<class Type>
Foam::DataEntryTypes::Sine<Type>::~Sine() Foam::Function1Types::Sine<Type>::~Sine()
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type> template<class Type>
Type Foam::DataEntryTypes::Sine<Type>::value(const scalar t) const Type Foam::Function1Types::Sine<Type>::value(const scalar t) const
{ {
return return
amplitude_*sin(constant::mathematical::twoPi*frequency_*(t - t0_)) amplitude_*sin(constant::mathematical::twoPi*frequency_*(t - t0_))
@ -84,7 +84,7 @@ Type Foam::DataEntryTypes::Sine<Type>::value(const scalar t) const
template<class Type> template<class Type>
Type Foam::DataEntryTypes::Sine<Type>::integrate Type Foam::Function1Types::Sine<Type>::integrate
( (
const scalar t1, const scalar t1,
const scalar t2 const scalar t2

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class Class
Foam::DataEntryTypes::Sine Foam::Function1Types::Sine
Description Description
Templated sine function with support for an offset level. Templated sine function with support for an offset level.
@ -74,7 +74,7 @@ SourceFiles
#ifndef Sine_H #ifndef Sine_H
#define Sine_H #define Sine_H
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -82,15 +82,15 @@ namespace Foam
{ {
// Forward declaration of friend functions and operators // Forward declaration of friend functions and operators
namespace DataEntryTypes namespace Function1Types
{ {
template<class Type> class Sine; template<class Type> class Sine;
}; };
template<class Type> template<class Type>
Ostream& operator<<(Ostream&, const DataEntryTypes::Sine<Type>&); Ostream& operator<<(Ostream&, const Function1Types::Sine<Type>&);
namespace DataEntryTypes namespace Function1Types
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
@ -100,7 +100,7 @@ namespace DataEntryTypes
template<class Type> template<class Type>
class Sine class Sine
: :
public DataEntry<Type> public Function1<Type>
{ {
// Private data // Private data
@ -149,9 +149,9 @@ public:
Sine(const Sine<Type>& se); Sine(const Sine<Type>& se);
//- Construct and return a clone //- Construct and return a clone
virtual tmp<DataEntry<Type>> clone() const virtual tmp<Function1<Type>> clone() const
{ {
return tmp<DataEntry<Type>>(new Sine<Type>(*this)); return tmp<Function1<Type>>(new Sine<Type>(*this));
} }
@ -184,7 +184,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace DataEntryTypes } // End namespace Function1Types
} // End namespace Foam } // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -31,10 +31,10 @@ template<class Type>
Foam::Ostream& Foam::operator<< Foam::Ostream& Foam::operator<<
( (
Ostream& os, Ostream& os,
const DataEntryTypes::Sine<Type>& se const Function1Types::Sine<Type>& se
) )
{ {
os << static_cast<const DataEntry<Type>& >(se) os << static_cast<const Function1<Type>& >(se)
<< token::SPACE << se.t0_ << token::SPACE << se.t0_
<< token::SPACE << se.amplitude_ << token::SPACE << se.amplitude_
<< token::SPACE << se.frequency_ << token::SPACE << se.frequency_
@ -52,9 +52,9 @@ Foam::Ostream& Foam::operator<<
template<class Type> template<class Type>
void Foam::DataEntryTypes::Sine<Type>::writeData(Ostream& os) const void Foam::Function1Types::Sine<Type>::writeData(Ostream& os) const
{ {
DataEntry<Type>::writeData(os); Function1<Type>::writeData(os);
os << token::END_STATEMENT << nl; os << token::END_STATEMENT << nl;
os << indent << word(this->name() + "Coeffs") << nl; os << indent << word(this->name() + "Coeffs") << nl;
os << indent << token::BEGIN_BLOCK << incrIndent << nl; os << indent << token::BEGIN_BLOCK << incrIndent << nl;

View File

@ -28,7 +28,7 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Type> template<class Type>
Foam::DataEntryTypes::Table<Type>::Table Foam::Function1Types::Table<Type>::Table
( (
const word& entryName, const word& entryName,
const dictionary& dict const dictionary& dict
@ -44,7 +44,7 @@ Foam::DataEntryTypes::Table<Type>::Table
template<class Type> template<class Type>
Foam::DataEntryTypes::Table<Type>::Table(const Table<Type>& tbl) Foam::Function1Types::Table<Type>::Table(const Table<Type>& tbl)
: :
TableBase<Type>(tbl) TableBase<Type>(tbl)
{} {}
@ -53,7 +53,7 @@ Foam::DataEntryTypes::Table<Type>::Table(const Table<Type>& tbl)
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class Type> template<class Type>
Foam::DataEntryTypes::Table<Type>::~Table() Foam::Function1Types::Table<Type>::~Table()
{} {}

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class Class
Foam::DataEntryTypes::Table Foam::Function1Types::Table
Description Description
Templated table container data entry. Items are stored in a list of Templated table container data entry. Items are stored in a list of
@ -45,7 +45,7 @@ SourceFiles
#ifndef Table_H #ifndef Table_H
#define Table_H #define Table_H
#include "DataEntry.H" #include "Function1.H"
#include "Tuple2.H" #include "Tuple2.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -54,15 +54,15 @@ namespace Foam
{ {
// Forward declaration of friend functions and operators // Forward declaration of friend functions and operators
namespace DataEntryTypes namespace Function1Types
{ {
template<class Type> class Table; template<class Type> class Table;
}; };
template<class Type> template<class Type>
Ostream& operator<<(Ostream&, const DataEntryTypes::Table<Type>&); Ostream& operator<<(Ostream&, const Function1Types::Table<Type>&);
namespace DataEntryTypes namespace Function1Types
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
@ -95,9 +95,9 @@ public:
Table(const Table<Type>& tbl); Table(const Table<Type>& tbl);
//- Construct and return a clone //- Construct and return a clone
virtual tmp<DataEntry<Type>> clone() const virtual tmp<Function1<Type>> clone() const
{ {
return tmp<DataEntry<Type>>(new Table<Type>(*this)); return tmp<Function1<Type>>(new Table<Type>(*this));
} }
@ -108,7 +108,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace DataEntryTypes } // End namespace Function1Types
} // End namespace Foam } // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -31,7 +31,7 @@ License
template<class Type> template<class Type>
const Foam::interpolationWeights& const Foam::interpolationWeights&
Foam::DataEntryTypes::TableBase<Type>::interpolator() const Foam::Function1Types::TableBase<Type>::interpolator() const
{ {
if (interpolatorPtr_.empty()) if (interpolatorPtr_.empty())
{ {
@ -56,13 +56,13 @@ Foam::DataEntryTypes::TableBase<Type>::interpolator() const
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Type> template<class Type>
Foam::DataEntryTypes::TableBase<Type>::TableBase Foam::Function1Types::TableBase<Type>::TableBase
( (
const word& name, const word& name,
const dictionary& dict const dictionary& dict
) )
: :
DataEntry<Type>(name), Function1<Type>(name),
name_(name), name_(name),
boundsHandling_ boundsHandling_
( (
@ -80,9 +80,9 @@ Foam::DataEntryTypes::TableBase<Type>::TableBase
template<class Type> template<class Type>
Foam::DataEntryTypes::TableBase<Type>::TableBase(const TableBase<Type>& tbl) Foam::Function1Types::TableBase<Type>::TableBase(const TableBase<Type>& tbl)
: :
DataEntry<Type>(tbl), Function1<Type>(tbl),
name_(tbl.name_), name_(tbl.name_),
boundsHandling_(tbl.boundsHandling_), boundsHandling_(tbl.boundsHandling_),
interpolationScheme_(tbl.interpolationScheme_), interpolationScheme_(tbl.interpolationScheme_),
@ -95,14 +95,14 @@ Foam::DataEntryTypes::TableBase<Type>::TableBase(const TableBase<Type>& tbl)
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class Type> template<class Type>
Foam::DataEntryTypes::TableBase<Type>::~TableBase() Foam::Function1Types::TableBase<Type>::~TableBase()
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type> template<class Type>
Foam::word Foam::DataEntryTypes::TableBase<Type>::boundsHandlingToWord Foam::word Foam::Function1Types::TableBase<Type>::boundsHandlingToWord
( (
const boundsHandling& bound const boundsHandling& bound
) const ) const
@ -138,8 +138,8 @@ Foam::word Foam::DataEntryTypes::TableBase<Type>::boundsHandlingToWord
template<class Type> template<class Type>
typename Foam::DataEntryTypes::TableBase<Type>::boundsHandling typename Foam::Function1Types::TableBase<Type>::boundsHandling
Foam::DataEntryTypes::TableBase<Type>::wordToBoundsHandling Foam::Function1Types::TableBase<Type>::wordToBoundsHandling
( (
const word& bound const word& bound
) const ) const
@ -172,8 +172,8 @@ Foam::DataEntryTypes::TableBase<Type>::wordToBoundsHandling
template<class Type> template<class Type>
typename Foam::DataEntryTypes::TableBase<Type>::boundsHandling typename Foam::Function1Types::TableBase<Type>::boundsHandling
Foam::DataEntryTypes::TableBase<Type>::outOfBounds Foam::Function1Types::TableBase<Type>::outOfBounds
( (
const boundsHandling& bound const boundsHandling& bound
) )
@ -186,7 +186,7 @@ Foam::DataEntryTypes::TableBase<Type>::outOfBounds
template<class Type> template<class Type>
void Foam::DataEntryTypes::TableBase<Type>::check() const void Foam::Function1Types::TableBase<Type>::check() const
{ {
if (!table_.size()) if (!table_.size())
{ {
@ -215,7 +215,7 @@ void Foam::DataEntryTypes::TableBase<Type>::check() const
template<class Type> template<class Type>
bool Foam::DataEntryTypes::TableBase<Type>::checkMinBounds bool Foam::Function1Types::TableBase<Type>::checkMinBounds
( (
const scalar x, const scalar x,
scalar& xDash scalar& xDash
@ -265,7 +265,7 @@ bool Foam::DataEntryTypes::TableBase<Type>::checkMinBounds
template<class Type> template<class Type>
bool Foam::DataEntryTypes::TableBase<Type>::checkMaxBounds bool Foam::Function1Types::TableBase<Type>::checkMaxBounds
( (
const scalar x, const scalar x,
scalar& xDash scalar& xDash
@ -315,7 +315,7 @@ bool Foam::DataEntryTypes::TableBase<Type>::checkMaxBounds
template<class Type> template<class Type>
void Foam::DataEntryTypes::TableBase<Type>::convertTimeBase(const Time& t) void Foam::Function1Types::TableBase<Type>::convertTimeBase(const Time& t)
{ {
forAll(table_, i) forAll(table_, i)
{ {
@ -329,7 +329,7 @@ void Foam::DataEntryTypes::TableBase<Type>::convertTimeBase(const Time& t)
template<class Type> template<class Type>
Type Foam::DataEntryTypes::TableBase<Type>::value(const scalar x) const Type Foam::Function1Types::TableBase<Type>::value(const scalar x) const
{ {
scalar xDash = x; scalar xDash = x;
@ -357,7 +357,7 @@ Type Foam::DataEntryTypes::TableBase<Type>::value(const scalar x) const
template<class Type> template<class Type>
Type Foam::DataEntryTypes::TableBase<Type>::integrate Type Foam::Function1Types::TableBase<Type>::integrate
( (
const scalar x1, const scalar x1,
const scalar x2 const scalar x2
@ -377,7 +377,7 @@ Type Foam::DataEntryTypes::TableBase<Type>::integrate
template<class Type> template<class Type>
Foam::tmp<Foam::scalarField> Foam::DataEntryTypes::TableBase<Type>::x() const Foam::tmp<Foam::scalarField> Foam::Function1Types::TableBase<Type>::x() const
{ {
tmp<scalarField> tfld(new scalarField(table_.size(), 0.0)); tmp<scalarField> tfld(new scalarField(table_.size(), 0.0));
scalarField& fld = tfld(); scalarField& fld = tfld();
@ -392,7 +392,7 @@ Foam::tmp<Foam::scalarField> Foam::DataEntryTypes::TableBase<Type>::x() const
template<class Type> template<class Type>
Foam::tmp<Foam::Field<Type>> Foam::DataEntryTypes::TableBase<Type>::y() const Foam::tmp<Foam::Field<Type>> Foam::Function1Types::TableBase<Type>::y() const
{ {
tmp<Field<Type>> tfld(new Field<Type>(table_.size(), pTraits<Type>::zero)); tmp<Field<Type>> tfld(new Field<Type>(table_.size(), pTraits<Type>::zero));
Field<Type>& fld = tfld(); Field<Type>& fld = tfld();

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class Class
Foam::DataEntryTypes::TableBase Foam::Function1Types::TableBase
Description Description
Base class for table with bounds handling, interpolation and integration Base class for table with bounds handling, interpolation and integration
@ -35,7 +35,7 @@ SourceFiles
#ifndef TableBase_H #ifndef TableBase_H
#define TableBase_H #define TableBase_H
#include "DataEntry.H" #include "Function1.H"
#include "Tuple2.H" #include "Tuple2.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -46,15 +46,15 @@ namespace Foam
class interpolationWeights; class interpolationWeights;
// Forward declaration of friend functions and operators // Forward declaration of friend functions and operators
namespace DataEntryTypes namespace Function1Types
{ {
template<class Type> class TableBase; template<class Type> class TableBase;
}; };
template<class Type> template<class Type>
Ostream& operator<<(Ostream&, const DataEntryTypes::TableBase<Type>&); Ostream& operator<<(Ostream&, const Function1Types::TableBase<Type>&);
namespace DataEntryTypes namespace Function1Types
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
@ -64,7 +64,7 @@ namespace DataEntryTypes
template<class Type> template<class Type>
class TableBase class TableBase
: :
public DataEntry<Type> public Function1<Type>
{ {
public: public:
@ -188,7 +188,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace DataEntryTypes } // End namespace Function1Types
} // End namespace Foam } // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -23,7 +23,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
@ -31,10 +31,10 @@ template<class Type>
Foam::Ostream& Foam::operator<< Foam::Ostream& Foam::operator<<
( (
Ostream& os, Ostream& os,
const DataEntryTypes::TableBase<Type>& tbl const Function1Types::TableBase<Type>& tbl
) )
{ {
os << static_cast<const DataEntry<Type>&>(tbl); os << static_cast<const Function1<Type>&>(tbl);
os << token::SPACE << tbl.table_; os << token::SPACE << tbl.table_;
// Check state of Ostream // Check state of Ostream
@ -48,16 +48,16 @@ Foam::Ostream& Foam::operator<<
template<class Type> template<class Type>
void Foam::DataEntryTypes::TableBase<Type>::writeData(Ostream& os) const void Foam::Function1Types::TableBase<Type>::writeData(Ostream& os) const
{ {
DataEntry<Type>::writeData(os); Function1<Type>::writeData(os);
os << nl << indent << table_ << token::END_STATEMENT << nl; os << nl << indent << table_ << token::END_STATEMENT << nl;
writeEntries(os); writeEntries(os);
} }
template<class Type> template<class Type>
void Foam::DataEntryTypes::TableBase<Type>::writeEntries(Ostream& os) const void Foam::Function1Types::TableBase<Type>::writeEntries(Ostream& os) const
{ {
if (boundsHandling_ != CLAMP) if (boundsHandling_ != CLAMP)
{ {

View File

@ -28,7 +28,7 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Type> template<class Type>
Foam::DataEntryTypes::TableFile<Type>::TableFile Foam::Function1Types::TableFile<Type>::TableFile
( (
const word& entryName, const word& entryName,
const dictionary& dict const dictionary& dict
@ -58,7 +58,7 @@ Foam::DataEntryTypes::TableFile<Type>::TableFile
template<class Type> template<class Type>
Foam::DataEntryTypes::TableFile<Type>::TableFile(const TableFile<Type>& tbl) Foam::Function1Types::TableFile<Type>::TableFile(const TableFile<Type>& tbl)
: :
TableBase<Type>(tbl), TableBase<Type>(tbl),
fName_(tbl.fName_) fName_(tbl.fName_)
@ -68,7 +68,7 @@ Foam::DataEntryTypes::TableFile<Type>::TableFile(const TableFile<Type>& tbl)
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class Type> template<class Type>
Foam::DataEntryTypes::TableFile<Type>::~TableFile() Foam::Function1Types::TableFile<Type>::~TableFile()
{} {}

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class Class
Foam::DataEntryTypes::TableFile Foam::Function1Types::TableFile
Description Description
Templated table container data entry where data is read from file. Templated table container data entry where data is read from file.
@ -56,7 +56,7 @@ SourceFiles
#ifndef TableFile_H #ifndef TableFile_H
#define TableFile_H #define TableFile_H
#include "DataEntry.H" #include "Function1.H"
#include "Tuple2.H" #include "Tuple2.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -65,15 +65,15 @@ namespace Foam
{ {
// Forward declaration of friend functions and operators // Forward declaration of friend functions and operators
namespace DataEntryTypes namespace Function1Types
{ {
template<class Type> class TableFile; template<class Type> class TableFile;
}; };
template<class Type> template<class Type>
Ostream& operator<<(Ostream&, const DataEntryTypes::TableFile<Type>&); Ostream& operator<<(Ostream&, const Function1Types::TableFile<Type>&);
namespace DataEntryTypes namespace Function1Types
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
@ -112,9 +112,9 @@ public:
TableFile(const TableFile<Type>& tbl); TableFile(const TableFile<Type>& tbl);
//- Construct and return a clone //- Construct and return a clone
virtual tmp<DataEntry<Type>> clone() const virtual tmp<Function1<Type>> clone() const
{ {
return tmp<DataEntry<Type>>(new TableFile<Type>(*this)); return tmp<Function1<Type>>(new TableFile<Type>(*this));
} }
@ -131,7 +131,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace DataEntryTypes } // End namespace Function1Types
} // End namespace Foam } // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -23,14 +23,14 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
template<class Type> template<class Type>
void Foam::DataEntryTypes::TableFile<Type>::writeData(Ostream& os) const void Foam::Function1Types::TableFile<Type>::writeData(Ostream& os) const
{ {
DataEntry<Type>::writeData(os); Function1<Type>::writeData(os);
os << token::END_STATEMENT << nl os << token::END_STATEMENT << nl
<< indent << word(this->name() + "Coeffs") << nl << indent << word(this->name() + "Coeffs") << nl

View File

@ -39,50 +39,50 @@ License
namespace Foam namespace Foam
{ {
makeDataEntry(label); makeFunction1(label);
makeDataEntryType(Constant, label); makeFunction1Type(Constant, label);
// Polynomial functions and interpolation do evaluate to label // Polynomial functions and interpolation do evaluate to label
// Instead evaluate a scalar and convert to label as appropriate // Instead evaluate a scalar and convert to label as appropriate
makeDataEntry(scalar); makeFunction1(scalar);
makeDataEntryType(Constant, scalar); makeFunction1Type(Constant, scalar);
makeDataEntryType(Polynomial, scalar); makeFunction1Type(Polynomial, scalar);
makeDataEntryType(Sine, scalar); makeFunction1Type(Sine, scalar);
makeDataEntryType(CSV, scalar); makeFunction1Type(CSV, scalar);
makeDataEntryType(Table, scalar); makeFunction1Type(Table, scalar);
makeDataEntryType(TableFile, scalar); makeFunction1Type(TableFile, scalar);
makeDataEntry(vector); makeFunction1(vector);
makeDataEntryType(Constant, vector); makeFunction1Type(Constant, vector);
makeDataEntryType(Polynomial, vector); makeFunction1Type(Polynomial, vector);
makeDataEntryType(Sine, vector); makeFunction1Type(Sine, vector);
makeDataEntryType(CSV, vector); makeFunction1Type(CSV, vector);
makeDataEntryType(Table, vector); makeFunction1Type(Table, vector);
makeDataEntryType(TableFile, vector); makeFunction1Type(TableFile, vector);
makeDataEntry(sphericalTensor); makeFunction1(sphericalTensor);
makeDataEntryType(Constant, sphericalTensor); makeFunction1Type(Constant, sphericalTensor);
makeDataEntryType(Polynomial, sphericalTensor); makeFunction1Type(Polynomial, sphericalTensor);
makeDataEntryType(Sine, sphericalTensor); makeFunction1Type(Sine, sphericalTensor);
makeDataEntryType(CSV, sphericalTensor); makeFunction1Type(CSV, sphericalTensor);
makeDataEntryType(Table, sphericalTensor); makeFunction1Type(Table, sphericalTensor);
makeDataEntryType(TableFile, sphericalTensor); makeFunction1Type(TableFile, sphericalTensor);
makeDataEntry(symmTensor); makeFunction1(symmTensor);
makeDataEntryType(Constant, symmTensor); makeFunction1Type(Constant, symmTensor);
makeDataEntryType(Polynomial, symmTensor); makeFunction1Type(Polynomial, symmTensor);
makeDataEntryType(Sine, symmTensor); makeFunction1Type(Sine, symmTensor);
makeDataEntryType(CSV, symmTensor); makeFunction1Type(CSV, symmTensor);
makeDataEntryType(Table, symmTensor); makeFunction1Type(Table, symmTensor);
makeDataEntryType(TableFile, symmTensor); makeFunction1Type(TableFile, symmTensor);
makeDataEntry(tensor); makeFunction1(tensor);
makeDataEntryType(Constant, tensor); makeFunction1Type(Constant, tensor);
makeDataEntryType(Polynomial, tensor); makeFunction1Type(Polynomial, tensor);
makeDataEntryType(Sine, tensor); makeFunction1Type(Sine, tensor);
makeDataEntryType(CSV, tensor); makeFunction1Type(CSV, tensor);
makeDataEntryType(Table, tensor); makeFunction1Type(Table, tensor);
makeDataEntryType(TableFile, tensor); makeFunction1Type(TableFile, tensor);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -23,12 +23,12 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "TimeDataEntry.H" #include "TimeFunction1.H"
// * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
template<class Type> template<class Type>
Foam::TimeDataEntry<Type>::TimeDataEntry Foam::TimeFunction1<Type>::TimeFunction1
( (
const Time& t, const Time& t,
const word& name, const word& name,
@ -37,14 +37,14 @@ Foam::TimeDataEntry<Type>::TimeDataEntry
: :
time_(t), time_(t),
name_(name), name_(name),
entry_(DataEntry<Type>::New(name, dict)) entry_(Function1<Type>::New(name, dict))
{ {
entry_->convertTimeBase(t); entry_->convertTimeBase(t);
} }
template<class Type> template<class Type>
Foam::TimeDataEntry<Type>::TimeDataEntry(const Time& t, const word& name) Foam::TimeFunction1<Type>::TimeFunction1(const Time& t, const word& name)
: :
time_(t), time_(t),
name_(name), name_(name),
@ -53,9 +53,9 @@ Foam::TimeDataEntry<Type>::TimeDataEntry(const Time& t, const word& name)
template<class Type> template<class Type>
Foam::TimeDataEntry<Type>::TimeDataEntry Foam::TimeFunction1<Type>::TimeFunction1
( (
const TimeDataEntry<Type>& tde const TimeFunction1<Type>& tde
) )
: :
time_(tde.time_), time_(tde.time_),
@ -72,18 +72,18 @@ Foam::TimeDataEntry<Type>::TimeDataEntry
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class Type> template<class Type>
Foam::TimeDataEntry<Type>::~TimeDataEntry() Foam::TimeFunction1<Type>::~TimeFunction1()
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type> template<class Type>
void Foam::TimeDataEntry<Type>::reset(const dictionary& dict) void Foam::TimeFunction1<Type>::reset(const dictionary& dict)
{ {
entry_.reset entry_.reset
( (
DataEntry<Type>::New Function1<Type>::New
( (
name_, name_,
dict dict
@ -95,21 +95,21 @@ void Foam::TimeDataEntry<Type>::reset(const dictionary& dict)
template<class Type> template<class Type>
const Foam::word& Foam::TimeDataEntry<Type>::name() const const Foam::word& Foam::TimeFunction1<Type>::name() const
{ {
return entry_->name(); return entry_->name();
} }
template<class Type> template<class Type>
Type Foam::TimeDataEntry<Type>::value(const scalar x) const Type Foam::TimeFunction1<Type>::value(const scalar x) const
{ {
return entry_->value(x); return entry_->value(x);
} }
template<class Type> template<class Type>
Type Foam::TimeDataEntry<Type>::integrate Type Foam::TimeFunction1<Type>::integrate
( (
const scalar x1, const scalar x1,
const scalar x2 const scalar x2
@ -125,7 +125,7 @@ template<class Type>
Foam::Ostream& Foam::operator<< Foam::Ostream& Foam::operator<<
( (
Ostream& os, Ostream& os,
const TimeDataEntry<Type>& de const TimeFunction1<Type>& de
) )
{ {
return de.entry_->operator<<(os, de); return de.entry_->operator<<(os, de);
@ -133,7 +133,7 @@ Foam::Ostream& Foam::operator<<
template<class Type> template<class Type>
void Foam::TimeDataEntry<Type>::writeData(Ostream& os) const void Foam::TimeFunction1<Type>::writeData(Ostream& os) const
{ {
entry_->writeData(os); entry_->writeData(os);
} }

View File

@ -22,21 +22,21 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class Class
Foam::TimeDataEntry Foam::TimeFunction1
Description Description
Light wrapper around DataEntry to provide a mechanism to update time-based Light wrapper around Function1 to provide a mechanism to update time-based
entries. entries.
SourceFiles SourceFiles
TimeDataEntry.C TimeFunction1.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef TimeDataEntry_H #ifndef TimeFunction1_H
#define TimeDataEntry_H #define TimeFunction1_H
#include "DataEntry.H" #include "Function1.H"
#include "Time.H" #include "Time.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -44,21 +44,21 @@ SourceFiles
namespace Foam namespace Foam
{ {
template<class Type> template<class Type>
class TimeDataEntry; class TimeFunction1;
template<class Type> template<class Type>
Ostream& operator<< Ostream& operator<<
( (
Ostream&, Ostream&,
const TimeDataEntry<Type>& const TimeFunction1<Type>&
); );
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class TimeDataEntry Declaration Class TimeFunction1 Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class Type> template<class Type>
class TimeDataEntry class TimeFunction1
{ {
protected: protected:
@ -71,8 +71,8 @@ protected:
//- Name of the data entry //- Name of the data entry
const word name_; const word name_;
//- The underlying DataEntry //- The underlying Function1
autoPtr<DataEntry<Type>> entry_; autoPtr<Function1<Type>> entry_;
public: public:
@ -80,7 +80,7 @@ public:
// Constructor // Constructor
//- Construct from entry name //- Construct from entry name
TimeDataEntry TimeFunction1
( (
const Time& t, const Time& t,
const word& name, const word& name,
@ -88,18 +88,18 @@ public:
); );
//- Construct null from entry name //- Construct null from entry name
TimeDataEntry TimeFunction1
( (
const Time& t, const Time& t,
const word& entryName const word& entryName
); );
//- Copy constructor //- Copy constructor
TimeDataEntry(const TimeDataEntry<Type>& tde); TimeFunction1(const TimeFunction1<Type>& tde);
//- Destructor //- Destructor
virtual ~TimeDataEntry(); virtual ~TimeFunction1();
// Member Functions // Member Functions
@ -128,7 +128,7 @@ public:
friend Ostream& operator<< <Type> friend Ostream& operator<< <Type>
( (
Ostream& os, Ostream& os,
const TimeDataEntry<Type>& de const TimeFunction1<Type>& de
); );
//- Write in dictionary format //- Write in dictionary format
@ -143,7 +143,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository #ifdef NoRepository
# include "TimeDataEntry.C" # include "TimeFunction1.C"
#endif #endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -57,7 +57,7 @@ Foam::solidBodyMotionFunctions::rotatingMotion::rotatingMotion
solidBodyMotionFunction(SBMFCoeffs, runTime), solidBodyMotionFunction(SBMFCoeffs, runTime),
origin_(SBMFCoeffs_.lookup("origin")), origin_(SBMFCoeffs_.lookup("origin")),
axis_(SBMFCoeffs_.lookup("axis")), axis_(SBMFCoeffs_.lookup("axis")),
omega_(DataEntry<scalar>::New("omega", SBMFCoeffs_)) omega_(Function1<scalar>::New("omega", SBMFCoeffs_))
{} {}
@ -95,7 +95,7 @@ bool Foam::solidBodyMotionFunctions::rotatingMotion::read
omega_.reset omega_.reset
( (
DataEntry<scalar>::New("omega", SBMFCoeffs_).ptr() Function1<scalar>::New("omega", SBMFCoeffs_).ptr()
); );
return true; return true;

View File

@ -41,7 +41,7 @@ SourceFiles
#include "solidBodyMotionFunction.H" #include "solidBodyMotionFunction.H"
#include "primitiveFields.H" #include "primitiveFields.H"
#include "point.H" #include "point.H"
#include "DataEntry.H" #include "Function1.H"
#include "autoPtr.H" #include "autoPtr.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -68,7 +68,7 @@ class rotatingMotion
const vector axis_; const vector axis_;
//- Angular velocty (rad/sec) //- Angular velocty (rad/sec)
autoPtr<DataEntry<scalar>> omega_; autoPtr<Function1<scalar>> omega_;
// Private Member Functions // Private Member Functions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -253,7 +253,7 @@ Foam::MRFZone::MRFZone
), ),
origin_(coeffs_.lookup("origin")), origin_(coeffs_.lookup("origin")),
axis_(coeffs_.lookup("axis")), axis_(coeffs_.lookup("axis")),
omega_(DataEntry<scalar>::New("omega", coeffs_)) omega_(Function1<scalar>::New("omega", coeffs_))
{ {
if (cellZoneName_ == word::null) if (cellZoneName_ == word::null)
{ {

View File

@ -48,7 +48,7 @@ SourceFiles
#include "surfaceFields.H" #include "surfaceFields.H"
#include "fvMatricesFwd.H" #include "fvMatricesFwd.H"
#include "mapPolyMesh.H" #include "mapPolyMesh.H"
#include "DataEntry.H" #include "Function1.H"
#include "autoPtr.H" #include "autoPtr.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -105,7 +105,7 @@ class MRFZone
vector axis_; vector axis_;
//- Angular velocty (rad/sec) //- Angular velocty (rad/sec)
autoPtr<DataEntry<scalar>> omega_; autoPtr<Function1<scalar>> omega_;
// Private Member Functions // Private Member Functions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -77,9 +77,9 @@ cylindricalInletVelocityFvPatchVectorField
fixedValueFvPatchField<vector>(p, iF, dict), fixedValueFvPatchField<vector>(p, iF, dict),
centre_(dict.lookup("centre")), centre_(dict.lookup("centre")),
axis_(dict.lookup("axis")), axis_(dict.lookup("axis")),
axialVelocity_(DataEntry<scalar>::New("axialVelocity", dict)), axialVelocity_(Function1<scalar>::New("axialVelocity", dict)),
radialVelocity_(DataEntry<scalar>::New("radialVelocity", dict)), radialVelocity_(Function1<scalar>::New("radialVelocity", dict)),
rpm_(DataEntry<scalar>::New("rpm", dict)) rpm_(Function1<scalar>::New("rpm", dict))
{} {}

View File

@ -57,13 +57,13 @@ Description
\endverbatim \endverbatim
Note Note
The \c axialVelocity, \c radialVelocity and \c rpm entries are DataEntry The \c axialVelocity, \c radialVelocity and \c rpm entries are Function1
types, able to describe time varying functions. The example above gives types, able to describe time varying functions. The example above gives
the usage for supplying constant values. the usage for supplying constant values.
SeeAlso SeeAlso
Foam::fixedValueFvPatchField Foam::fixedValueFvPatchField
Foam::DataEntry Foam::Function1
SourceFiles SourceFiles
cylindricalInletVelocityFvPatchVectorField.C cylindricalInletVelocityFvPatchVectorField.C
@ -74,7 +74,7 @@ SourceFiles
#define cylindricalInletVelocityFvPatchVectorField_H #define cylindricalInletVelocityFvPatchVectorField_H
#include "fixedValueFvPatchFields.H" #include "fixedValueFvPatchFields.H"
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -97,13 +97,13 @@ class cylindricalInletVelocityFvPatchVectorField
const vector axis_; const vector axis_;
//- Axial velocity //- Axial velocity
autoPtr<DataEntry<scalar>> axialVelocity_; autoPtr<Function1<scalar>> axialVelocity_;
//- Radial velocity //- Radial velocity
autoPtr<DataEntry<scalar>> radialVelocity_; autoPtr<Function1<scalar>> radialVelocity_;
//- RPM //- RPM
autoPtr<DataEntry<scalar>> rpm_; autoPtr<Function1<scalar>> rpm_;
public: public:

View File

@ -31,7 +31,7 @@ Description
This boundary condition provides a jump condition, using the \c cyclic This boundary condition provides a jump condition, using the \c cyclic
condition as a base. condition as a base.
The jump is specified as a \c DataEntry type, to enable the use of, e.g. The jump is specified as a \c Function1 type, to enable the use of, e.g.
contant, polynomial, table values. contant, polynomial, table values.
\heading Patch usage \heading Patch usage
@ -70,7 +70,7 @@ Note
The underlying \c patchType should be set to \c cyclic The underlying \c patchType should be set to \c cyclic
SeeAlso SeeAlso
Foam::DataEntry Foam::Function1
SourceFiles SourceFiles
fanFvPatchField.C fanFvPatchField.C
@ -84,7 +84,7 @@ SourceFiles
#define fanFvPatchField_H #define fanFvPatchField_H
#include "uniformJumpFvPatchField.H" #include "uniformJumpFvPatchField.H"
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -98,13 +98,13 @@ Foam::fanFvPatchField<Foam::scalar>::fanFvPatchField
this->jumpTable_.reset this->jumpTable_.reset
( (
new DataEntryTypes::Polynomial<scalar>("jumpTable", coeffs) new Function1Types::Polynomial<scalar>("jumpTable", coeffs)
); );
} }
else else
{ {
// Generic input constructed from dictionary // Generic input constructed from dictionary
this->jumpTable_ = DataEntry<scalar>::New("jumpTable", dict); this->jumpTable_ = Function1<scalar>::New("jumpTable", dict);
} }
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -65,7 +65,7 @@ Foam::fixedProfileFvPatchField<Type>::fixedProfileFvPatchField
) )
: :
fixedValueFvPatchField<Type>(p, iF), fixedValueFvPatchField<Type>(p, iF),
profile_(DataEntry<Type>::New("profile", dict)), profile_(Function1<Type>::New("profile", dict)),
dir_(dict.lookup("direction")), dir_(dict.lookup("direction")),
origin_(readScalar(dict.lookup("origin"))) origin_(readScalar(dict.lookup("origin")))
{ {

View File

@ -34,7 +34,7 @@ Description
\table \table
Property | Description | Required | Default value Property | Description | Required | Default value
profile | Profile DataEntry | yes | profile | Profile Function1 | yes |
direction | Profile direction | yes | direction | Profile direction | yes |
origin | Profile origin | yes | origin | Profile origin | yes |
\endtable \endtable
@ -79,12 +79,12 @@ Description
\endverbatim \endverbatim
Note Note
The profile entry is a DataEntry type. The example above gives the The profile entry is a Function1 type. The example above gives the
usage for supplying csv file. usage for supplying csv file.
SeeAlso SeeAlso
Foam::fixedValueFvPatchField Foam::fixedValueFvPatchField
Foam::DataEntry Foam::Function1
Foam::timeVaryingMappedFixedValueFvPatchField Foam::timeVaryingMappedFixedValueFvPatchField
SourceFiles SourceFiles
@ -96,7 +96,7 @@ SourceFiles
#define fixedProfileFvPatchField_H #define fixedProfileFvPatchField_H
#include "fixedValueFvPatchFields.H" #include "fixedValueFvPatchFields.H"
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -115,7 +115,7 @@ class fixedProfileFvPatchField
// Private data // Private data
//- Profile data //- Profile data
autoPtr<DataEntry<Type>> profile_; autoPtr<Function1<Type>> profile_;
//- Profile direction //- Profile direction
vector dir_; vector dir_;

View File

@ -84,13 +84,13 @@ flowRateInletVelocityFvPatchVectorField
if (dict.found("volumetricFlowRate")) if (dict.found("volumetricFlowRate"))
{ {
volumetric_ = true; volumetric_ = true;
flowRate_ = DataEntry<scalar>::New("volumetricFlowRate", dict); flowRate_ = Function1<scalar>::New("volumetricFlowRate", dict);
rhoName_ = "rho"; rhoName_ = "rho";
} }
else if (dict.found("massFlowRate")) else if (dict.found("massFlowRate"))
{ {
volumetric_ = false; volumetric_ = false;
flowRate_ = DataEntry<scalar>::New("massFlowRate", dict); flowRate_ = Function1<scalar>::New("massFlowRate", dict);
rhoName_ = word(dict.lookupOrDefault<word>("rho", "rho")); rhoName_ = word(dict.lookupOrDefault<word>("rho", "rho"));
} }
else else

View File

@ -76,7 +76,7 @@ Description
} }
\endverbatim \endverbatim
The \c flowRate entry is a \c DataEntry type, meaning that it can be The \c flowRate entry is a \c Function1 type, meaning that it can be
specified as constant, a polynomial fuction of time, and ... specified as constant, a polynomial fuction of time, and ...
Note Note
@ -87,7 +87,7 @@ Note
- Strange behaviour with potentialFoam since the U equation is not solved - Strange behaviour with potentialFoam since the U equation is not solved
SeeAlso SeeAlso
Foam::DataEntry Foam::Function1
Foam::fixedValueFvPatchField Foam::fixedValueFvPatchField
SourceFiles SourceFiles
@ -99,7 +99,7 @@ SourceFiles
#define flowRateInletVelocityFvPatchVectorField_H #define flowRateInletVelocityFvPatchVectorField_H
#include "fixedValueFvPatchFields.H" #include "fixedValueFvPatchFields.H"
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -117,7 +117,7 @@ class flowRateInletVelocityFvPatchVectorField
// Private data // Private data
//- Inlet integral flow rate //- Inlet integral flow rate
autoPtr<DataEntry<scalar>> flowRate_; autoPtr<Function1<scalar>> flowRate_;
//- Is volumetric? //- Is volumetric?
bool volumetric_; bool volumetric_;

View File

@ -68,8 +68,8 @@ Foam::oscillatingFixedValueFvPatchField<Type>::oscillatingFixedValueFvPatchField
fixedValueFvPatchField<Type>(p, iF), fixedValueFvPatchField<Type>(p, iF),
refValue_("refValue", dict, p.size()), refValue_("refValue", dict, p.size()),
offset_(dict.lookupOrDefault<Type>("offset", pTraits<Type>::zero)), offset_(dict.lookupOrDefault<Type>("offset", pTraits<Type>::zero)),
amplitude_(DataEntry<scalar>::New("amplitude", dict)), amplitude_(Function1<scalar>::New("amplitude", dict)),
frequency_(DataEntry<scalar>::New("frequency", dict)), frequency_(Function1<scalar>::New("frequency", dict)),
curTimeIndex_(-1) curTimeIndex_(-1)
{ {
if (dict.found("value")) if (dict.found("value"))

View File

@ -69,12 +69,12 @@ Description
\endverbatim \endverbatim
Note Note
The amplitude and frequency entries are DataEntry types, able to describe The amplitude and frequency entries are Function1 types, able to describe
time varying functions. The example above gives the usage for supplying time varying functions. The example above gives the usage for supplying
constant values. constant values.
SeeAlso SeeAlso
Foam::DataEntry Foam::Function1
SourceFiles SourceFiles
oscillatingFixedValueFvPatchField.C oscillatingFixedValueFvPatchField.C
@ -86,7 +86,7 @@ SourceFiles
#include "Random.H" #include "Random.H"
#include "fixedValueFvPatchFields.H" #include "fixedValueFvPatchFields.H"
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -111,10 +111,10 @@ class oscillatingFixedValueFvPatchField
Type offset_; Type offset_;
//- Amplitude //- Amplitude
autoPtr<DataEntry<scalar>> amplitude_; autoPtr<Function1<scalar>> amplitude_;
//- Frequency //- Frequency
autoPtr<DataEntry<scalar>> frequency_; autoPtr<Function1<scalar>> frequency_;
//- Current time index //- Current time index
label curTimeIndex_; label curTimeIndex_;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -86,7 +86,7 @@ rotatingPressureInletOutletVelocityFvPatchVectorField
) )
: :
pressureInletOutletVelocityFvPatchVectorField(p, iF, dict), pressureInletOutletVelocityFvPatchVectorField(p, iF, dict),
omega_(DataEntry<vector>::New("omega", dict)) omega_(Function1<vector>::New("omega", dict))
{ {
calcTangentialVelocity(); calcTangentialVelocity();
} }

View File

@ -53,7 +53,7 @@ Description
} }
\endverbatim \endverbatim
The \c omega entry is a DataEntry type, able to describe time varying The \c omega entry is a Function1 type, able to describe time varying
functions. functions.
Note Note
@ -75,7 +75,7 @@ SourceFiles
#include "fvPatchFields.H" #include "fvPatchFields.H"
#include "pressureInletOutletVelocityFvPatchVectorField.H" #include "pressureInletOutletVelocityFvPatchVectorField.H"
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -93,7 +93,7 @@ class rotatingPressureInletOutletVelocityFvPatchVectorField
// Private data // Private data
//- Angular velocity of the frame //- Angular velocity of the frame
autoPtr<DataEntry<vector>> omega_; autoPtr<Function1<vector>> omega_;
// Private Member Functions // Private Member Functions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -66,7 +66,7 @@ rotatingTotalPressureFvPatchScalarField
) )
: :
totalPressureFvPatchScalarField(p, iF, dict), totalPressureFvPatchScalarField(p, iF, dict),
omega_(DataEntry<vector>::New("omega", dict)) omega_(Function1<vector>::New("omega", dict))
{} {}

View File

@ -59,7 +59,7 @@ Description
} }
\endverbatim \endverbatim
The \c omega entry is a DataEntry type, able to describe time varying The \c omega entry is a Function1 type, able to describe time varying
functions. functions.
SeeAlso SeeAlso
@ -74,7 +74,7 @@ SourceFiles
#define rotatingTotalPressureFvPatchScalarField_H #define rotatingTotalPressureFvPatchScalarField_H
#include "totalPressureFvPatchScalarField.H" #include "totalPressureFvPatchScalarField.H"
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -92,7 +92,7 @@ class rotatingTotalPressureFvPatchScalarField
// Private data // Private data
//- Angular velocity of the frame //- Angular velocity of the frame
autoPtr<DataEntry<vector>> omega_; autoPtr<Function1<vector>> omega_;
public: public:

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -71,7 +71,7 @@ rotatingWallVelocityFvPatchVectorField
fixedValueFvPatchField<vector>(p, iF), fixedValueFvPatchField<vector>(p, iF),
origin_(dict.lookup("origin")), origin_(dict.lookup("origin")),
axis_(dict.lookup("axis")), axis_(dict.lookup("axis")),
omega_(DataEntry<scalar>::New("omega", dict)) omega_(Function1<scalar>::New("omega", dict))
{ {
if (dict.found("value")) if (dict.found("value"))
{ {

View File

@ -50,11 +50,11 @@ Description
} }
\endverbatim \endverbatim
The \c omega entry is a DataEntry type, able to describe time varying The \c omega entry is a Function1 type, able to describe time varying
functions. functions.
SeeAlso SeeAlso
Foam::DataEntry Foam::Function1
Foam::fixedValueFvPatchField Foam::fixedValueFvPatchField
SourceFiles SourceFiles
@ -66,7 +66,7 @@ SourceFiles
#define rotatingWallVelocityFvPatchVectorField_H #define rotatingWallVelocityFvPatchVectorField_H
#include "fixedValueFvPatchFields.H" #include "fixedValueFvPatchFields.H"
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -90,7 +90,7 @@ class rotatingWallVelocityFvPatchVectorField
vector axis_; vector axis_;
//- Rotational speed //- Rotational speed
autoPtr<DataEntry<scalar>> omega_; autoPtr<Function1<scalar>> omega_;
public: public:

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -75,8 +75,8 @@ swirlFlowRateInletVelocityFvPatchVectorField
fixedValueFvPatchField<vector>(p, iF, dict), fixedValueFvPatchField<vector>(p, iF, dict),
phiName_(dict.lookupOrDefault<word>("phi", "phi")), phiName_(dict.lookupOrDefault<word>("phi", "phi")),
rhoName_(dict.lookupOrDefault<word>("rho", "rho")), rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
flowRate_(DataEntry<scalar>::New("flowRate", dict)), flowRate_(Function1<scalar>::New("flowRate", dict)),
rpm_(DataEntry<scalar>::New("rpm", dict)) rpm_(Function1<scalar>::New("rpm", dict))
{} {}

View File

@ -58,7 +58,7 @@ Description
\endverbatim \endverbatim
Note Note
- the \c flowRate and \c rpm entries are DataEntry types, able to describe - the \c flowRate and \c rpm entries are Function1 types, able to describe
time varying functions. The example above gives the usage for supplying time varying functions. The example above gives the usage for supplying
constant values. constant values.
- the value is positive into the domain - the value is positive into the domain
@ -75,7 +75,7 @@ SourceFiles
#define swirlFlowRateInletVelocityFvPatchVectorField_H #define swirlFlowRateInletVelocityFvPatchVectorField_H
#include "fixedValueFvPatchFields.H" #include "fixedValueFvPatchFields.H"
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -98,10 +98,10 @@ class swirlFlowRateInletVelocityFvPatchVectorField
const word rhoName_; const word rhoName_;
//- Inlet integral flow rate //- Inlet integral flow rate
autoPtr<DataEntry<scalar>> flowRate_; autoPtr<Function1<scalar>> flowRate_;
//- Angular speed in revolutions per minute (RPM) //- Angular speed in revolutions per minute (RPM)
autoPtr<DataEntry<scalar>> rpm_; autoPtr<Function1<scalar>> rpm_;
public: public:

View File

@ -82,7 +82,7 @@ timeVaryingMappedFixedValueFvPatchField
endSampleTime_(-1), endSampleTime_(-1),
endSampledValues_(0), endSampledValues_(0),
endAverage_(pTraits<Type>::zero), endAverage_(pTraits<Type>::zero),
offset_(DataEntry<Type>::New("offset", dict)) offset_(Function1<Type>::New("offset", dict))
{ {
if if
( (

View File

@ -80,7 +80,7 @@ SourceFiles
#include "FixedList.H" #include "FixedList.H"
#include "instantList.H" #include "instantList.H"
#include "pointToPointPlanarInterpolation.H" #include "pointToPointPlanarInterpolation.H"
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -135,7 +135,7 @@ class timeVaryingMappedFixedValueFvPatchField
Type endAverage_; Type endAverage_;
//- Time varying offset values to interpolated data //- Time varying offset values to interpolated data
autoPtr<DataEntry<Type>> offset_; autoPtr<Function1<Type>> offset_;
public: public:

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -61,7 +61,7 @@ Foam::uniformFixedGradientFvPatchField<Type>::uniformFixedGradientFvPatchField
) )
: :
fixedGradientFvPatchField<Type>(p, iF), fixedGradientFvPatchField<Type>(p, iF),
uniformGradient_(DataEntry<Type>::New("uniformGradient", dict)) uniformGradient_(Function1<Type>::New("uniformGradient", dict))
{ {
this->evaluate(); this->evaluate();
} }

View File

@ -47,12 +47,12 @@ Description
\endverbatim \endverbatim
Note Note
The uniformGradient entry is a DataEntry type, able to describe time The uniformGradient entry is a Function1 type, able to describe time
varying functions. The example above gives the usage for supplying a varying functions. The example above gives the usage for supplying a
constant value. constant value.
SeeAlso SeeAlso
Foam::DataEntry Foam::Function1
Foam::fixedGradientFvPatchField Foam::fixedGradientFvPatchField
SourceFiles SourceFiles
@ -64,7 +64,7 @@ SourceFiles
#define uniformFixedGradientFvPatchField_H #define uniformFixedGradientFvPatchField_H
#include "fixedGradientFvPatchFields.H" #include "fixedGradientFvPatchFields.H"
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -83,7 +83,7 @@ class uniformFixedGradientFvPatchField
// Private data // Private data
//- Gradient //- Gradient
autoPtr<DataEntry<Type>> uniformGradient_; autoPtr<Function1<Type>> uniformGradient_;
public: public:

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -61,7 +61,7 @@ Foam::uniformFixedValueFvPatchField<Type>::uniformFixedValueFvPatchField
) )
: :
fixedValueFvPatchField<Type>(p, iF), fixedValueFvPatchField<Type>(p, iF),
uniformValue_(DataEntry<Type>::New("uniformValue", dict)) uniformValue_(Function1<Type>::New("uniformValue", dict))
{ {
this->evaluate(); this->evaluate();
} }

View File

@ -47,12 +47,12 @@ Description
\endverbatim \endverbatim
Note Note
The uniformValue entry is a DataEntry type, able to describe time The uniformValue entry is a Function1 type, able to describe time
varying functions. The example above gives the usage for supplying a varying functions. The example above gives the usage for supplying a
constant value. constant value.
SeeAlso SeeAlso
Foam::DataEntry Foam::Function1
Foam::fixedValueFvPatchField Foam::fixedValueFvPatchField
SourceFiles SourceFiles
@ -64,7 +64,7 @@ SourceFiles
#define uniformFixedValueFvPatchField_H #define uniformFixedValueFvPatchField_H
#include "fixedValueFvPatchFields.H" #include "fixedValueFvPatchFields.H"
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -82,7 +82,7 @@ class uniformFixedValueFvPatchField
{ {
// Private data // Private data
autoPtr<DataEntry<Type>> uniformValue_; autoPtr<Function1<Type>> uniformValue_;
public: public:

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -53,7 +53,7 @@ Foam::uniformInletOutletFvPatchField<Type>::uniformInletOutletFvPatchField
: :
mixedFvPatchField<Type>(p, iF), mixedFvPatchField<Type>(p, iF),
phiName_(dict.lookupOrDefault<word>("phi", "phi")), phiName_(dict.lookupOrDefault<word>("phi", "phi")),
uniformInletValue_(DataEntry<Type>::New("uniformInletValue", dict)) uniformInletValue_(Function1<Type>::New("uniformInletValue", dict))
{ {
this->refValue() = this->refValue() =
uniformInletValue_->value(this->db().time().timeOutputValue()); uniformInletValue_->value(this->db().time().timeOutputValue());

View File

@ -69,7 +69,7 @@ SourceFiles
#define uniformInletOutletFvPatchField_H #define uniformInletOutletFvPatchField_H
#include "mixedFvPatchField.H" #include "mixedFvPatchField.H"
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -94,7 +94,7 @@ protected:
word phiName_; word phiName_;
//- Value //- Value
autoPtr<DataEntry<Type>> uniformInletValue_; autoPtr<Function1<Type>> uniformInletValue_;
public: public:

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -35,7 +35,7 @@ Foam::uniformJumpFvPatchField<Type>::uniformJumpFvPatchField
) )
: :
fixedJumpFvPatchField<Type>(p, iF), fixedJumpFvPatchField<Type>(p, iF),
jumpTable_(new DataEntry<Type>("jumpTable")) jumpTable_(new Function1<Type>("jumpTable"))
{} {}
@ -62,11 +62,11 @@ Foam::uniformJumpFvPatchField<Type>::uniformJumpFvPatchField
) )
: :
fixedJumpFvPatchField<Type>(p, iF), fixedJumpFvPatchField<Type>(p, iF),
jumpTable_(new DataEntry<Type>("jumpTable")) jumpTable_(new Function1<Type>("jumpTable"))
{ {
if (this->cyclicPatch().owner()) if (this->cyclicPatch().owner())
{ {
jumpTable_ = DataEntry<Type>::New("jumpTable", dict); jumpTable_ = Function1<Type>::New("jumpTable", dict);
} }
if (dict.found("value")) if (dict.found("value"))

View File

@ -53,7 +53,7 @@ Description
The above example shows the use of a fixed jump of '10'. The above example shows the use of a fixed jump of '10'.
Note Note
The uniformValue entry is a DataEntry type, able to describe time The uniformValue entry is a Function1 type, able to describe time
varying functions. The example above gives the usage for supplying a varying functions. The example above gives the usage for supplying a
constant value. constant value.
@ -71,7 +71,7 @@ SourceFiles
#define uniformJumpFvPatchField_H #define uniformJumpFvPatchField_H
#include "fixedJumpFvPatchField.H" #include "fixedJumpFvPatchField.H"
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -93,7 +93,7 @@ protected:
// Protected data // Protected data
//- "jump" table //- "jump" table
autoPtr<DataEntry<Type>> jumpTable_; autoPtr<Function1<Type>> jumpTable_;
public: public:

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -62,11 +62,11 @@ Foam::uniformJumpAMIFvPatchField<Type>::uniformJumpAMIFvPatchField
) )
: :
fixedJumpAMIFvPatchField<Type>(p, iF), fixedJumpAMIFvPatchField<Type>(p, iF),
jumpTable_(new DataEntry<Type>("jumpTable")) jumpTable_(new Function1<Type>("jumpTable"))
{ {
if (this->cyclicAMIPatch().owner()) if (this->cyclicAMIPatch().owner())
{ {
jumpTable_ = DataEntry<Type>::New("jumpTable", dict); jumpTable_ = Function1<Type>::New("jumpTable", dict);
} }
if (dict.found("value")) if (dict.found("value"))

View File

@ -53,7 +53,7 @@ Description
The above example shows the use of a fixed jump of '10'. The above example shows the use of a fixed jump of '10'.
Note Note
The uniformValue entry is a DataEntry type, able to describe time The uniformValue entry is a Function1 type, able to describe time
varying functions. The example above gives the usage for supplying a varying functions. The example above gives the usage for supplying a
constant value. constant value.
@ -71,7 +71,7 @@ SourceFiles
#define uniformJumpAMIFvPatchField_H #define uniformJumpAMIFvPatchField_H
#include "fixedJumpAMIFvPatchField.H" #include "fixedJumpAMIFvPatchField.H"
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -93,7 +93,7 @@ protected:
// Protected data // Protected data
//- "jump" table //- "jump" table
autoPtr<DataEntry<Type>> jumpTable_; autoPtr<Function1<Type>> jumpTable_;
public: public:

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -62,7 +62,7 @@ uniformTotalPressureFvPatchScalarField
rhoName_(dict.lookupOrDefault<word>("rho", "none")), rhoName_(dict.lookupOrDefault<word>("rho", "none")),
psiName_(dict.lookupOrDefault<word>("psi", "none")), psiName_(dict.lookupOrDefault<word>("psi", "none")),
gamma_(readScalar(dict.lookup("gamma"))), gamma_(readScalar(dict.lookup("gamma"))),
pressure_(DataEntry<scalar>::New("pressure", dict)) pressure_(Function1<scalar>::New("pressure", dict))
{ {
if (dict.found("value")) if (dict.found("value"))
{ {

View File

@ -57,7 +57,7 @@ Description
} }
\endverbatim \endverbatim
The \c pressure entry is specified as a DataEntry type, able to describe The \c pressure entry is specified as a Function1 type, able to describe
time varying functions. time varying functions.
Note Note
@ -65,7 +65,7 @@ Note
SeeAlso SeeAlso
Foam::DataEntry Foam::Function1
Foam::uniformFixedValueFvPatchField Foam::uniformFixedValueFvPatchField
Foam::totalPressureFvPatchField Foam::totalPressureFvPatchField
@ -78,7 +78,7 @@ SourceFiles
#define uniformTotalPressureFvPatchScalarField_H #define uniformTotalPressureFvPatchScalarField_H
#include "fixedValueFvPatchFields.H" #include "fixedValueFvPatchFields.H"
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -112,7 +112,7 @@ class uniformTotalPressureFvPatchScalarField
scalar gamma_; scalar gamma_;
//- Table of time vs total pressure, including the bounding treatment //- Table of time vs total pressure, including the bounding treatment
autoPtr<DataEntry<scalar>> pressure_; autoPtr<Function1<scalar>> pressure_;
public: public:

View File

@ -121,7 +121,7 @@ timeVaryingMappedFixedValuePointPatchField
{ {
if (dict.found("offset")) if (dict.found("offset"))
{ {
offset_ = DataEntry<Type>::New("offset", dict); offset_ = Function1<Type>::New("offset", dict);
} }
dict.readIfPresent("fieldTableName", fieldTableName_); dict.readIfPresent("fieldTableName", fieldTableName_);

View File

@ -41,7 +41,7 @@ SourceFiles
#include "fixedValuePointPatchField.H" #include "fixedValuePointPatchField.H"
#include "instantList.H" #include "instantList.H"
#include "pointToPointPlanarInterpolation.H" #include "pointToPointPlanarInterpolation.H"
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -96,7 +96,7 @@ class timeVaryingMappedFixedValuePointPatchField
Type endAverage_; Type endAverage_;
//- Time varying offset values to interpolated data //- Time varying offset values to interpolated data
autoPtr<DataEntry<Type>> offset_; autoPtr<Function1<Type>> offset_;
public: public:

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -78,7 +78,7 @@ Foam::fv::fixedTemperatureConstraint::fixedTemperatureConstraint
{ {
Tuniform_.reset Tuniform_.reset
( (
DataEntry<scalar>::New("temperature", coeffs_).ptr() Function1<scalar>::New("temperature", coeffs_).ptr()
); );
break; break;
} }
@ -153,7 +153,7 @@ bool Foam::fv::fixedTemperatureConstraint::read(const dictionary& dict)
{ {
Tuniform_.reset Tuniform_.reset
( (
DataEntry<scalar>::New(Tuniform_->name(), dict).ptr() Function1<scalar>::New(Tuniform_->name(), dict).ptr()
); );
} }

View File

@ -42,7 +42,7 @@ Description
Note: Note:
The 'uniform' option allows the use of a time-varying uniform temperature The 'uniform' option allows the use of a time-varying uniform temperature
by means of the DataEntry type. by means of the Function1 type.
SourceFiles SourceFiles
fvOption.C fvOption.C
@ -54,7 +54,7 @@ SourceFiles
#include "cellSetOption.H" #include "cellSetOption.H"
#include "NamedEnum.H" #include "NamedEnum.H"
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -94,7 +94,7 @@ protected:
temperatureMode mode_; temperatureMode mode_;
//- Uniform temperature [K] //- Uniform temperature [K]
autoPtr<DataEntry<scalar>> Tuniform_; autoPtr<Function1<scalar>> Tuniform_;
//- Temperature field name //- Temperature field name
word TName_; word TName_;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "ConeInjection.H" #include "ConeInjection.H"
#include "TimeDataEntry.H" #include "TimeFunction1.H"
#include "mathematicalConstants.H" #include "mathematicalConstants.H"
#include "unitConversion.H" #include "unitConversion.H"
@ -52,7 +52,7 @@ Foam::ConeInjection<CloudType>::ConeInjection
), ),
flowRateProfile_ flowRateProfile_
( (
TimeDataEntry<scalar> TimeFunction1<scalar>
( (
owner.db().time(), owner.db().time(),
"flowRateProfile", "flowRateProfile",
@ -61,7 +61,7 @@ Foam::ConeInjection<CloudType>::ConeInjection
), ),
Umag_ Umag_
( (
TimeDataEntry<scalar> TimeFunction1<scalar>
( (
owner.db().time(), owner.db().time(),
"Umag", "Umag",
@ -70,7 +70,7 @@ Foam::ConeInjection<CloudType>::ConeInjection
), ),
thetaInner_ thetaInner_
( (
TimeDataEntry<scalar> TimeFunction1<scalar>
( (
owner.db().time(), owner.db().time(),
"thetaInner", "thetaInner",
@ -79,7 +79,7 @@ Foam::ConeInjection<CloudType>::ConeInjection
), ),
thetaOuter_ thetaOuter_
( (
TimeDataEntry<scalar> TimeFunction1<scalar>
( (
owner.db().time(), owner.db().time(),
"thetaOuter", "thetaOuter",

View File

@ -45,7 +45,7 @@ SourceFiles
#include "InjectionModel.H" #include "InjectionModel.H"
#include "distributionModel.H" #include "distributionModel.H"
#include "vectorList.H" #include "vectorList.H"
#include "TimeDataEntry.H" #include "TimeFunction1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -82,16 +82,16 @@ class ConeInjection
const label parcelsPerInjector_; const label parcelsPerInjector_;
//- Flow rate profile relative to SOI [] //- Flow rate profile relative to SOI []
const TimeDataEntry<scalar> flowRateProfile_; const TimeFunction1<scalar> flowRateProfile_;
//- Parcel velocity magnitude relative to SOI [m/s] //- Parcel velocity magnitude relative to SOI [m/s]
const TimeDataEntry<scalar> Umag_; const TimeFunction1<scalar> Umag_;
//- Inner half-cone angle relative to SOI [deg] //- Inner half-cone angle relative to SOI [deg]
const TimeDataEntry<scalar> thetaInner_; const TimeFunction1<scalar> thetaInner_;
//- Outer half-cone angle relative to SOI [deg] //- Outer half-cone angle relative to SOI [deg]
const TimeDataEntry<scalar> thetaOuter_; const TimeFunction1<scalar> thetaOuter_;
//- Parcel size distribution model //- Parcel size distribution model
const autoPtr<distributionModels::distributionModel> sizeDistribution_; const autoPtr<distributionModels::distributionModel> sizeDistribution_;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "ConeNozzleInjection.H" #include "ConeNozzleInjection.H"
#include "TimeDataEntry.H" #include "TimeFunction1.H"
#include "mathematicalConstants.H" #include "mathematicalConstants.H"
#include "distributionModel.H" #include "distributionModel.H"
@ -119,7 +119,7 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection
), ),
flowRateProfile_ flowRateProfile_
( (
TimeDataEntry<scalar> TimeFunction1<scalar>
( (
owner.db().time(), owner.db().time(),
"flowRateProfile", "flowRateProfile",
@ -128,7 +128,7 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection
), ),
thetaInner_ thetaInner_
( (
TimeDataEntry<scalar> TimeFunction1<scalar>
( (
owner.db().time(), owner.db().time(),
"thetaInner", "thetaInner",
@ -137,7 +137,7 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection
), ),
thetaOuter_ thetaOuter_
( (
TimeDataEntry<scalar> TimeFunction1<scalar>
( (
owner.db().time(), owner.db().time(),
"thetaOuter", "thetaOuter",

View File

@ -63,7 +63,7 @@ namespace Foam
// Forward declaration of classes // Forward declaration of classes
template<class Type> template<class Type>
class TimeDataEntry; class TimeFunction1;
class distributionModel; class distributionModel;
@ -132,13 +132,13 @@ private:
const label parcelsPerSecond_; const label parcelsPerSecond_;
//- Flow rate profile relative to SOI [] //- Flow rate profile relative to SOI []
const TimeDataEntry<scalar> flowRateProfile_; const TimeFunction1<scalar> flowRateProfile_;
//- Inner half-cone angle relative to SOI [deg] //- Inner half-cone angle relative to SOI [deg]
const TimeDataEntry<scalar> thetaInner_; const TimeFunction1<scalar> thetaInner_;
//- Outer half-cone angle relative to SOI [deg] //- Outer half-cone angle relative to SOI [deg]
const TimeDataEntry<scalar> thetaOuter_; const TimeFunction1<scalar> thetaOuter_;
//- Parcel size PDF model //- Parcel size PDF model
const autoPtr<distributionModels::distributionModel> sizeDistribution_; const autoPtr<distributionModels::distributionModel> sizeDistribution_;
@ -162,10 +162,10 @@ private:
scalar UMag_; scalar UMag_;
//- Discharge coefficient, relative to SOI [m/s] //- Discharge coefficient, relative to SOI [m/s]
TimeDataEntry<scalar> Cd_; TimeFunction1<scalar> Cd_;
//- Injection pressure [Pa] //- Injection pressure [Pa]
TimeDataEntry<scalar> Pinj_; TimeFunction1<scalar> Pinj_;
// Private Member Functions // Private Member Functions

View File

@ -49,7 +49,7 @@ Foam::InflationInjection<CloudType>::InflationInjection
duration_(readScalar(this->coeffDict().lookup("duration"))), duration_(readScalar(this->coeffDict().lookup("duration"))),
flowRateProfile_ flowRateProfile_
( (
TimeDataEntry<scalar> TimeFunction1<scalar>
( (
owner.db().time(), owner.db().time(),
"flowRateProfile", "flowRateProfile",
@ -58,7 +58,7 @@ Foam::InflationInjection<CloudType>::InflationInjection
), ),
growthRate_ growthRate_
( (
TimeDataEntry<scalar> TimeFunction1<scalar>
( (
owner.db().time(), owner.db().time(),
"growthRate", "growthRate",

View File

@ -84,10 +84,10 @@ class InflationInjection
scalar duration_; scalar duration_;
//- Flow rate profile relative to SOI [m3/s] //- Flow rate profile relative to SOI [m3/s]
TimeDataEntry<scalar> flowRateProfile_; TimeFunction1<scalar> flowRateProfile_;
//- Growth rate of particle diameters towards target [m/s] //- Growth rate of particle diameters towards target [m/s]
TimeDataEntry<scalar> growthRate_; TimeFunction1<scalar> growthRate_;
//- Positions, velocities, diameters and target diameters of //- Positions, velocities, diameters and target diameters of
// new particles after splitting // new particles after splitting

View File

@ -53,7 +53,7 @@ SourceFiles
#include "runTimeSelectionTables.H" #include "runTimeSelectionTables.H"
#include "CloudSubModelBase.H" #include "CloudSubModelBase.H"
#include "vector.H" #include "vector.H"
#include "TimeDataEntry.H" #include "TimeFunction1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -104,7 +104,7 @@ protected:
scalar massTotal_; scalar massTotal_;
//- Mass flow rate profile for steady calculations //- Mass flow rate profile for steady calculations
TimeDataEntry<scalar> massFlowRate_; TimeFunction1<scalar> massFlowRate_;
//- Total mass injected to date [kg] //- Total mass injected to date [kg]
scalar massInjected_; scalar massInjected_;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "PatchFlowRateInjection.H" #include "PatchFlowRateInjection.H"
#include "TimeDataEntry.H" #include "TimeFunction1.H"
#include "distributionModel.H" #include "distributionModel.H"
#include "mathematicalConstants.H" #include "mathematicalConstants.H"
#include "surfaceFields.H" #include "surfaceFields.H"
@ -46,7 +46,7 @@ Foam::PatchFlowRateInjection<CloudType>::PatchFlowRateInjection
duration_(readScalar(this->coeffDict().lookup("duration"))), duration_(readScalar(this->coeffDict().lookup("duration"))),
concentration_ concentration_
( (
TimeDataEntry<scalar> TimeFunction1<scalar>
( (
owner.db().time(), owner.db().time(),
"concentration", "concentration",

View File

@ -47,7 +47,7 @@ SourceFiles
#include "InjectionModel.H" #include "InjectionModel.H"
#include "patchInjectionBase.H" #include "patchInjectionBase.H"
#include "TimeDataEntry.H" #include "TimeFunction1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -78,7 +78,7 @@ class PatchFlowRateInjection
scalar duration_; scalar duration_;
//- Concentration profile of particle volume to carrier volume [-] //- Concentration profile of particle volume to carrier volume [-]
const TimeDataEntry<scalar> concentration_; const TimeFunction1<scalar> concentration_;
//- Parcels to introduce per unit volume flow rate m3 [n/m3] //- Parcels to introduce per unit volume flow rate m3 [n/m3]
const scalar parcelConcentration_; const scalar parcelConcentration_;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "PatchInjection.H" #include "PatchInjection.H"
#include "TimeDataEntry.H" #include "TimeFunction1.H"
#include "distributionModel.H" #include "distributionModel.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -47,7 +47,7 @@ Foam::PatchInjection<CloudType>::PatchInjection
U0_(this->coeffDict().lookup("U0")), U0_(this->coeffDict().lookup("U0")),
flowRateProfile_ flowRateProfile_
( (
TimeDataEntry<scalar> TimeFunction1<scalar>
( (
owner.db().time(), owner.db().time(),
"flowRateProfile", "flowRateProfile",

View File

@ -52,7 +52,7 @@ namespace Foam
{ {
template<class Type> template<class Type>
class TimeDataEntry; class TimeFunction1;
class distributionModel; class distributionModel;
@ -78,7 +78,7 @@ class PatchInjection
const vector U0_; const vector U0_;
//- Flow rate profile relative to SOI [] //- Flow rate profile relative to SOI []
const TimeDataEntry<scalar> flowRateProfile_; const TimeFunction1<scalar> flowRateProfile_;
//- Parcel size distribution model //- Parcel size distribution model
const autoPtr<distributionModels::distributionModel> sizeDistribution_; const autoPtr<distributionModels::distributionModel> sizeDistribution_;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -45,7 +45,7 @@ addToRunTimeSelectionTable(extrudeModel, radial, dictionary);
radial::radial(const dictionary& dict) radial::radial(const dictionary& dict)
: :
extrudeModel(typeName, dict), extrudeModel(typeName, dict),
R_(DataEntry<scalar>::New("R", coeffDict_)) R_(Function1<scalar>::New("R", coeffDict_))
{} {}

View File

@ -32,7 +32,7 @@ Description
#define radial_H #define radial_H
#include "extrudeModel.H" #include "extrudeModel.H"
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -51,7 +51,7 @@ class radial
{ {
// Private data // Private data
autoPtr<DataEntry<scalar>> R_; autoPtr<Function1<scalar>> R_;
public: public:

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -120,7 +120,7 @@ bool Foam::setTimeStepFunctionObject::read(const dictionary& dict)
if (enabled_) if (enabled_)
{ {
timeStepPtr_ = DataEntry<scalar>::New("deltaT", dict); timeStepPtr_ = Function1<scalar>::New("deltaT", dict);
// Check that time has adjustTimeStep // Check that time has adjustTimeStep
const dictionary& controlDict = time_.controlDict(); const dictionary& controlDict = time_.controlDict();

View File

@ -44,7 +44,7 @@ SourceFiles
#include "functionObject.H" #include "functionObject.H"
#include "dictionary.H" #include "dictionary.H"
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -71,7 +71,7 @@ class setTimeStepFunctionObject
bool enabled_; bool enabled_;
//- Time step //- Time step
autoPtr<DataEntry<scalar>> timeStepPtr_; autoPtr<Function1<scalar>> timeStepPtr_;
//- Disallow default bitwise copy construct //- Disallow default bitwise copy construct

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -69,9 +69,9 @@ inclinedFilmNusseltHeightFvPatchScalarField
) )
: :
fixedValueFvPatchScalarField(p, iF), fixedValueFvPatchScalarField(p, iF),
GammaMean_(DataEntry<scalar>::New("GammaMean", dict)), GammaMean_(Function1<scalar>::New("GammaMean", dict)),
a_(DataEntry<scalar>::New("a", dict)), a_(Function1<scalar>::New("a", dict)),
omega_(DataEntry<scalar>::New("omega", dict)) omega_(Function1<scalar>::New("omega", dict))
{ {
fvPatchScalarField::operator=(scalarField("value", dict, p.size())); fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
} }

View File

@ -39,7 +39,7 @@ SourceFiles
#include "fvPatchFields.H" #include "fvPatchFields.H"
#include "fixedValueFvPatchFields.H" #include "fixedValueFvPatchFields.H"
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -57,13 +57,13 @@ class inclinedFilmNusseltHeightFvPatchScalarField
// Private data // Private data
//- Mean mass flow rate per unit length [kg/s/m] //- Mean mass flow rate per unit length [kg/s/m]
autoPtr<DataEntry<scalar>> GammaMean_; autoPtr<Function1<scalar>> GammaMean_;
//- Perturbation amplitude [m] //- Perturbation amplitude [m]
autoPtr<DataEntry<scalar>> a_; autoPtr<Function1<scalar>> a_;
//- Perturbation frequency [rad/s/m] //- Perturbation frequency [rad/s/m]
autoPtr<DataEntry<scalar>> omega_; autoPtr<Function1<scalar>> omega_;
public: public:

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -69,9 +69,9 @@ inclinedFilmNusseltInletVelocityFvPatchVectorField
) )
: :
fixedValueFvPatchVectorField(p, iF), fixedValueFvPatchVectorField(p, iF),
GammaMean_(DataEntry<scalar>::New("GammaMean", dict)), GammaMean_(Function1<scalar>::New("GammaMean", dict)),
a_(DataEntry<scalar>::New("a", dict)), a_(Function1<scalar>::New("a", dict)),
omega_(DataEntry<scalar>::New("omega", dict)) omega_(Function1<scalar>::New("omega", dict))
{ {
fvPatchVectorField::operator=(vectorField("value", dict, p.size())); fvPatchVectorField::operator=(vectorField("value", dict, p.size()));
} }

View File

@ -39,7 +39,7 @@ SourceFiles
#include "fvPatchFields.H" #include "fvPatchFields.H"
#include "fixedValueFvPatchFields.H" #include "fixedValueFvPatchFields.H"
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -57,13 +57,13 @@ class inclinedFilmNusseltInletVelocityFvPatchVectorField
// Private data // Private data
//- Mean mass flow rate per unit length [kg/s/m] //- Mean mass flow rate per unit length [kg/s/m]
autoPtr<DataEntry<scalar>> GammaMean_; autoPtr<Function1<scalar>> GammaMean_;
//- Perturbation amplitude [m] //- Perturbation amplitude [m]
autoPtr<DataEntry<scalar>> a_; autoPtr<Function1<scalar>> a_;
//- Perturbation frequency [rad/s/m] //- Perturbation frequency [rad/s/m]
autoPtr<DataEntry<scalar>> omega_; autoPtr<Function1<scalar>> omega_;
public: public:

View File

@ -44,7 +44,7 @@ SourceFiles
#define energyJumpFvPatchScalarField_H #define energyJumpFvPatchScalarField_H
#include "fixedJumpFvPatchField.H" #include "fixedJumpFvPatchField.H"
#include "DataEntry.H" #include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

Some files were not shown because too many files have changed in this diff Show More