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,15 +85,6 @@ public:
const fvPatchFieldMapper&
);
//- Construct and return a clone
virtual tmp<fvPatchScalarField> clone() const
{
return tmp<fvPatchScalarField>
(
new adjointOutletPressureFvPatchScalarField(*this)
);
}
//- Construct as copy setting internal field reference
adjointOutletPressureFvPatchScalarField
(
@ -101,16 +92,19 @@ public:
const DimensionedField<scalar, volMesh>&
);
//- Construct and return a clone setting internal field reference
virtual tmp<fvPatchScalarField> clone
//- 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<fvPatchScalarField>
(
new adjointOutletPressureFvPatchScalarField(*this, iF)
);
return fvPatchField<scalar>::Clone(*this, iF);
}

View File

@ -85,15 +85,6 @@ public:
const fvPatchFieldMapper&
);
//- Construct and return a clone
virtual tmp<fvPatchVectorField> clone() const
{
return tmp<fvPatchVectorField>
(
new adjointOutletVelocityFvPatchVectorField(*this)
);
}
//- Construct as copy setting internal field reference
adjointOutletVelocityFvPatchVectorField
(
@ -101,16 +92,19 @@ public:
const DimensionedField<vector, volMesh>&
);
//- Construct and return a clone setting internal field reference
virtual tmp<fvPatchVectorField> clone
//- Return a clone
virtual tmp<fvPatchField<vector>> clone() const
{
return fvPatchField<vector>::Clone(*this);
}
//- Clone with an internal field reference
virtual tmp<fvPatchField<vector>> clone
(
const DimensionedField<vector, volMesh>& iF
) const
{
return tmp<fvPatchVectorField>
(
new adjointOutletVelocityFvPatchVectorField(*this, iF)
);
return fvPatchField<vector>::Clone(*this, iF);
}