BUGFIX: Uninitialised member variables
[foam-extend-3.2.git] / applications / utilities / postProcessing / graphics / newEnsightFoamReader / getPatchFieldTensor.H
blob982f63c7d12a4803ecbda011c13e07c050058a3d
1 label patchi = which_part - 2;
3 if
5     nVar >= Num_variables - nSprayVariables
6   - nSecondMeshVariables - nFaMeshVariables
9     return Z_UNDEF;
12 IOobject fieldObjectPtr
14     fieldNames[var2field[nVar]],
15     runTime.timeName(),
16     mesh,
17     IOobject::NO_READ
20 if (!fieldObjectPtr.headerOk())
22     return Z_UNDEF;
25 IOobject fieldObject
27     fieldNames[var2field[nVar]],
28     runTime.timeName(),
29     mesh,
30     IOobject::MUST_READ,
31     IOobject::NO_WRITE
34 volTensorField sf
36     fieldObject,
37     mesh
40 const tensorField& tf = sf.boundaryField()[patchi];
41 const polyBoundaryMesh& bMesh = meshPtr->boundaryMesh();
43 if (which_type == Z_TRI03)
45     label counter = 1;
46     for (label n=0; n<tf.size(); n++)
47     {
48         label nPoints = bMesh[patchi][n].size();
49         if (nPoints == 3)
50         {
51 #           include "tensorConversion.H"
52         }
53     }
56 if (which_type == Z_QUA04)
58     label counter = 1;
59     for (label n=0; n<tf.size(); n++)
60     {
61         label nPoints = bMesh[patchi][n].size();
62         if (nPoints == 4)
63         {
64 #           include "tensorConversion.H"
65         }
66     }
69 if (which_type == Z_NSIDED)
71     label counter = 1;
72     for (label n=0; n<tf.size(); n++)
73     {
74         label nPoints = bMesh[patchi][n].size();
75         if ((nPoints != 3) && (nPoints != 4))
76         {
77 #           include "tensorConversion.H"
78         }
79     }