From e7e54e156ce92b90e79acafe735db5ec13e97772 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Thu, 13 Aug 2015 19:09:57 +0100 Subject: [PATCH] uniformFixedGradientFvPatchField: Corrected constructor Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1827 --- .../uniformFixedGradientFvPatchField.C | 29 +++++++------------ .../uniformFixedGradientFvPatchFieldsFwd.H | 4 +-- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchField.C index 877e413d..0a5a113d 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,15 +25,10 @@ License #include "uniformFixedGradientFvPatchField.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -uniformFixedGradientFvPatchField::uniformFixedGradientFvPatchField +Foam::uniformFixedGradientFvPatchField::uniformFixedGradientFvPatchField ( const fvPatch& p, const DimensionedField& iF @@ -45,7 +40,7 @@ uniformFixedGradientFvPatchField::uniformFixedGradientFvPatchField template -uniformFixedGradientFvPatchField::uniformFixedGradientFvPatchField +Foam::uniformFixedGradientFvPatchField::uniformFixedGradientFvPatchField ( const fvPatch& p, const DimensionedField& iF, @@ -58,7 +53,7 @@ uniformFixedGradientFvPatchField::uniformFixedGradientFvPatchField template -uniformFixedGradientFvPatchField::uniformFixedGradientFvPatchField +Foam::uniformFixedGradientFvPatchField::uniformFixedGradientFvPatchField ( const uniformFixedGradientFvPatchField& ptf, const fvPatch& p, @@ -76,7 +71,7 @@ uniformFixedGradientFvPatchField::uniformFixedGradientFvPatchField template -uniformFixedGradientFvPatchField::uniformFixedGradientFvPatchField +Foam::uniformFixedGradientFvPatchField::uniformFixedGradientFvPatchField ( const fvPatch& p, const DimensionedField& iF, @@ -95,11 +90,13 @@ uniformFixedGradientFvPatchField::uniformFixedGradientFvPatchField const scalar t = this->db().time().timeOutputValue(); this->gradient() = uniformGradient_->value(t); } + + fixedGradientFvPatchField::evaluate(); } template -uniformFixedGradientFvPatchField::uniformFixedGradientFvPatchField +Foam::uniformFixedGradientFvPatchField::uniformFixedGradientFvPatchField ( const uniformFixedGradientFvPatchField& ptf ) @@ -115,7 +112,7 @@ uniformFixedGradientFvPatchField::uniformFixedGradientFvPatchField template -uniformFixedGradientFvPatchField::uniformFixedGradientFvPatchField +Foam::uniformFixedGradientFvPatchField::uniformFixedGradientFvPatchField ( const uniformFixedGradientFvPatchField& ptf, const DimensionedField& iF @@ -142,7 +139,7 @@ uniformFixedGradientFvPatchField::uniformFixedGradientFvPatchField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template -void uniformFixedGradientFvPatchField::updateCoeffs() +void Foam::uniformFixedGradientFvPatchField::updateCoeffs() { if (this->updated()) { @@ -157,7 +154,7 @@ void uniformFixedGradientFvPatchField::updateCoeffs() template -void uniformFixedGradientFvPatchField::write(Ostream& os) const +void Foam::uniformFixedGradientFvPatchField::write(Ostream& os) const { fixedGradientFvPatchField::write(os); uniformGradient_->writeData(os); @@ -165,8 +162,4 @@ void uniformFixedGradientFvPatchField::write(Ostream& os) const } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchFieldsFwd.H b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchFieldsFwd.H index 9eaa07e2..d76a6080 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchFieldsFwd.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchFieldsFwd.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,7 +37,7 @@ namespace Foam template class uniformFixedGradientFvPatchField; -makePatchTypeFieldTypedefs(uniform); +makePatchTypeFieldTypedefs(uniformFixedGradient); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //