Commit afcc762a authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Mesh readers: changed methods readPointData and readCellData to be virtual

Also renamed PVTUReader's readLocalPointData and readLocalCellData to
fit into this hierarchy, hopefully it is clear that they return only
local data.
parent 5a62beed
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -20,7 +20,5 @@ void export_DistributedMeshReaders( py::module & m )
        .def("loadMesh", &PVTUReader::template loadMesh< DistributedMeshOfEdges >)
        .def("loadMesh", &PVTUReader::template loadMesh< DistributedMeshOfTriangles >)
        .def("loadMesh", &PVTUReader::template loadMesh< DistributedMeshOfTetrahedrons >)
        .def("readLocalPointData", &PVTUReader::readLocalPointData)
        .def("readLocalCellData", &PVTUReader::readLocalCellData)
    ;
}
+12 −0
Original line number Diff line number Diff line
@@ -150,6 +150,18 @@ public:
         throw MeshReaderError( "VTKReader", "MeshBuilder failed" );
   }

   virtual VariantVector
   readPointData( std::string arrayName )
   {
      throw Exceptions::NotImplementedError( "readPointData is not implemented in the mesh reader for this specific file format." );
   }

   virtual VariantVector
   readCellData( std::string arrayName )
   {
      throw Exceptions::NotImplementedError( "readPointData is not implemented in the mesh reader for this specific file format." );
   }

   std::string
   getMeshType() const
   {
+4 −4
Original line number Diff line number Diff line
@@ -211,14 +211,14 @@ public:
      mesh.setCommunicationGroup( group );
   }

   VariantVector
   readLocalPointData( std::string arrayName )
   virtual VariantVector
   readPointData( std::string arrayName ) override
   {
      return localReader.readPointData( arrayName );
   }

   VariantVector
   readLocalCellData( std::string arrayName )
   virtual VariantVector
   readCellData( std::string arrayName ) override
   {
      return localReader.readCellData( arrayName );
   }
+4 −4
Original line number Diff line number Diff line
@@ -325,8 +325,8 @@ public:
#endif
   }

   VariantVector
   readPointData( std::string arrayName )
   virtual VariantVector
   readPointData( std::string arrayName ) override
   {
#ifdef HAVE_TINYXML2
      return readPointOrCellData( "PointData", arrayName );
@@ -335,8 +335,8 @@ public:
#endif
   }

   VariantVector
   readCellData( std::string arrayName )
   virtual VariantVector
   readCellData( std::string arrayName ) override
   {
#ifdef HAVE_TINYXML2
      return readPointOrCellData( "CellData", arrayName );