Use factory Clone for patch fields

This commit is contained in:
Mark OLESEN
2024-01-23 11:22:19 +00:00
committed by Andrew Heather
parent 7cfd053079
commit 152eceeb56
361 changed files with 3157 additions and 5623 deletions

View File

@ -85,18 +85,6 @@ public:
const pointPatchFieldMapper&
);
//- Construct and return a clone
virtual autoPtr<pointPatchField<Type>> clone() const
{
return autoPtr<pointPatchField<Type>>
(
new zeroGradientPointPatchField<Type>
(
*this
)
);
}
//- Construct as copy setting internal field reference
zeroGradientPointPatchField
(
@ -104,20 +92,19 @@ public:
const DimensionedField<Type, pointMesh>&
);
//- Return a clone
virtual autoPtr<pointPatchField<Type>> clone() const
{
return pointPatchField<Type>::Clone(*this);
}
//- Construct and return a clone setting internal field reference
virtual autoPtr<pointPatchField<Type>> clone
(
const DimensionedField<Type, pointMesh>& iF
) const
{
return autoPtr<pointPatchField<Type>>
(
new zeroGradientPointPatchField<Type>
(
*this,
iF
)
);
return pointPatchField<Type>::Clone(*this, iF);
}
};