FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

createPhiB.H

Go to the documentation of this file.
00001     IOobject phiBHeader
00002     (
00003         "phiB",
00004         runTime.timeName(),
00005         mesh,
00006         IOobject::NO_READ
00007     );
00008 
00009 
00010     surfaceScalarField* phiBPtr;
00011 
00012     if (phiBHeader.headerOk())
00013     {
00014         Info<< "Reading field phiB\n" << endl;
00015 
00016         phiBPtr = new surfaceScalarField
00017         (
00018             IOobject
00019             (
00020                 "phiB",
00021                 runTime.timeName(),
00022                 mesh,
00023                 IOobject::MUST_READ,
00024                 IOobject::AUTO_WRITE
00025             ),
00026             mesh
00027         );
00028     }
00029     else
00030     {
00031         Info<< "Calculating face flux\n" << endl;
00032 
00033         phiBPtr = new surfaceScalarField
00034         (
00035             IOobject
00036             (
00037                 "phiB",
00038                 runTime.timeName(),
00039                 mesh,
00040                 IOobject::NO_READ,
00041                 IOobject::AUTO_WRITE
00042             ),
00043             (fvc::interpolate(B) & mesh.Sf())
00044         );
00045     }
00046 
00047     surfaceScalarField& phiB = *phiBPtr;
00048 
00049 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines