Commit 5157be4b authored by Henry Weller's avatar Henry Weller Committed by Andrew Heather
Browse files

Function1::ramp function: Added clone function

parent 0ada640f
...@@ -75,8 +75,8 @@ public: ...@@ -75,8 +75,8 @@ public:
//- Construct from entry name and dictionary //- Construct from entry name and dictionary
ZeroConstant(const word& entryName, const dictionary& dict); ZeroConstant(const word& entryName, const dictionary& dict);
//- Construct and return a clzero //- Construct and return a clone
virtual tmp<Function1<Type>> clzero() const virtual tmp<Function1<Type>> clone() const
{ {
return tmp<Function1<Type>>(new ZeroConstant<Type>(*this)); return tmp<Function1<Type>>(new ZeroConstant<Type>(*this));
} }
......
...@@ -77,6 +77,12 @@ public: ...@@ -77,6 +77,12 @@ public:
const dictionary& dict const dictionary& dict
); );
//- Construct and return a clone
virtual tmp<Function1<scalar>> clone() const
{
return tmp<Function1<scalar>>(new halfCosineRamp(*this));
}
//- Destructor //- Destructor
virtual ~halfCosineRamp(); virtual ~halfCosineRamp();
......
...@@ -77,6 +77,12 @@ public: ...@@ -77,6 +77,12 @@ public:
const dictionary& dict const dictionary& dict
); );
//- Construct and return a clone
virtual tmp<Function1<scalar>> clone() const
{
return tmp<Function1<scalar>>(new linearRamp(*this));
}
//- Destructor //- Destructor
virtual ~linearRamp(); virtual ~linearRamp();
......
...@@ -77,6 +77,12 @@ public: ...@@ -77,6 +77,12 @@ public:
const dictionary& dict const dictionary& dict
); );
//- Construct and return a clone
virtual tmp<Function1<scalar>> clone() const
{
return tmp<Function1<scalar>>(new quadraticRamp(*this));
}
//- Destructor //- Destructor
virtual ~quadraticRamp(); virtual ~quadraticRamp();
......
...@@ -77,6 +77,12 @@ public: ...@@ -77,6 +77,12 @@ public:
const dictionary& dict const dictionary& dict
); );
//- Construct and return a clone
virtual tmp<Function1<scalar>> clone() const
{
return tmp<Function1<scalar>>(new quarterCosineRamp(*this));
}
//- Destructor //- Destructor
virtual ~quarterCosineRamp(); virtual ~quarterCosineRamp();
......
...@@ -77,6 +77,12 @@ public: ...@@ -77,6 +77,12 @@ public:
const dictionary& dict const dictionary& dict
); );
//- Construct and return a clone
virtual tmp<Function1<scalar>> clone() const
{
return tmp<Function1<scalar>>(new quarterSineRamp(*this));
}
//- Destructor //- Destructor
virtual ~quarterSineRamp(); virtual ~quarterSineRamp();
......
Supports Markdown
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