Skip to content
Snippets Groups Projects
Commit c8bff967 authored by Andrew Heather's avatar Andrew Heather
Browse files

BUG: getRefCellValue() (used by the solvers) supplied an incorrect template arg

    to the returnReduce() function that led to some odd behaviour.
parent d1874a05
Branches
Tags
No related merge requests found
...@@ -77,7 +77,7 @@ void Foam::setRefCell ...@@ -77,7 +77,7 @@ void Foam::setRefCell
point refPointi(dict.lookup(refPointName)); point refPointi(dict.lookup(refPointName));
refCelli = field.mesh().findCell(refPointi); refCelli = field.mesh().findCell(refPointi);
label hasRef = (refCelli >= 0 ? 1 : 0); label hasRef = (refCelli >= 0 ? 1 : 0);
label sumHasRef = returnReduce<label>(hasRef, sumOp<label>()); label sumHasRef = returnReduce(hasRef, sumOp<label>());
if (sumHasRef != 1) if (sumHasRef != 1)
{ {
FatalIOErrorIn FatalIOErrorIn
...@@ -127,7 +127,7 @@ Foam::scalar Foam::getRefCellValue ...@@ -127,7 +127,7 @@ Foam::scalar Foam::getRefCellValue
) )
{ {
scalar refCellValue = (refCelli >= 0 ? field[refCelli] : 0.0); scalar refCellValue = (refCelli >= 0 ? field[refCelli] : 0.0);
return returnReduce<label>(refCellValue, sumOp<scalar>()); return returnReduce(refCellValue, sumOp<scalar>());
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment