Initial commit for version 2.0.x patch release
[OpenFOAM-2.0.x.git] / applications / utilities / postProcessing / graphics / ensightFoamReader / getPatchFieldTensor.H
blob67e68359a6ed320eb739655541c90cbe8cbfa8ec
1 label patchi = which_part - 2;
3 if (nVar >= Num_variables - nSprayVariables)
5     return Z_UNDEF;
8 IOobject fieldObjectPtr
10     fieldNames[var2field[nVar]],
11     runTime.timeName(),
12     mesh,
13     IOobject::NO_READ
16 if (!fieldObjectPtr.headerOk())
18     return Z_UNDEF;
21 IOobject fieldObject
23     fieldNames[var2field[nVar]],
24     runTime.timeName(),
25     mesh,
26     IOobject::MUST_READ,
27     IOobject::NO_WRITE
30 volTensorField sf
32     fieldObject,
33     mesh
36 const tensorField& tf = sf.boundaryField()[patchi];
37 const polyBoundaryMesh& bMesh = meshPtr->boundaryMesh();
39 if (which_type == Z_TRI03)
41     label counter = 1;
42     forAll(tf, n)
43     {
44         label nPoints = bMesh[patchi][n].size();
45         if (nPoints == 3)
46         {
47 #           include "tensorConversion.H"
48         }
49     }
52 if (which_type == Z_QUA04)
54     label counter = 1;
55     forAll(tf, n)
56     {
57         label nPoints = bMesh[patchi][n].size();
58         if (nPoints == 4)
59         {
60 #           include "tensorConversion.H"
61         }
62     }
65 if (which_type == Z_NSIDED)
67     label counter = 1;
68     forAll(tf, n)
69     {
70         label nPoints = bMesh[patchi][n].size();
71         if ((nPoints != 3) && (nPoints != 4))
72         {
73 #           include "tensorConversion.H"
74         }
75     }