db7fac3f24
git-svn-id: https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Core/OpenFOAM-1.5-dev@1731 e4e07f05-0c2f-0410-a05a-b8ba57e0c909
47 lines
959 B
C
47 lines
959 B
C
IOobject phiBHeader
|
|
(
|
|
"phiB",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::NO_READ
|
|
);
|
|
|
|
|
|
surfaceScalarField* phiBPtr;
|
|
|
|
if (phiBHeader.headerOk())
|
|
{
|
|
Info<< "Reading field phiB\n" << endl;
|
|
|
|
phiBPtr = new surfaceScalarField
|
|
(
|
|
IOobject
|
|
(
|
|
"phiB",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::MUST_READ,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
mesh
|
|
);
|
|
}
|
|
else
|
|
{
|
|
Info<< "Calculating face flux\n" << endl;
|
|
|
|
phiBPtr = new surfaceScalarField
|
|
(
|
|
IOobject
|
|
(
|
|
"phiB",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::NO_READ,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
(fvc::interpolate(B) & mesh.Sf())
|
|
);
|
|
}
|
|
|
|
surfaceScalarField& phiB = *phiBPtr;
|