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.
|
// \param dictName If non-empty, the sub-dictionary to use.
|
||||||
cartesian(const dictionary& dict, const word& dictName);
|
cartesian(const dictionary& dict, const word& dictName);
|
||||||
|
|
||||||
|
//- Return clone
|
||||||
|
virtual autoPtr<coordinateSystem> clone() const
|
||||||
|
{
|
||||||
|
return autoPtr<coordinateSystem>::NewFrom<cartesian>(*this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~cartesian() = default;
|
virtual ~cartesian() = default;
|
||||||
|
|||||||
@ -327,7 +327,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Return clone
|
//- Return clone
|
||||||
autoPtr<coordinateSystem> clone() const
|
virtual autoPtr<coordinateSystem> clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<coordinateSystem>::New(*this);
|
return autoPtr<coordinateSystem>::New(*this);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -154,6 +154,13 @@ public:
|
|||||||
// \param dictName If non-empty, the sub-dictionary to use.
|
// \param dictName If non-empty, the sub-dictionary to use.
|
||||||
cylindrical(const dictionary& dict, const word& dictName);
|
cylindrical(const dictionary& dict, const word& dictName);
|
||||||
|
|
||||||
|
//- Return clone
|
||||||
|
virtual autoPtr<coordinateSystem> clone() const
|
||||||
|
{
|
||||||
|
return autoPtr<coordinateSystem>::NewFrom<cylindrical>(*this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~cylindrical() = default;
|
virtual ~cylindrical() = default;
|
||||||
|
|
||||||
|
|||||||
@ -141,6 +141,12 @@ public:
|
|||||||
//- Construct from global lookup
|
//- Construct from global lookup
|
||||||
indirect(const objectRegistry& obr, const dictionary& dict);
|
indirect(const objectRegistry& obr, const dictionary& dict);
|
||||||
|
|
||||||
|
//- Return clone
|
||||||
|
virtual autoPtr<coordinateSystem> clone() const
|
||||||
|
{
|
||||||
|
return autoPtr<coordinateSystem>::NewFrom<indirect>(*this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~indirect() = default;
|
virtual ~indirect() = default;
|
||||||
|
|||||||
Reference in New Issue
Block a user