Commit 415d000d authored by Andrew Heather's avatar Andrew Heather
Browse files

INT: Compatibility updates for Function1 related code

parent 3b6eb380
......@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -127,6 +127,12 @@ public:
//- Copy constructor
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
virtual ~CSV();
......
......@@ -72,6 +72,17 @@ Type Foam::Function1<Type>::value(const scalar x) const
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>
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>
Foam::tmp<Foam::Field<typename Function1Type::returnType>>
Foam::FieldFunction1<Function1Type>::value
......
......@@ -142,7 +142,7 @@ public:
virtual Type value(const scalar x) const;
//- 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
virtual Type integrate(const scalar x1, const scalar x2) const;
......@@ -152,7 +152,7 @@ public:
(
const scalarField& x1,
const scalarField& x2
) const = 0;
) const;
// I/O
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment