Commit 357fc39b authored by Henry Weller's avatar Henry Weller Committed by Andrew Heather
Browse files

Function1::ramp function: Added clone function

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