File tree Expand file tree Collapse file tree 1 file changed +17
-11
lines changed
applications/solvers/dfLowMachFoam Expand file tree Collapse file tree 1 file changed +17
-11
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,9 @@ forAll(keys, i)
3131 }
3232}
3333
34+ // Declare pointer for UBlendingFactor
35+ autoPtr < surfaceScalarField > UBlendingFactorPtr ;
36+
3437// Create the localBlendingFactor field only if localBlended scheme is found
3538if (foundLocalBlended )
3639{
@@ -48,20 +51,23 @@ if (foundLocalBlended)
4851 IOobject ::NO_WRITE
4952 ),
5053 mesh
51- )
54+ );
5255
5356 // Construct the surfaceScalarField UBlendingFactor by interpolating UBlend to cell faces
54- surfaceScalarField UBlendingFactor
57+ UBlendingFactorPtr . reset
5558 (
56- IOobject
59+ new surfaceScalarField
5760 (
58- "UBlendingFactor ",
59- mesh .time ().timeName (),
60- mesh ,
61- IOobject ::NO_READ ,
62- IOobject ::NO_WRITE
63- ),
64- mesh ,
65- fvc ::interpolate (UBlend )
61+ IOobject
62+ (
63+ "UBlendingFactor" ,
64+ mesh .time ().timeName (),
65+ mesh ,
66+ IOobject ::READ_IF_PRESENT ,
67+ IOobject ::NO_WRITE ,
68+ true
69+ ),
70+ fvc ::interpolate (UBlend )
71+ )
6672 );
6773}
You can’t perform that action at this time.
0 commit comments