PatchFields: Removed simple copy constructors and clone functions

These do not necessarily set the internal field reference correctly and it is
safer that the correct internal field is provided as an argument.
This commit is contained in:
Henry Weller
2020-10-03 22:16:10 +01:00
parent cdd2db01cc
commit 7e3f4976a8
470 changed files with 733 additions and 5738 deletions

View File

@ -107,15 +107,6 @@ public:
const fvPatchFieldMapper&
);
//- Construct and return a clone
virtual tmp<fvPatchScalarField> clone() const
{
return tmp<fvPatchScalarField>
(
new smoluchowskiJumpTFvPatchScalarField(*this)
);
}
//- Construct as copy setting internal field reference
smoluchowskiJumpTFvPatchScalarField
(

View File

@ -115,15 +115,6 @@ public:
const fvPatchFieldMapper&
);
//- Construct and return a clone
virtual tmp<fvPatchVectorField> clone() const
{
return tmp<fvPatchVectorField>
(
new maxwellSlipUFvPatchVectorField(*this)
);
}
//- Construct as copy setting internal field reference
maxwellSlipUFvPatchVectorField
(

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -70,18 +70,6 @@ Foam::mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
{}
template<class Type>
Foam::mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
(
const mixedFixedValueSlipFvPatchField<Type>& ptf
)
:
transformFvPatchField<Type>(ptf),
refValue_(ptf.refValue_),
valueFraction_(ptf.valueFraction_)
{}
template<class Type>
Foam::mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
(

View File

@ -94,20 +94,11 @@ public:
const fvPatchFieldMapper&
);
//- Copy constructor
//- Disallow copy without setting internal field reference
mixedFixedValueSlipFvPatchField
(
const mixedFixedValueSlipFvPatchField<Type>&
);
//- Construct and return a clone
virtual tmp<fvPatchField<Type>> clone() const
{
return tmp<fvPatchField<Type>>
(
new mixedFixedValueSlipFvPatchField<Type>(*this)
);
}
) = delete;
//- Copy constructor setting internal field reference
mixedFixedValueSlipFvPatchField

View File

@ -121,15 +121,6 @@ public:
const fvPatchFieldMapper&
);
//- Construct and return a clone
virtual tmp<fvPatchScalarField> clone() const
{
return tmp<fvPatchScalarField>
(
new fixedRhoFvPatchScalarField(*this)
);
}
//- Copy constructor setting internal field reference
fixedRhoFvPatchScalarField
(