------------------------------------------------------------------------------
| 8786 | |
| 8787 | //------------------------------------------------------------------------------ |
| 8788 | bool vtkOpenFOAMReaderPrivate::ReadFieldFile(vtkFoamIOobject& io, vtkFoamDict& dict, |
| 8789 | const std::string& varName, const vtkDataArraySelection* selection) |
| 8790 | { |
| 8791 | const std::string varPath(this->CurrentTimeRegionPath() + "/" + varName); |
| 8792 | |
| 8793 | // Open the file |
| 8794 | if (!io.Open(varPath)) |
| 8795 | { |
| 8796 | vtkErrorMacro(<< "Error opening " << io.GetFileName() << ": " << io.GetError()); |
| 8797 | return false; |
| 8798 | } |
| 8799 | |
| 8800 | // if the variable is disabled on selection panel then skip it |
| 8801 | if (selection->ArrayExists(io.GetObjectName().c_str()) && |
| 8802 | !selection->ArrayIsEnabled(io.GetObjectName().c_str())) |
| 8803 | { |
| 8804 | return false; |
| 8805 | } |
| 8806 | |
| 8807 | // Read the field file into dictionary |
| 8808 | if (!dict.Read(io)) |
| 8809 | { |
| 8810 | vtkErrorMacro(<< "Error reading line " << io.GetLineNumber() << " of " << io.GetFileName() |
| 8811 | << ": " << io.GetError()); |
| 8812 | return false; |
| 8813 | } |
| 8814 | |
| 8815 | if (dict.GetType() != vtkFoamToken::DICTIONARY) |
| 8816 | { |
| 8817 | vtkErrorMacro(<< "File " << io.GetFileName() << "is not valid as a field file"); |
| 8818 | return false; |
| 8819 | } |
| 8820 | return true; |
| 8821 | } |
| 8822 | |
| 8823 | //------------------------------------------------------------------------------ |
| 8824 | vtkSmartPointer<vtkFloatArray> vtkOpenFOAMReaderPrivate::FillField(vtkFoamEntry& entry, |
no test coverage detected