------------------------------------------------------------------------------ Create field data lists and cell/point array selection lists
| 6029 | //------------------------------------------------------------------------------ |
| 6030 | // Create field data lists and cell/point array selection lists |
| 6031 | int vtkOpenFOAMReaderPrivate::MakeMetaDataAtTimeStep(vtkStringArray* cellSelectionNames, |
| 6032 | vtkStringArray* pointSelectionNames, vtkStringArray* lagrangianSelectionNames, |
| 6033 | const bool listNextTimeStep, const bool skipComputingMetaData) |
| 6034 | { |
| 6035 | vtkFoamDebug(<< "MakeMetaDataAtTimeStep (" << this->RegionName << "/" << this->ProcessorName |
| 6036 | << ")\n"); |
| 6037 | |
| 6038 | if (!this->HasPolyMesh()) |
| 6039 | { |
| 6040 | // Ignore a region without a mesh, but will normally be precluded earlier |
| 6041 | vtkWarningMacro("Called MakeMetaDataAtTimeStep without a mesh."); |
| 6042 | return 1; |
| 6043 | } |
| 6044 | |
| 6045 | // Track topology change |
| 6046 | const bool topoChanged = (this->TopologyTimeIndex < -1 || |
| 6047 | (this->TopologyTimeIndex != this->PolyMeshTimeIndexFaces[this->TimeStep])); |
| 6048 | this->TopologyTimeIndex = this->PolyMeshTimeIndexFaces[this->TimeStep]; |
| 6049 | |
| 6050 | // Change in topology or selection, may need to update boundaries |
| 6051 | { |
| 6052 | auto& patches = this->BoundaryDict; |
| 6053 | |
| 6054 | // User selection changed |
| 6055 | const bool selectChanged = topoChanged || |
| 6056 | (this->Parent->PatchDataArraySelection->GetMTime() != |
| 6057 | this->Parent->GetPatchSelectionMTimeOld()); |
| 6058 | |
| 6059 | bool addInternalSelection = false; |
| 6060 | |
| 6061 | // Read contents of polyMesh/boundary to update patch definitions |
| 6062 | if (topoChanged) |
| 6063 | { |
| 6064 | patches.clearAll(); |
| 6065 | const bool isSubRegion = !this->RegionName.empty(); |
| 6066 | auto boundaryEntriesPtr(this->GetPolyMeshFile("boundary", isSubRegion)); |
| 6067 | |
| 6068 | if (boundaryEntriesPtr) |
| 6069 | { |
| 6070 | if (!patches.update(*boundaryEntriesPtr)) |
| 6071 | { |
| 6072 | vtkErrorMacro(<< patches.error()); |
| 6073 | return 0; |
| 6074 | } |
| 6075 | |
| 6076 | // On topology change, add the internal mesh by default |
| 6077 | addInternalSelection = true; |
| 6078 | } |
| 6079 | else if (isSubRegion) |
| 6080 | { |
| 6081 | // Could be missing polyMesh/boundary for sub-region |
| 6082 | return 0; |
| 6083 | } |
| 6084 | } |
| 6085 | |
| 6086 | // The internal mesh - set/check status |
| 6087 | if (selectChanged) |
| 6088 | { |
no test coverage detected