initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / applications / solvers / heatTransfer / chtMultiRegionFoam / fluid / createFluidMeshes.H
blobaec08349eca1f3d06d53f0f22b36d9ab19e2f3a7
1     PtrList<fvMesh> fluidRegions(rp.fluidRegionNames().size());
3     forAll(rp.fluidRegionNames(), i)
4     {
5         Info<< "Create fluid mesh for region " << rp.fluidRegionNames()[i]
6             << " for time = " << runTime.timeName() << nl << endl;
8         fluidRegions.set
9         (
10             i,
11             new fvMesh
12             (
13                 IOobject
14                 (
15                     rp.fluidRegionNames()[i],
16                     runTime.timeName(),
17                     runTime,
18                     IOobject::MUST_READ
19                 )
20             )
21         );
23         // Force calculation of geometric properties to prevent it being done
24         // later in e.g. some boundary evaluation
25         //(void)fluidRegions[i].weights();
26         //(void)fluidRegions[i].deltaCoeffs();
28         // Attach environmental properties to each region
29         autoPtr<IOdictionary> environmentalProperties
30         (
31             new IOdictionary
32             (
33                 IOobject
34                 (
35                     "environmentalProperties",
36                     runTime.constant(),
37                     fluidRegions[i],
38                     IOobject::MUST_READ,
39                     IOobject::NO_WRITE
40                 )
41             )
42         );
44         environmentalProperties.ptr()->store();
45     }