diff --git a/src/finiteVolume/cfdTools/general/findRefCell/findRefCell.C b/src/finiteVolume/cfdTools/general/findRefCell/findRefCell.C index c98439984f..89dd6b6b2d 100644 --- a/src/finiteVolume/cfdTools/general/findRefCell/findRefCell.C +++ b/src/finiteVolume/cfdTools/general/findRefCell/findRefCell.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -30,13 +30,14 @@ License void Foam::setRefCell ( const volScalarField& field, + const volScalarField& fieldRef, const dictionary& dict, label& refCelli, scalar& refValue, const bool forceReference ) { - if (field.needReference() || forceReference) + if (fieldRef.needReference() || forceReference) { word refCellName = field.name() + "RefCell"; word refPointName = field.name() + "RefPoint"; @@ -56,6 +57,7 @@ void Foam::setRefCell "void Foam::setRefCell\n" "(\n" " const volScalarField&,\n" + " const volScalarField&,\n" " const dictionary&,\n" " label& scalar&,\n" " bool\n" @@ -76,7 +78,7 @@ void Foam::setRefCell point refPointi(dict.lookup(refPointName)); refCelli = field.mesh().findCell(refPointi); label hasRef = (refCelli >= 0 ? 1 : 0); - label sumHasRef = returnReduce(hasRef, sumOp