FreeFOAM The Cross-Platform CFD Toolkit
createPhia.H
Go to the documentation of this file.
1  IOobject phiaHeader
2  (
3  "phia",
4  runTime.timeName(),
5  mesh,
6  IOobject::NO_READ
7  );
8 
9  autoPtr<surfaceScalarField> phiaPtr(NULL);
10 
11  if (phiaHeader.headerOk())
12  {
13  Info<< "Reading face flux field phia\n" << endl;
14 
15  phiaPtr.reset
16  (
18  (
19  IOobject
20  (
21  "phia",
22  runTime.timeName(),
23  mesh,
24  IOobject::MUST_READ,
25  IOobject::AUTO_WRITE
26  ),
27  mesh
28  )
29  );
30  }
31  else
32  {
33  Info<< "Calculating face flux field phia\n" << endl;
34 
35  wordList phiTypes
36  (
37  Ua.boundaryField().size(),
38  calculatedFvPatchScalarField::typeName
39  );
40 
41  forAll(Ua.boundaryField(), i)
42  {
43  if (isA<fixedValueFvPatchVectorField>(Ua.boundaryField()[i]))
44  {
45  phiTypes[i] = fixedValueFvPatchScalarField::typeName;
46  }
47  }
48 
49  phiaPtr.reset
50  (
52  (
53  IOobject
54  (
55  "phia",
56  runTime.timeName(),
57  mesh,
58  IOobject::NO_READ,
59  IOobject::AUTO_WRITE
60  ),
61  fvc::interpolate(Ua) & mesh.Sf(),
62  phiTypes
63  )
64  );
65  }
66 
68 
69 // ************************ vim: set sw=4 sts=4 et: ************************ //