From a86fe1f3acedca4c088000414fc15496c009f436 Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Thu, 14 Feb 2019 19:40:23 +0000 Subject: [PATCH] functionObjects: phaseScalarTransport: Solution control update --- .../phaseScalarTransport/phaseScalarTransport.C | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/functionObjects/solvers/phaseScalarTransport/phaseScalarTransport.C b/src/functionObjects/solvers/phaseScalarTransport/phaseScalarTransport.C index 2dbdee0778..ca5a0c13fb 100644 --- a/src/functionObjects/solvers/phaseScalarTransport/phaseScalarTransport.C +++ b/src/functionObjects/solvers/phaseScalarTransport/phaseScalarTransport.C @@ -167,16 +167,12 @@ Foam::functionObjects::phaseScalarTransport::alphaPhi() writeDDt(0); } - // Construct a non-orthogonal solution control - nonOrthogonalSolutionControl control - ( - const_cast(mesh_), + // Lookup the non-orthogonal solution control + nonOrthogonalSolutionControl& control = mesh_.lookupObjectRef ( solutionControl::typeName - ) - .algorithmName() - ); + ); // Solve for the potential and correct alphaPhi with the resulting flux if (phi.dimensions() == dimVolume/dimTime)