initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / applications / utilities / postProcessing / dataConversion / foamToEnsightParts / checkHasValidField.H
blob9973a7a5fbb682531938b5e719487ae025761325
1 // check that the variable is present for all times
2 //
3 bool hasValidField = true;
5     for (label i=0; i < timeDirs.size() && hasValidField; ++i)
6     {
7         if (fieldName.size() > 2 && fieldName(fieldName.size() - 2, 2) == "_0")
8         {
9             hasValidField = false;
10             break;
11         }
13         IOobject ioHeader
14         (
15             fieldName,
16             timeDirs[i].name(),
17             mesh,
18             IOobject::NO_READ
19         );
21         hasValidField = ioHeader.headerOk();
22     }