diff --git a/src/meshTools/coordinateSystems/cartesianCS.H b/src/meshTools/coordinateSystems/cartesianCS.H index 75e4550f2f..f26afe94e7 100644 --- a/src/meshTools/coordinateSystems/cartesianCS.H +++ b/src/meshTools/coordinateSystems/cartesianCS.H @@ -106,6 +106,12 @@ public: //- Construct from dictionary cartesianCS(const word&, const dictionary&); + //- Construct and return a clone + virtual autoPtr clone() const + { + return autoPtr(new cartesianCS(*this)); + } + //- Destructor virtual ~cartesianCS(); diff --git a/src/meshTools/coordinateSystems/coordinateSystem.H b/src/meshTools/coordinateSystems/coordinateSystem.H index 469a29a971..1c22bcb191 100644 --- a/src/meshTools/coordinateSystems/coordinateSystem.H +++ b/src/meshTools/coordinateSystems/coordinateSystem.H @@ -160,12 +160,11 @@ public: //- Construct from dictionary with a given name coordinateSystem(const word& name, const dictionary&); - - //- Return clone - autoPtr clone() const - { - return autoPtr(new coordinateSystem(*this)); - } + //- Construct and return a clone + virtual autoPtr clone() const + { + return autoPtr(new coordinateSystem(*this)); + } // Declare run-time constructor selection table diff --git a/src/meshTools/coordinateSystems/cylindricalCS.H b/src/meshTools/coordinateSystems/cylindricalCS.H index 55d733cf0c..b6d1e39d4f 100644 --- a/src/meshTools/coordinateSystems/cylindricalCS.H +++ b/src/meshTools/coordinateSystems/cylindricalCS.H @@ -114,6 +114,12 @@ public: //- Construct from dictionary and name cylindricalCS(const word&, const dictionary&); + //- Construct and return a clone + virtual autoPtr clone() const + { + return autoPtr(new cylindricalCS(*this)); + } + //- Destructor virtual ~cylindricalCS();