mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: coordinateSystem: fix cloning. See #863
This commit is contained in:
@ -115,6 +115,12 @@ public:
|
||||
// \param dictName If non-empty, the sub-dictionary to use.
|
||||
cartesian(const dictionary& dict, const word& dictName);
|
||||
|
||||
//- Return clone
|
||||
virtual autoPtr<coordinateSystem> clone() const
|
||||
{
|
||||
return autoPtr<coordinateSystem>::NewFrom<cartesian>(*this);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~cartesian() = default;
|
||||
|
||||
@ -327,7 +327,7 @@ public:
|
||||
|
||||
|
||||
//- Return clone
|
||||
autoPtr<coordinateSystem> clone() const
|
||||
virtual autoPtr<coordinateSystem> clone() const
|
||||
{
|
||||
return autoPtr<coordinateSystem>::New(*this);
|
||||
}
|
||||
|
||||
@ -154,6 +154,13 @@ public:
|
||||
// \param dictName If non-empty, the sub-dictionary to use.
|
||||
cylindrical(const dictionary& dict, const word& dictName);
|
||||
|
||||
//- Return clone
|
||||
virtual autoPtr<coordinateSystem> clone() const
|
||||
{
|
||||
return autoPtr<coordinateSystem>::NewFrom<cylindrical>(*this);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~cylindrical() = default;
|
||||
|
||||
|
||||
@ -141,6 +141,12 @@ public:
|
||||
//- Construct from global lookup
|
||||
indirect(const objectRegistry& obr, const dictionary& dict);
|
||||
|
||||
//- Return clone
|
||||
virtual autoPtr<coordinateSystem> clone() const
|
||||
{
|
||||
return autoPtr<coordinateSystem>::NewFrom<indirect>(*this);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~indirect() = default;
|
||||
|
||||
Reference in New Issue
Block a user