initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / applications / utilities / postProcessing / graphics / ensightFoamReader / getPatchFieldTensor.H
blob81f0bbfad6d12d17d52fa4a86c2fc163e3f4c3bb
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     for (label n=0; n<tf.size(); 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     for (label n=0; n<tf.size(); 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     for (label n=0; n<tf.size(); n++)
69     {
70         label nPoints = bMesh[patchi][n].size();
71         if ((nPoints != 3) && (nPoints != 4))
72         {
73 #           include "tensorConversion.H"
74         }
75     }