From e91d95f739a2be0c1da695bdda2e3b9e21ce8e56 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 19 Feb 2013 10:36:47 +0000 Subject: [PATCH] BUG: oscillatingFixedValue: use offset at construct-from-dictionary-without-value --- .../oscillatingFixedValueFvPatchField.C | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchField.C index 47fd87059f..42d52401d8 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -104,7 +104,11 @@ oscillatingFixedValueFvPatchField::oscillatingFixedValueFvPatchField } else { - fixedValueFvPatchField::operator==(refValue_*currentScale()); + fixedValueFvPatchField::operator== + ( + refValue_*currentScale() + + offset_ + ); } } @@ -179,9 +183,11 @@ void oscillatingFixedValueFvPatchField::updateCoeffs() if (curTimeIndex_ != this->db().time().timeIndex()) { - Field& patchField = *this; - - patchField = refValue_*currentScale() + offset_; + fixedValueFvPatchField::operator== + ( + refValue_*currentScale() + + offset_ + ); curTimeIndex_ = this->db().time().timeIndex(); }