Skip to content
Snippets Groups Projects
Commit 0c163e40 authored by Mark OLESEN's avatar Mark OLESEN
Browse files

COMP: missing clone methods for some derived boundary conditions

parent a1ccd1b7
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016, 2019 OpenFOAM Foundation Copyright (C) 2011-2016, 2019 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd. Copyright (C) 2019-2020 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -177,6 +177,8 @@ public: ...@@ -177,6 +177,8 @@ public:
const DimensionedField<scalar, volMesh>& const DimensionedField<scalar, volMesh>&
); );
// No clone methods - abstract class
// Member Functions // Member Functions
......
...@@ -61,7 +61,7 @@ class alphatPhaseChangeWallFunctionFvPatchScalarField ...@@ -61,7 +61,7 @@ class alphatPhaseChangeWallFunctionFvPatchScalarField
{ {
protected: protected:
// Protected data // Protected Data
//- Rate of phase-change //- Rate of phase-change
scalarField dmdt_; scalarField dmdt_;
...@@ -117,8 +117,10 @@ public: ...@@ -117,8 +117,10 @@ public:
const DimensionedField<scalar, volMesh>& const DimensionedField<scalar, volMesh>&
); );
// No clone methods - abstract class
// Member functions
// Member Functions
//- Return the rate of phase-change //- Return the rate of phase-change
virtual const scalarField& dmdt() const virtual const scalarField& dmdt() const
...@@ -162,9 +164,10 @@ public: ...@@ -162,9 +164,10 @@ public:
return mDotL_; return mDotL_;
} }
// Evaluation functions
//- Update the coefficients associated with the patch field // Evaluation Functions
//- Update the coefficients associated with the patch field
virtual void updateCoeffs() = 0; virtual void updateCoeffs() = 0;
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2015-2018 OpenFOAM Foundation Copyright (C) 2015-2018 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -57,7 +58,7 @@ class copiedFixedValueFvPatchScalarField ...@@ -57,7 +58,7 @@ class copiedFixedValueFvPatchScalarField
{ {
protected: protected:
// Protected data // Protected Data
word sourceFieldName_; word sourceFieldName_;
...@@ -101,6 +102,15 @@ public: ...@@ -101,6 +102,15 @@ public:
const copiedFixedValueFvPatchScalarField& const copiedFixedValueFvPatchScalarField&
); );
//- Construct and return a clone
virtual tmp<fvPatchScalarField> clone() const
{
return tmp<fvPatchScalarField>
(
new copiedFixedValueFvPatchScalarField(*this)
);
}
//- Construct as copy setting internal field reference //- Construct as copy setting internal field reference
copiedFixedValueFvPatchScalarField copiedFixedValueFvPatchScalarField
( (
...@@ -108,10 +118,22 @@ public: ...@@ -108,10 +118,22 @@ public:
const DimensionedField<scalar, volMesh>& const DimensionedField<scalar, volMesh>&
); );
//- Construct and return a clone setting internal field reference
virtual tmp<fvPatchScalarField> clone
(
const DimensionedField<scalar, volMesh>& iF
) const
{
return tmp<fvPatchScalarField>
(
new copiedFixedValueFvPatchScalarField(*this, iF)
);
}
// Member functions // Member Functions
// Evaluation functions // Evaluation Functions
//- Update the coefficients associated with the patch field //- Update the coefficients associated with the patch field
virtual void updateCoeffs(); virtual void updateCoeffs();
......
...@@ -61,7 +61,7 @@ class fixedMultiPhaseHeatFluxFvPatchScalarField ...@@ -61,7 +61,7 @@ class fixedMultiPhaseHeatFluxFvPatchScalarField
: :
public fixedValueFvPatchScalarField public fixedValueFvPatchScalarField
{ {
// Private data // Private Data
//- Heat power [W] or flux [W/m2] //- Heat power [W] or flux [W/m2]
scalarField q_; scalarField q_;
...@@ -113,6 +113,15 @@ public: ...@@ -113,6 +113,15 @@ public:
const fixedMultiPhaseHeatFluxFvPatchScalarField& const fixedMultiPhaseHeatFluxFvPatchScalarField&
); );
//- Construct and return a clone
virtual tmp<fvPatchScalarField> clone() const
{
return tmp<fvPatchScalarField>
(
new fixedMultiPhaseHeatFluxFvPatchScalarField(*this)
);
}
//- Construct as copy setting internal field reference //- Construct as copy setting internal field reference
fixedMultiPhaseHeatFluxFvPatchScalarField fixedMultiPhaseHeatFluxFvPatchScalarField
( (
...@@ -120,10 +129,22 @@ public: ...@@ -120,10 +129,22 @@ public:
const DimensionedField<scalar, volMesh>& const DimensionedField<scalar, volMesh>&
); );
//- Construct and return a clone setting internal field reference
virtual tmp<fvPatchScalarField> clone
(
const DimensionedField<scalar, volMesh>& iF
) const
{
return tmp<fvPatchScalarField>
(
new fixedMultiPhaseHeatFluxFvPatchScalarField(*this, iF)
);
}
// Member functions // Member Functions
// Evaluation functions // Evaluation Functions
//- Update the coefficients associated with the patch field //- Update the coefficients associated with the patch field
virtual void updateCoeffs(); virtual void updateCoeffs();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment