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

@ -107,15 +107,6 @@ public:
const ${typeName}FixedValueFvPatch${FieldType}&
);
//- Construct and return a clone
virtual tmp<fvPatch${FieldType}> clone() const
{
return tmp<fvPatch${FieldType}>
(
new ${typeName}FixedValueFvPatch${FieldType}(*this)
);
}
//- Construct as copy setting internal field reference
${typeName}FixedValueFvPatch${FieldType}
(
@ -123,16 +114,19 @@ public:
const DimensionedField<${TemplateType}, volMesh>&
);
//- Construct and return a clone setting internal field reference
virtual tmp<fvPatch${FieldType}> clone
//- Return a clone
virtual tmp<fvPatchField<${TemplateType}>> clone() const
{
return fvPatchField<${TemplateType}>::Clone(*this);
}
//- Clone with an internal field reference
virtual tmp<fvPatchField<${TemplateType}>> clone
(
const DimensionedField<${TemplateType}, volMesh>& iF
) const
{
return tmp<fvPatch${FieldType}>
(
new ${typeName}FixedValueFvPatch${FieldType}(*this, iF)
);
return fvPatchField<${TemplateType}>::Clone(*this, iF);
}

View File

@ -108,15 +108,6 @@ public:
const ${typeName}FixedValuePointPatch${FieldType}&
);
//- Construct and return a clone
virtual autoPtr<pointPatchField<${TemplateType}>> clone() const
{
return autoPtr<pointPatchField<${TemplateType}>>
(
new ${typeName}FixedValuePointPatch${FieldType}(*this)
);
}
//- Construct as copy setting internal field reference
${typeName}FixedValuePointPatch${FieldType}
(
@ -124,16 +115,19 @@ public:
const DimensionedField<${TemplateType}, pointMesh>&
);
//- Return a clone
virtual autoPtr<pointPatchField<${TemplateType}>> clone() const
{
return pointPatchField<${TemplateType}>::Clone(*this);
}
//- Construct and return a clone setting internal field reference
virtual autoPtr<pointPatchField<${TemplateType}>> clone
(
const DimensionedField<${TemplateType}, pointMesh>& iF
) const
{
return autoPtr<pointPatchField<${TemplateType}>>
(
new ${typeName}FixedValuePointPatch${FieldType}(*this, iF)
);
return pointPatchField<${TemplateType}>::Clone(*this, iF);
}

View File

@ -107,15 +107,6 @@ public:
const ${typeName}MixedValueFvPatch${FieldType}&
);
//- Construct and return a clone
virtual tmp<fvPatch${FieldType}> clone() const
{
return tmp<fvPatch${FieldType}>
(
new ${typeName}MixedValueFvPatch${FieldType}(*this)
);
}
//- Construct as copy setting internal field reference
${typeName}MixedValueFvPatch${FieldType}
(
@ -123,16 +114,19 @@ public:
const DimensionedField<${TemplateType}, volMesh>&
);
//- Construct and return a clone setting internal field reference
virtual tmp<fvPatch${FieldType}> clone
//- Return a clone
virtual tmp<fvPatchField<${TemplateType}>> clone() const
{
return fvPatchField<${TemplateType}>::Clone(*this);
}
//- Clone with an internal field reference
virtual tmp<fvPatchField<${TemplateType}>> clone
(
const DimensionedField<${TemplateType}, volMesh>& iF
) const
{
return tmp<fvPatch${FieldType}>
(
new ${typeName}MixedValueFvPatch${FieldType}(*this, iF)
);
return fvPatchField<${TemplateType}>::Clone(*this, iF);
}