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
62 lines
1.4 KiB
C++
62 lines
1.4 KiB
C++
IOobject phibHeader
|
|
(
|
|
"phib",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::NO_READ
|
|
);
|
|
|
|
|
|
surfaceScalarField* phibPtr;
|
|
|
|
if (phibHeader.headerOk())
|
|
{
|
|
Info<< "Reading face flux field phib\n" << endl;
|
|
|
|
phibPtr = new surfaceScalarField
|
|
(
|
|
IOobject
|
|
(
|
|
"phib",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::MUST_READ,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
mesh
|
|
);
|
|
}
|
|
else
|
|
{
|
|
Info<< "Calculating face flux field phib\n" << endl;
|
|
|
|
wordList phiTypes
|
|
(
|
|
Ub.boundaryField().size(),
|
|
calculatedFvPatchScalarField::typeName
|
|
);
|
|
|
|
for (label i=0; i<Ub.boundaryField().size(); i++)
|
|
{
|
|
if (isType<fixedValueFvPatchVectorField>(Ub.boundaryField()[i]))
|
|
{
|
|
phiTypes[i] = fixedValueFvPatchScalarField::typeName;
|
|
}
|
|
}
|
|
|
|
phibPtr = new surfaceScalarField
|
|
(
|
|
IOobject
|
|
(
|
|
"phib",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::NO_READ,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
fvc::interpolate(Ub) & mesh.Sf(),
|
|
phiTypes
|
|
);
|
|
}
|
|
|
|
surfaceScalarField& phib = *phibPtr;
|