/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2020-2021 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 .
\*---------------------------------------------------------------------------*/
#include "objectFunction1.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template
Foam::objectFunction1::objectFunction1
(
const word& name,
const dictionary& dict,
const type&
)
:
autoPtr>
(
Function1::New(name, dict).ptr()
)
{}
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
template class ObjectType>
Foam::autoPtr Foam::objectFunction1::New
(
const word& name,
const dictionary& dict,
const word& objectName,
const objectRegistry& db
)
{
autoPtr ptr
(
db.foundObject>(objectName)
? new objectFunction1(name, dict, type())
: db.foundObject>(objectName)
? new objectFunction1(name, dict, type())
: db.foundObject>(objectName)
? new objectFunction1(name, dict, type())
: db.foundObject>(objectName)
? new objectFunction1(name, dict, type())
: db.foundObject>(objectName)
? new objectFunction1(name, dict, type())
: nullptr
);
if (!ptr.valid())
{
// Spit lookup error
db.lookupObject(objectName);
}
return ptr;
}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
template
PrimitiveType Foam::objectFunction1::value
(
const scalar x
) const
{
return autoPtr>::operator*().value(x);
}
template
Foam::tmp> Foam::objectFunction1::value
(
const scalarField& x
) const
{
return autoPtr>::operator*().value(x);
}
template
PrimitiveType Foam::objectFunction1::integral
(
const scalar x1,
const scalar x2
) const
{
return autoPtr>::operator*().integral(x1, x2);
}
template
Foam::tmp> Foam::objectFunction1::integral
(
const scalarField& x1,
const scalarField& x2
) const
{
return autoPtr>::operator*().integral(x1, x2);
}
// ************************************************************************* //