Function1: Optimized field evaluations

This commit is contained in:
Henry Weller
2017-08-08 10:16:08 +01:00
committed by Andrew Heather
parent 2f431ffd3d
commit 3b6eb380d0
43 changed files with 677 additions and 265 deletions

View File

@ -54,12 +54,4 @@ Foam::Function1Types::linearRamp::~linearRamp()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::scalar Foam::Function1Types::linearRamp::value(const scalar t) const
{
return ramp::linearRamp(t);
}
// ************************************************************************* //

View File

@ -77,12 +77,6 @@ public:
const dictionary& dict
);
//- Construct and return a clone
virtual tmp<Function1<scalar>> clone() const
{
return tmp<Function1<scalar>>(new linearRamp(*this));
}
//- Destructor
virtual ~linearRamp();
@ -91,7 +85,7 @@ public:
// Member Functions
//- Return value for time t
scalar value(const scalar t) const;
virtual inline scalar value(const scalar t) const;
};
@ -102,6 +96,10 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "linearRampI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,39 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "linearRamp.H"
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
inline Foam::scalar Foam::Function1Types::linearRamp::value
(
const scalar t
) const
{
return ramp::linearRamp(t);
}
// ************************************************************************* //