From c0f9781a61cb06c2a962323188a74babe10f0138 Mon Sep 17 00:00:00 2001 From: Henry Weller <http://cfd.direct> Date: Tue, 9 Feb 2016 20:09:45 +0000 Subject: [PATCH] surfaceNormalFixedValueFvPatchVectorField: Corrected mapping constructor --- ...urfaceNormalFixedValueFvPatchVectorField.C | 34 +++++++++---------- ...urfaceNormalFixedValueFvPatchVectorField.H | 3 +- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/surfaceNormalFixedValue/surfaceNormalFixedValueFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/surfaceNormalFixedValue/surfaceNormalFixedValueFvPatchVectorField.C index bc6cc097d9..478600608b 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/surfaceNormalFixedValue/surfaceNormalFixedValueFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/surfaceNormalFixedValue/surfaceNormalFixedValueFvPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -45,40 +45,40 @@ surfaceNormalFixedValueFvPatchVectorField Foam::surfaceNormalFixedValueFvPatchVectorField:: surfaceNormalFixedValueFvPatchVectorField ( - const surfaceNormalFixedValueFvPatchVectorField& ptf, const fvPatch& p, const DimensionedField<vector, volMesh>& iF, - const fvPatchFieldMapper& mapper + const dictionary& dict ) : fixedValueFvPatchVectorField(p, iF), - refValue_(ptf.refValue_, mapper) + refValue_("refValue", dict, p.size()) { - // Note: calculate product only on ptf to avoid multiplication on - // unset values in reconstructPar. - fixedValueFvPatchVectorField::operator= - ( - vectorField - ( - ptf.refValue_*ptf.patch().nf(), - mapper - ) - ); + fvPatchVectorField::operator=(refValue_*patch().nf()); } Foam::surfaceNormalFixedValueFvPatchVectorField:: surfaceNormalFixedValueFvPatchVectorField ( + const surfaceNormalFixedValueFvPatchVectorField& ptf, const fvPatch& p, const DimensionedField<vector, volMesh>& iF, - const dictionary& dict + const fvPatchFieldMapper& mapper ) : fixedValueFvPatchVectorField(p, iF), - refValue_("refValue", dict, p.size()) + refValue_(ptf.refValue_, mapper) { - fvPatchVectorField::operator=(refValue_*patch().nf()); + // Note: calculate product only on ptf to avoid multiplication on + // unset values in reconstructPar. + fvPatchVectorField::operator= + ( + vectorField + ( + ptf.refValue_*ptf.patch().nf(), + mapper + ) + ); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/surfaceNormalFixedValue/surfaceNormalFixedValueFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/surfaceNormalFixedValue/surfaceNormalFixedValueFvPatchVectorField.H index d57dbee5b5..30a7464e2c 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/surfaceNormalFixedValue/surfaceNormalFixedValueFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/surfaceNormalFixedValue/surfaceNormalFixedValueFvPatchVectorField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -156,7 +156,6 @@ public: } - // Member functions // Mapping functions -- GitLab