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

@ -118,15 +118,6 @@ public:
const externalCoupledMixedFvPatchField&
);
//- Construct and return a clone
virtual tmp<fvPatchField<Type>> clone() const
{
return tmp<fvPatchField<Type>>
(
new externalCoupledMixedFvPatchField<Type>(*this)
);
}
//- Construct as copy setting internal field reference
externalCoupledMixedFvPatchField
(
@ -134,16 +125,19 @@ public:
const DimensionedField<Type, volMesh>&
);
//- Construct and return a clone setting internal field reference
//- Return a clone
virtual tmp<fvPatchField<Type>> clone() const
{
return fvPatchField<Type>::Clone(*this);
}
//- Clone with an internal field reference
virtual tmp<fvPatchField<Type>> clone
(
const DimensionedField<Type, volMesh>& iF
) const
{
return tmp<fvPatchField<Type>>
(
new externalCoupledMixedFvPatchField<Type>(*this, iF)
);
return fvPatchField<Type>::Clone(*this, iF);
}

View File

@ -205,15 +205,6 @@ public:
const externalCoupledTemperatureMixedFvPatchScalarField&
);
//- Construct and return a clone
virtual tmp<fvPatchField<scalar>> clone() const
{
return tmp<fvPatchField<scalar>>
(
new externalCoupledTemperatureMixedFvPatchScalarField(*this)
);
}
//- Construct as copy setting internal field reference
externalCoupledTemperatureMixedFvPatchScalarField
(
@ -221,20 +212,19 @@ public:
const DimensionedField<scalar, volMesh>&
);
//- Construct and return a clone setting internal field reference
//- Return a clone
virtual tmp<fvPatchField<scalar>> clone() const
{
return fvPatchField<scalar>::Clone(*this);
}
//- Clone with an internal field reference
virtual tmp<fvPatchField<scalar>> clone
(
const DimensionedField<scalar, volMesh>& iF
) const
{
return tmp<fvPatchField<scalar>>
(
new externalCoupledTemperatureMixedFvPatchScalarField
(
*this,
iF
)
);
return fvPatchField<scalar>::Clone(*this, iF);
}