TimeFunctions1: Added construct from time and Function1

This commit is contained in:
Will Bainbridge
2023-05-11 14:27:54 +01:00
parent bd7d1a438a
commit db83ae3e8a
2 changed files with 22 additions and 2 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -41,6 +41,19 @@ Foam::TimeFunction1<Type>::TimeFunction1
{}
template<class Type>
Foam::TimeFunction1<Type>::TimeFunction1
(
const Time& time,
const Function1<Type>& function
)
:
time_(time),
name_(function.name()),
function_(function.clone().ptr())
{}
template<class Type>
Foam::TimeFunction1<Type>::TimeFunction1
(

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -86,6 +86,13 @@ public:
const dictionary& dict
);
//- Construct from time and Function1
TimeFunction1
(
const Time& time,
const Function1<Type>& function
);
//- Construct null from time and name
TimeFunction1
(