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 e0ae7fc0e4
commit 0b4643922a
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/>.
Application
testDataEntry
Test-Function1
Description
Tests DataEntry
Tests Function1
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "DataEntry.H"
#include "Function1.H"
#include "IOdictionary.H"
#include "linearInterpolationWeights.H"
#include "splineInterpolationWeights.H"
@ -54,8 +54,8 @@ int main(int argc, char *argv[])
//values[0] = 0.0;
//values[1] = 1.0;
//linearInterpolationWeights interpolator
splineInterpolationWeights interpolator
linearInterpolationWeights interpolator
//splineInterpolationWeights interpolator
(
samples
);
@ -98,11 +98,11 @@ int main(int argc, char *argv[])
return 1;
}
IOdictionary dataEntryProperties
IOdictionary function1Properties
(
IOobject
(
"dataEntryProperties",
"function1Properties",
runTime.constant(),
mesh,
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",
dataEntryProperties
"function1",
function1Properties
)
);
scalar x0 = readScalar(dataEntryProperties.lookup("x0"));
scalar x1 = readScalar(dataEntryProperties.lookup("x1"));
scalar x0 = readScalar(function1Properties.lookup("x0"));
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
<< " x0 = " << x0 << nl
@ -130,12 +130,12 @@ int main(int argc, char *argv[])
<< endl;
Info<< "Interpolation" << nl
<< " f(x0) = " << dataEntry().value(x0) << nl
<< " f(x1) = " << dataEntry().value(x1) << nl
<< " f(x0) = " << function1().value(x0) << nl
<< " f(x1) = " << function1().value(x1) << nl
<< endl;
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;
return 0;

View File

@ -11,7 +11,7 @@ FoamFile
format ascii;
class dictionary;
location "constant";
object dataEntryProperties;
object function1Properties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -19,7 +19,7 @@ x0 0.5;
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"
Info<< "Reading data file" << endl;
DataEntryTypes::CSV<scalar> pData("pressure", dict, "Data");
Function1Types::CSV<scalar> pData("pressure", dict, "Data");
// time history data
const scalarField t(pData.x());

View File

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

View File

@ -80,7 +80,7 @@ SourceFiles
#define CONSTRUCT_H
#include "BASEFvPatchFields.H"
#include "DataEntry.H"
#include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -110,7 +110,7 @@ class CONSTRUCT
FIELD fieldData_;
//- 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 wordData_;

View File

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

View File

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

View File

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

View File

@ -36,7 +36,7 @@ Description
}
\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
constant value.
@ -49,7 +49,7 @@ SourceFiles
#define uniformFixedValuePointPatchField_H
#include "fixedValuePointPatchField.H"
#include "DataEntry.H"
#include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -67,7 +67,7 @@ class uniformFixedValuePointPatchField
{
// Private data
autoPtr<DataEntry<Type>> uniformValue_;
autoPtr<Function1<Type>> uniformValue_;
public:
@ -150,7 +150,7 @@ public:
// Access
//- Return the fluctuation scale
const DataEntry<Type>& uniformValue() const
const Function1<Type>& uniformValue() const
{
return uniformValue_;
}

View File

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

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::DataEntryTypes::CSV
Foam::Function1Types::CSV
Description
Templated CSV container data entry. Reference column is always a scalar,
@ -51,7 +51,7 @@ SourceFiles
#ifndef CSV_H
#define CSV_H
#include "DataEntry.H"
#include "Function1.H"
#include "TableBase.H"
#include "Tuple2.H"
#include "labelList.H"
@ -63,15 +63,15 @@ namespace Foam
{
// Forward declaration of friend functions and operators
namespace DataEntryTypes
namespace Function1Types
{
template<class Type> class CSV;
};
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);
//- 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
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -23,7 +23,7 @@ License
\*---------------------------------------------------------------------------*/
#include "DataEntry.H"
#include "Function1.H"
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
@ -31,10 +31,10 @@ template<class Type>
Foam::Ostream& Foam::operator<<
(
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.timeColumn_
<< token::SPACE << tbl.componentColumns_
@ -50,9 +50,9 @@ Foam::Ostream& Foam::operator<<
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 << indent << word(this->name() + "Coeffs") << nl;
os << indent << token::BEGIN_BLOCK << incrIndent << nl;

View File

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

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::DataEntryTypes::Constant
Foam::Function1Types::Constant
Description
Templated basic entry that holds a constant value.
@ -40,7 +40,7 @@ SourceFiles
#ifndef Constant_H
#define Constant_H
#include "DataEntry.H"
#include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -48,15 +48,15 @@ namespace Foam
{
// Forward declaration of friend functions and operators
namespace DataEntryTypes
namespace Function1Types
{
template<class Type> class Constant;
};
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>
class Constant
:
public DataEntry<Type>
public Function1<Type>
{
// Private data
@ -92,7 +92,7 @@ public:
Constant(const word& entryName, const dictionary& dict);
//- 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
Constant(const word& entryName, Istream& is);
@ -100,9 +100,9 @@ public:
Constant(const Constant<Type>& cnst);
//- 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
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "Constant.C"
# include "DataEntryNew.C"
# include "Function1New.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -31,10 +31,10 @@ template<class Type>
Foam::Ostream& Foam::operator<<
(
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_;
// Check state of Ostream
@ -48,9 +48,9 @@ Foam::Ostream& Foam::operator<<
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;
}

View File

@ -23,13 +23,13 @@ License
\*---------------------------------------------------------------------------*/
#include "DataEntry.H"
#include "Function1.H"
#include "Time.H"
// * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
template<class Type>
Foam::DataEntry<Type>::DataEntry(const word& entryName)
Foam::Function1<Type>::Function1(const word& entryName)
:
refCount(),
name_(entryName)
@ -37,7 +37,7 @@ Foam::DataEntry<Type>::DataEntry(const word& entryName)
template<class Type>
Foam::DataEntry<Type>::DataEntry(const DataEntry<Type>& de)
Foam::Function1<Type>::Function1(const Function1<Type>& de)
:
refCount(),
name_(de.name_)
@ -47,28 +47,28 @@ Foam::DataEntry<Type>::DataEntry(const DataEntry<Type>& de)
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class Type>
Foam::DataEntry<Type>::~DataEntry()
Foam::Function1<Type>::~Function1()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
const Foam::word& Foam::DataEntry<Type>::name() const
const Foam::word& Foam::Function1<Type>::name() const
{
return name_;
}
template<class Type>
void Foam::DataEntry<Type>::convertTimeBase(const Time&)
void Foam::Function1<Type>::convertTimeBase(const Time&)
{
// do nothing
}
template<class Type>
Type Foam::DataEntry<Type>::value(const scalar x) const
Type Foam::Function1<Type>::value(const scalar x) const
{
NotImplemented;
@ -77,7 +77,7 @@ Type Foam::DataEntry<Type>::value(const scalar x) const
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;
@ -86,7 +86,7 @@ Type Foam::DataEntry<Type>::integrate(const scalar x1, const scalar x2) const
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
@ -103,7 +103,7 @@ Foam::tmp<Foam::Field<Type>> Foam::DataEntry<Type>::value
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& x2
@ -122,6 +122,6 @@ Foam::tmp<Foam::Field<Type>> Foam::DataEntry<Type>::integrate
// * * * * * * * * * * * * * * 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/>.
Class
Foam::DataEntry
Foam::Function1
Description
Top level data entry class for use in dictionaries. Provides a mechanism
@ -31,13 +31,13 @@ Description
limits.
SourceFiles
DataEntry.C
DataEntryNew.C
Function1.C
Function1New.C
\*---------------------------------------------------------------------------*/
#ifndef DataEntry_H
#define DataEntry_H
#ifndef Function1_H
#define Function1_H
#include "dictionary.H"
#include "Field.H"
@ -51,22 +51,22 @@ namespace Foam
class Time;
// Forward declaration of friend functions and operators
template<class Type> class DataEntry;
template<class Type> Ostream& operator<<(Ostream&, const DataEntry<Type>&);
template<class Type> class Function1;
template<class Type> Ostream& operator<<(Ostream&, const Function1<Type>&);
/*---------------------------------------------------------------------------*\
Class DataEntry Declaration
Class Function1 Declaration
\*---------------------------------------------------------------------------*/
template<class Type>
class DataEntry
class Function1
:
public refCount
{
// Private Member Functions
//- Disallow default bitwise assignment
void operator=(const DataEntry<Type>&);
void operator=(const Function1<Type>&);
protected:
@ -80,13 +80,13 @@ protected:
public:
//- Runtime type information
TypeName("DataEntry")
TypeName("Function1")
//- Declare runtime constructor selection table
declareRunTimeSelectionTable
(
autoPtr,
DataEntry,
Function1,
dictionary,
(
const word& entryName,
@ -99,20 +99,20 @@ public:
// Constructor
//- Construct from entry name
DataEntry(const word& entryName);
Function1(const word& entryName);
//- Copy constructor
DataEntry(const DataEntry<Type>& de);
Function1(const Function1<Type>& de);
//- 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
static autoPtr<DataEntry<Type>> New
static autoPtr<Function1<Type>> New
(
const word& entryName,
const dictionary& dict
@ -120,7 +120,7 @@ public:
//- Destructor
virtual ~DataEntry();
virtual ~Function1();
// Member Functions
@ -162,7 +162,7 @@ public:
friend Ostream& operator<< <Type>
(
Ostream& os,
const DataEntry<Type>& de
const Function1<Type>& de
);
//- Write in dictionary format
@ -176,29 +176,29 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makeDataEntry(Type) \
#define makeFunction1(Type) \
\
defineNamedTemplateTypeNameAndDebug(DataEntry<Type>, 0); \
defineNamedTemplateTypeNameAndDebug(Function1<Type>, 0); \
\
defineTemplateRunTimeSelectionTable \
( \
DataEntry<Type>, \
Function1<Type>, \
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_;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "DataEntry.C"
# include "Function1.C"
# include "Constant.H"
#endif

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -31,10 +31,10 @@ template<class Type>
Foam::Ostream& Foam::operator<<
(
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_;
// Check state of Ostream
@ -48,9 +48,9 @@ Foam::Ostream& Foam::operator<<
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;
}

View File

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

View File

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

View File

@ -31,10 +31,10 @@ template<class Type>
Foam::Ostream& Foam::operator<<
(
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.amplitude_
<< token::SPACE << se.frequency_
@ -52,9 +52,9 @@ Foam::Ostream& Foam::operator<<
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 << indent << word(this->name() + "Coeffs") << nl;
os << indent << token::BEGIN_BLOCK << incrIndent << nl;

View File

@ -28,7 +28,7 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Type>
Foam::DataEntryTypes::Table<Type>::Table
Foam::Function1Types::Table<Type>::Table
(
const word& entryName,
const dictionary& dict
@ -44,7 +44,7 @@ Foam::DataEntryTypes::Table<Type>::Table
template<class Type>
Foam::DataEntryTypes::Table<Type>::Table(const Table<Type>& tbl)
Foam::Function1Types::Table<Type>::Table(const Table<Type>& tbl)
:
TableBase<Type>(tbl)
{}
@ -53,7 +53,7 @@ Foam::DataEntryTypes::Table<Type>::Table(const Table<Type>& tbl)
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
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/>.
Class
Foam::DataEntryTypes::Table
Foam::Function1Types::Table
Description
Templated table container data entry. Items are stored in a list of
@ -45,7 +45,7 @@ SourceFiles
#ifndef Table_H
#define Table_H
#include "DataEntry.H"
#include "Function1.H"
#include "Tuple2.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -54,15 +54,15 @@ namespace Foam
{
// Forward declaration of friend functions and operators
namespace DataEntryTypes
namespace Function1Types
{
template<class Type> class Table;
};
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);
//- 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
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

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

View File

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

View File

@ -23,7 +23,7 @@ License
\*---------------------------------------------------------------------------*/
#include "DataEntry.H"
#include "Function1.H"
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
@ -31,10 +31,10 @@ template<class Type>
Foam::Ostream& Foam::operator<<
(
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_;
// Check state of Ostream
@ -48,16 +48,16 @@ Foam::Ostream& Foam::operator<<
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;
writeEntries(os);
}
template<class Type>
void Foam::DataEntryTypes::TableBase<Type>::writeEntries(Ostream& os) const
void Foam::Function1Types::TableBase<Type>::writeEntries(Ostream& os) const
{
if (boundsHandling_ != CLAMP)
{

View File

@ -28,7 +28,7 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Type>
Foam::DataEntryTypes::TableFile<Type>::TableFile
Foam::Function1Types::TableFile<Type>::TableFile
(
const word& entryName,
const dictionary& dict
@ -58,7 +58,7 @@ Foam::DataEntryTypes::TableFile<Type>::TableFile
template<class Type>
Foam::DataEntryTypes::TableFile<Type>::TableFile(const TableFile<Type>& tbl)
Foam::Function1Types::TableFile<Type>::TableFile(const TableFile<Type>& tbl)
:
TableBase<Type>(tbl),
fName_(tbl.fName_)
@ -68,7 +68,7 @@ Foam::DataEntryTypes::TableFile<Type>::TableFile(const TableFile<Type>& tbl)
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
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/>.
Class
Foam::DataEntryTypes::TableFile
Foam::Function1Types::TableFile
Description
Templated table container data entry where data is read from file.
@ -56,7 +56,7 @@ SourceFiles
#ifndef TableFile_H
#define TableFile_H
#include "DataEntry.H"
#include "Function1.H"
#include "Tuple2.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -65,15 +65,15 @@ namespace Foam
{
// Forward declaration of friend functions and operators
namespace DataEntryTypes
namespace Function1Types
{
template<class Type> class TableFile;
};
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);
//- 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
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -23,14 +23,14 @@ License
\*---------------------------------------------------------------------------*/
#include "DataEntry.H"
#include "Function1.H"
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
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
<< indent << word(this->name() + "Coeffs") << nl

View File

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

View File

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

View File

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

View File

@ -57,7 +57,7 @@ Foam::solidBodyMotionFunctions::rotatingMotion::rotatingMotion
solidBodyMotionFunction(SBMFCoeffs, runTime),
origin_(SBMFCoeffs_.lookup("origin")),
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
(
DataEntry<scalar>::New("omega", SBMFCoeffs_).ptr()
Function1<scalar>::New("omega", SBMFCoeffs_).ptr()
);
return true;

View File

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

View File

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

View File

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

View File

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

View File

@ -57,13 +57,13 @@ Description
\endverbatim
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
the usage for supplying constant values.
SeeAlso
Foam::fixedValueFvPatchField
Foam::DataEntry
Foam::Function1
SourceFiles
cylindricalInletVelocityFvPatchVectorField.C
@ -74,7 +74,7 @@ SourceFiles
#define cylindricalInletVelocityFvPatchVectorField_H
#include "fixedValueFvPatchFields.H"
#include "DataEntry.H"
#include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -97,13 +97,13 @@ class cylindricalInletVelocityFvPatchVectorField
const vector axis_;
//- Axial velocity
autoPtr<DataEntry<scalar>> axialVelocity_;
autoPtr<Function1<scalar>> axialVelocity_;
//- Radial velocity
autoPtr<DataEntry<scalar>> radialVelocity_;
autoPtr<Function1<scalar>> radialVelocity_;
//- RPM
autoPtr<DataEntry<scalar>> rpm_;
autoPtr<Function1<scalar>> rpm_;
public:

View File

@ -31,7 +31,7 @@ Description
This boundary condition provides a jump condition, using the \c cyclic
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.
\heading Patch usage
@ -70,7 +70,7 @@ Note
The underlying \c patchType should be set to \c cyclic
SeeAlso
Foam::DataEntry
Foam::Function1
SourceFiles
fanFvPatchField.C
@ -84,7 +84,7 @@ SourceFiles
#define fanFvPatchField_H
#include "uniformJumpFvPatchField.H"
#include "DataEntry.H"
#include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -98,13 +98,13 @@ Foam::fanFvPatchField<Foam::scalar>::fanFvPatchField
this->jumpTable_.reset
(
new DataEntryTypes::Polynomial<scalar>("jumpTable", coeffs)
new Function1Types::Polynomial<scalar>("jumpTable", coeffs)
);
}
else
{
// 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
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -65,7 +65,7 @@ Foam::fixedProfileFvPatchField<Type>::fixedProfileFvPatchField
)
:
fixedValueFvPatchField<Type>(p, iF),
profile_(DataEntry<Type>::New("profile", dict)),
profile_(Function1<Type>::New("profile", dict)),
dir_(dict.lookup("direction")),
origin_(readScalar(dict.lookup("origin")))
{

View File

@ -34,7 +34,7 @@ Description
\table
Property | Description | Required | Default value
profile | Profile DataEntry | yes |
profile | Profile Function1 | yes |
direction | Profile direction | yes |
origin | Profile origin | yes |
\endtable
@ -79,12 +79,12 @@ Description
\endverbatim
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.
SeeAlso
Foam::fixedValueFvPatchField
Foam::DataEntry
Foam::Function1
Foam::timeVaryingMappedFixedValueFvPatchField
SourceFiles
@ -96,7 +96,7 @@ SourceFiles
#define fixedProfileFvPatchField_H
#include "fixedValueFvPatchFields.H"
#include "DataEntry.H"
#include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -115,7 +115,7 @@ class fixedProfileFvPatchField
// Private data
//- Profile data
autoPtr<DataEntry<Type>> profile_;
autoPtr<Function1<Type>> profile_;
//- Profile direction
vector dir_;

View File

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

View File

@ -76,7 +76,7 @@ Description
}
\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 ...
Note
@ -87,7 +87,7 @@ Note
- Strange behaviour with potentialFoam since the U equation is not solved
SeeAlso
Foam::DataEntry
Foam::Function1
Foam::fixedValueFvPatchField
SourceFiles
@ -99,7 +99,7 @@ SourceFiles
#define flowRateInletVelocityFvPatchVectorField_H
#include "fixedValueFvPatchFields.H"
#include "DataEntry.H"
#include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -117,7 +117,7 @@ class flowRateInletVelocityFvPatchVectorField
// Private data
//- Inlet integral flow rate
autoPtr<DataEntry<scalar>> flowRate_;
autoPtr<Function1<scalar>> flowRate_;
//- Is volumetric?
bool volumetric_;

View File

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

View File

@ -69,12 +69,12 @@ Description
\endverbatim
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
constant values.
SeeAlso
Foam::DataEntry
Foam::Function1
SourceFiles
oscillatingFixedValueFvPatchField.C
@ -86,7 +86,7 @@ SourceFiles
#include "Random.H"
#include "fixedValueFvPatchFields.H"
#include "DataEntry.H"
#include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -111,10 +111,10 @@ class oscillatingFixedValueFvPatchField
Type offset_;
//- Amplitude
autoPtr<DataEntry<scalar>> amplitude_;
autoPtr<Function1<scalar>> amplitude_;
//- Frequency
autoPtr<DataEntry<scalar>> frequency_;
autoPtr<Function1<scalar>> frequency_;
//- Current time index
label curTimeIndex_;

View File

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

View File

@ -53,7 +53,7 @@ Description
}
\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.
Note
@ -75,7 +75,7 @@ SourceFiles
#include "fvPatchFields.H"
#include "pressureInletOutletVelocityFvPatchVectorField.H"
#include "DataEntry.H"
#include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -93,7 +93,7 @@ class rotatingPressureInletOutletVelocityFvPatchVectorField
// Private data
//- Angular velocity of the frame
autoPtr<DataEntry<vector>> omega_;
autoPtr<Function1<vector>> omega_;
// Private Member Functions

View File

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

View File

@ -59,7 +59,7 @@ Description
}
\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.
SeeAlso
@ -74,7 +74,7 @@ SourceFiles
#define rotatingTotalPressureFvPatchScalarField_H
#include "totalPressureFvPatchScalarField.H"
#include "DataEntry.H"
#include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -92,7 +92,7 @@ class rotatingTotalPressureFvPatchScalarField
// Private data
//- Angular velocity of the frame
autoPtr<DataEntry<vector>> omega_;
autoPtr<Function1<vector>> omega_;
public:

View File

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

View File

@ -50,11 +50,11 @@ Description
}
\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.
SeeAlso
Foam::DataEntry
Foam::Function1
Foam::fixedValueFvPatchField
SourceFiles
@ -66,7 +66,7 @@ SourceFiles
#define rotatingWallVelocityFvPatchVectorField_H
#include "fixedValueFvPatchFields.H"
#include "DataEntry.H"
#include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -90,7 +90,7 @@ class rotatingWallVelocityFvPatchVectorField
vector axis_;
//- Rotational speed
autoPtr<DataEntry<scalar>> omega_;
autoPtr<Function1<scalar>> omega_;
public:

View File

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

View File

@ -58,7 +58,7 @@ Description
\endverbatim
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
constant values.
- the value is positive into the domain
@ -75,7 +75,7 @@ SourceFiles
#define swirlFlowRateInletVelocityFvPatchVectorField_H
#include "fixedValueFvPatchFields.H"
#include "DataEntry.H"
#include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -98,10 +98,10 @@ class swirlFlowRateInletVelocityFvPatchVectorField
const word rhoName_;
//- Inlet integral flow rate
autoPtr<DataEntry<scalar>> flowRate_;
autoPtr<Function1<scalar>> flowRate_;
//- Angular speed in revolutions per minute (RPM)
autoPtr<DataEntry<scalar>> rpm_;
autoPtr<Function1<scalar>> rpm_;
public:

View File

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

View File

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

View File

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

View File

@ -47,12 +47,12 @@ Description
\endverbatim
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
constant value.
SeeAlso
Foam::DataEntry
Foam::Function1
Foam::fixedGradientFvPatchField
SourceFiles
@ -64,7 +64,7 @@ SourceFiles
#define uniformFixedGradientFvPatchField_H
#include "fixedGradientFvPatchFields.H"
#include "DataEntry.H"
#include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -83,7 +83,7 @@ class uniformFixedGradientFvPatchField
// Private data
//- Gradient
autoPtr<DataEntry<Type>> uniformGradient_;
autoPtr<Function1<Type>> uniformGradient_;
public:

View File

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

View File

@ -47,12 +47,12 @@ Description
\endverbatim
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
constant value.
SeeAlso
Foam::DataEntry
Foam::Function1
Foam::fixedValueFvPatchField
SourceFiles
@ -64,7 +64,7 @@ SourceFiles
#define uniformFixedValueFvPatchField_H
#include "fixedValueFvPatchFields.H"
#include "DataEntry.H"
#include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -82,7 +82,7 @@ class uniformFixedValueFvPatchField
{
// Private data
autoPtr<DataEntry<Type>> uniformValue_;
autoPtr<Function1<Type>> uniformValue_;
public:

View File

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

View File

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

View File

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

View File

@ -53,7 +53,7 @@ Description
The above example shows the use of a fixed jump of '10'.
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
constant value.
@ -71,7 +71,7 @@ SourceFiles
#define uniformJumpFvPatchField_H
#include "fixedJumpFvPatchField.H"
#include "DataEntry.H"
#include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -93,7 +93,7 @@ protected:
// Protected data
//- "jump" table
autoPtr<DataEntry<Type>> jumpTable_;
autoPtr<Function1<Type>> jumpTable_;
public:

View File

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

View File

@ -53,7 +53,7 @@ Description
The above example shows the use of a fixed jump of '10'.
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
constant value.
@ -71,7 +71,7 @@ SourceFiles
#define uniformJumpAMIFvPatchField_H
#include "fixedJumpAMIFvPatchField.H"
#include "DataEntry.H"
#include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -93,7 +93,7 @@ protected:
// Protected data
//- "jump" table
autoPtr<DataEntry<Type>> jumpTable_;
autoPtr<Function1<Type>> jumpTable_;
public:

View File

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

View File

@ -57,7 +57,7 @@ Description
}
\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.
Note
@ -65,7 +65,7 @@ Note
SeeAlso
Foam::DataEntry
Foam::Function1
Foam::uniformFixedValueFvPatchField
Foam::totalPressureFvPatchField
@ -78,7 +78,7 @@ SourceFiles
#define uniformTotalPressureFvPatchScalarField_H
#include "fixedValueFvPatchFields.H"
#include "DataEntry.H"
#include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -112,7 +112,7 @@ class uniformTotalPressureFvPatchScalarField
scalar gamma_;
//- Table of time vs total pressure, including the bounding treatment
autoPtr<DataEntry<scalar>> pressure_;
autoPtr<Function1<scalar>> pressure_;
public:

View File

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

View File

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

View File

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

View File

@ -42,7 +42,7 @@ Description
Note:
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
fvOption.C
@ -54,7 +54,7 @@ SourceFiles
#include "cellSetOption.H"
#include "NamedEnum.H"
#include "DataEntry.H"
#include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -94,7 +94,7 @@ protected:
temperatureMode mode_;
//- Uniform temperature [K]
autoPtr<DataEntry<scalar>> Tuniform_;
autoPtr<Function1<scalar>> Tuniform_;
//- Temperature field name
word TName_;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -47,7 +47,7 @@ SourceFiles
#include "InjectionModel.H"
#include "patchInjectionBase.H"
#include "TimeDataEntry.H"
#include "TimeFunction1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -78,7 +78,7 @@ class PatchFlowRateInjection
scalar duration_;
//- 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]
const scalar parcelConcentration_;

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -45,7 +45,7 @@ addToRunTimeSelectionTable(extrudeModel, radial, dictionary);
radial::radial(const dictionary& 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
#include "extrudeModel.H"
#include "DataEntry.H"
#include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -51,7 +51,7 @@ class radial
{
// Private data
autoPtr<DataEntry<scalar>> R_;
autoPtr<Function1<scalar>> R_;
public:

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -44,7 +44,7 @@ SourceFiles
#define energyJumpFvPatchScalarField_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