mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
bubbleFoam: Cleaned-up createPhi
This commit is contained in:
@ -6,24 +6,26 @@
|
||||
IOobject::NO_READ
|
||||
);
|
||||
|
||||
|
||||
surfaceScalarField* phiaPtr;
|
||||
autoPtr<surfaceScalarField> phiaPtr(NULL);
|
||||
|
||||
if (phiaHeader.headerOk())
|
||||
{
|
||||
Info<< "Reading face flux field phia\n" << endl;
|
||||
|
||||
phiaPtr = new surfaceScalarField
|
||||
phiaPtr.reset
|
||||
(
|
||||
IOobject
|
||||
new surfaceScalarField
|
||||
(
|
||||
"phia",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
IOobject
|
||||
(
|
||||
"phia",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
)
|
||||
);
|
||||
}
|
||||
else
|
||||
@ -44,19 +46,22 @@
|
||||
}
|
||||
}
|
||||
|
||||
phiaPtr = new surfaceScalarField
|
||||
phiaPtr.reset
|
||||
(
|
||||
IOobject
|
||||
new surfaceScalarField
|
||||
(
|
||||
"phia",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
fvc::interpolate(Ua) & mesh.Sf(),
|
||||
phiTypes
|
||||
IOobject
|
||||
(
|
||||
"phia",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
fvc::interpolate(Ua) & mesh.Sf(),
|
||||
phiTypes
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
surfaceScalarField& phia = *phiaPtr;
|
||||
surfaceScalarField& phia = phiaPtr();
|
||||
|
||||
@ -6,24 +6,26 @@
|
||||
IOobject::NO_READ
|
||||
);
|
||||
|
||||
|
||||
surfaceScalarField* phibPtr;
|
||||
autoPtr<surfaceScalarField> phibPtr(NULL);
|
||||
|
||||
if (phibHeader.headerOk())
|
||||
{
|
||||
Info<< "Reading face flux field phib\n" << endl;
|
||||
|
||||
phibPtr = new surfaceScalarField
|
||||
phibPtr.reset
|
||||
(
|
||||
IOobject
|
||||
new surfaceScalarField
|
||||
(
|
||||
"phib",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
IOobject
|
||||
(
|
||||
"phib",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
)
|
||||
);
|
||||
}
|
||||
else
|
||||
@ -44,19 +46,22 @@
|
||||
}
|
||||
}
|
||||
|
||||
phibPtr = new surfaceScalarField
|
||||
phibPtr.reset
|
||||
(
|
||||
IOobject
|
||||
new surfaceScalarField
|
||||
(
|
||||
"phib",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
fvc::interpolate(Ub) & mesh.Sf(),
|
||||
phiTypes
|
||||
IOobject
|
||||
(
|
||||
"phib",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
fvc::interpolate(Ub) & mesh.Sf(),
|
||||
phiTypes
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
surfaceScalarField& phib = *phibPtr;
|
||||
surfaceScalarField& phib = phibPtr();
|
||||
|
||||
Reference in New Issue
Block a user