From a22d9fe76074f72b602e14f7ad55b0a72adcf343 Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 26 Jun 2017 09:52:26 +0100 Subject: [PATCH] BUG: correctPhi: reference cells could become -1. Part fix for #507. --- .../pimpleFoam/overPimpleDyMFoam/correctPhi.H | 23 +++++++++++-- .../interFoam/overInterDyMFoam/correctPhi.H | 32 ++++++++++++++----- 2 files changed, 44 insertions(+), 11 deletions(-) diff --git a/applications/solvers/incompressible/pimpleFoam/overPimpleDyMFoam/correctPhi.H b/applications/solvers/incompressible/pimpleFoam/overPimpleDyMFoam/correctPhi.H index 0066d23051..e5bbcadc67 100644 --- a/applications/solvers/incompressible/pimpleFoam/overPimpleDyMFoam/correctPhi.H +++ b/applications/solvers/incompressible/pimpleFoam/overPimpleDyMFoam/correctPhi.H @@ -86,9 +86,25 @@ if (mesh.changing()) fvm::laplacian(rAUf, pcorr) == fvc::div(phi) ); - //pcorrEqn.setReference(refCellI2, 0.0, true); - scalarList values(nZones, 0.0); - pcorrEqn.setReferences(refCells, values, true); + + // Only set reference for cells that are CALCULATED + { + DynamicList