Forward compatibility: flex
[foam-extend-3.2.git] / applications / utilities / postProcessing / graphics / newEnsightFoamReader / getLagrangianVector.H
blob59f2806a32ad40591950e38544de7870182fd8ae
2 // Not sure if this is necessary anymore
4 nVar -= Num_variables - nSprayVariables + lagrangianScalarNames.size();
6 if (nVar >= 0)
9     word name = lagrangianVectorNames[nVar];
11     IOField<vector> v
12     (
13         IOobject
14         (
15             name,
16             runTime.timeName(),
17             "lagrangian",
18             mesh,
19             IOobject::MUST_READ,
20             IOobject::NO_WRITE
21         )
22     );
24     if (v.size() != 0)
25     {
26         for
27         (
28             label n = 0;
29             n < v.size();
30             n++
31         )
32         {
34             if (component == 0)
35             {
36                 var_array[n+1] = v[n].x();
37             }
38             else if (component == 1)
39             {
40                 var_array[n+1] = v[n].y();
41             }
42             else if (component == 2)
43             {
44                 var_array[n+1] = v[n].z();
45             }
46         }
47     }
49 else
51     //Info << "getLagrangianVector: nVar = " << nVar << endl;
52     return Z_UNDEF;