label pRefCell = 0; scalar pRefValue = 0.0; bool pNeedRef = false; bool procHasRef = false; if (interface.twoFluids()) { pNeedRef = true; } forAll (p.boundaryField(), patchI) { // Check only fluid B if (fluidIndicator.boundaryField()[patchI].size()) { if (min(fluidIndicator.boundaryField()[patchI]) < SMALL) { if (p.boundaryField()[patchI].fixesValue()) { pNeedRef = false; } } } } pNeedRef = returnReduce(pNeedRef, andOp()); // Find reference cell if (pNeedRef) { point refPointi(mesh.solutionDict().subDict("PIMPLE").lookup("pRefPoint")); label refCelli = mesh.findCell(refPointi); label hasRef = (refCelli >= 0 ? 1 : 0); label sumHasRef = returnReduce