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

createPhia.H

Go to the documentation of this file.
00001     IOobject phiaHeader
00002     (
00003         "phia",
00004         runTime.timeName(),
00005         mesh,
00006         IOobject::NO_READ
00007     );
00008 
00009     autoPtr<surfaceScalarField> phiaPtr(NULL);
00010 
00011     if (phiaHeader.headerOk())
00012     {
00013         Info<< "Reading face flux field phia\n" << endl;
00014 
00015         phiaPtr.reset
00016         (
00017             new surfaceScalarField
00018             (
00019                 IOobject
00020                 (
00021                     "phia",
00022                     runTime.timeName(),
00023                     mesh,
00024                     IOobject::MUST_READ,
00025                     IOobject::AUTO_WRITE
00026                 ),
00027                 mesh
00028             )
00029         );
00030     }
00031     else
00032     {
00033         Info<< "Calculating face flux field phia\n" << endl;
00034 
00035         wordList phiTypes
00036         (
00037             Ua.boundaryField().size(),
00038             calculatedFvPatchScalarField::typeName
00039         );
00040 
00041         forAll(Ua.boundaryField(), i)
00042         {
00043             if (isA<fixedValueFvPatchVectorField>(Ua.boundaryField()[i]))
00044             {
00045                 phiTypes[i] = fixedValueFvPatchScalarField::typeName;
00046             }
00047         }
00048 
00049         phiaPtr.reset
00050         (
00051             new surfaceScalarField
00052             (
00053                 IOobject
00054                 (
00055                     "phia",
00056                     runTime.timeName(),
00057                     mesh,
00058                     IOobject::NO_READ,
00059                     IOobject::AUTO_WRITE
00060                 ),
00061                 fvc::interpolate(Ua) & mesh.Sf(),
00062                 phiTypes
00063             )
00064         );
00065     }
00066 
00067     surfaceScalarField& phia = phiaPtr();
00068 
00069 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines