Skip to content
Snippets Groups Projects
Commit 415d000d authored by Andrew Heather's avatar Andrew Heather
Browse files

INT: Compatibility updates for Function1 related code

parent 3b6eb380
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -127,6 +127,12 @@ public: ...@@ -127,6 +127,12 @@ public:
//- Copy constructor //- Copy constructor
CSV(const CSV<Type>& tbl); CSV(const CSV<Type>& tbl);
//- Construct and return a clone
virtual tmp<Function1<Type>> clone() const
{
return tmp<Function1<Type>>(new CSV<Type>(*this));
}
//- Destructor //- Destructor
virtual ~CSV(); virtual ~CSV();
......
...@@ -72,6 +72,17 @@ Type Foam::Function1<Type>::value(const scalar x) const ...@@ -72,6 +72,17 @@ Type Foam::Function1<Type>::value(const scalar x) const
return Zero; return Zero;
} }
template<class Type>
Foam::tmp<Foam::Field<Type>> Foam::Function1<Type>::value
(
const scalarField& x
) const
{
NotImplemented;
return tmp<Foam::Field<Type>>(nullptr);
}
template<class Type> template<class Type>
Type Foam::Function1<Type>::integrate(const scalar x1, const scalar x2) const Type Foam::Function1<Type>::integrate(const scalar x1, const scalar x2) const
...@@ -82,6 +93,19 @@ Type Foam::Function1<Type>::integrate(const scalar x1, const scalar x2) const ...@@ -82,6 +93,19 @@ Type Foam::Function1<Type>::integrate(const scalar x1, const scalar x2) const
} }
template<class Type>
Foam::tmp<Foam::Field<Type>> Foam::Function1<Type>::integrate
(
const scalarField& x1,
const scalarField& x2
) const
{
NotImplemented;
return tmp<Foam::Field<Type>>(nullptr);
}
template<class Function1Type> template<class Function1Type>
Foam::tmp<Foam::Field<typename Function1Type::returnType>> Foam::tmp<Foam::Field<typename Function1Type::returnType>>
Foam::FieldFunction1<Function1Type>::value Foam::FieldFunction1<Function1Type>::value
......
...@@ -142,7 +142,7 @@ public: ...@@ -142,7 +142,7 @@ public:
virtual Type value(const scalar x) const; virtual Type value(const scalar x) const;
//- Return value as a function of (scalar) independent variable //- Return value as a function of (scalar) independent variable
virtual tmp<Field<Type>> value(const scalarField& x) const = 0; virtual tmp<Field<Type>> value(const scalarField& x) const;
//- Integrate between two (scalar) values //- Integrate between two (scalar) values
virtual Type integrate(const scalar x1, const scalar x2) const; virtual Type integrate(const scalar x1, const scalar x2) const;
...@@ -152,7 +152,7 @@ public: ...@@ -152,7 +152,7 @@ public:
( (
const scalarField& x1, const scalarField& x1,
const scalarField& x2 const scalarField& x2
) const = 0; ) const;
// I/O // I/O
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment