2 scalar pRefValue = 0.0;
4 bool procHasRef = false;
6 if (interface.twoFluids())
11 forAll (p.boundaryField(), patchI)
14 if (fluidIndicator.boundaryField()[patchI].size())
16 if (min(fluidIndicator.boundaryField()[patchI]) < SMALL)
18 if (p.boundaryField()[patchI].fixesValue())
26 pNeedRef = returnReduce<bool>(pNeedRef, andOp<bool>());
28 // Find reference cell
31 point refPointi(mesh.solutionDict().subDict("PISO").lookup("pRefPoint"));
32 label refCelli = mesh.findCell(refPointi);
33 label hasRef = (refCelli >= 0 ? 1 : 0);
34 label sumHasRef = returnReduce<label>(hasRef, sumOp<label>());
38 FatalErrorIn(args.executable())
39 << "Unable to set reference cell for field "
41 << nl << " Reference point pRefPoint"
42 << " found on " << sumHasRef << " domains (should be one)"
43 << nl << exit(FatalError);
53 readScalar(mesh.solutionDict().subDict("PISO").lookup("pRefValue"));