Use factory Clone for patch fields
This commit is contained in:
committed by
Andrew Heather
parent
7cfd053079
commit
152eceeb56
@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user