Salome HOME
Suppress useless swiged methods
[modules/med.git] / src / MEDLoader / SauvWriter.cxx
index 4a2105620d7307a4a8198c15a0a68402745806c2..697847bb6ac05c182b0ec5e941e455053ee61676 100644 (file)
@@ -223,6 +223,16 @@ SauvWriter* SauvWriter::New()
   return new SauvWriter;
 }
 
+std::size_t SauvWriter::getHeapMemorySizeWithoutChildren() const
+{
+  return 0;
+}
+
+std::vector<const BigMemoryObject *> SauvWriter::getDirectChildren() const
+{
+  return std::vector<const BigMemoryObject *>();
+}
+
 //================================================================================
 /*!
  * \brief Fills own DS by MEDFileData
@@ -568,7 +578,16 @@ void SauvWriter::makeProfileIDs( SubMesh*                          sm,
       vector<const DataArrayInt *> idsPerType( 1, profile );
       MEDCouplingAutoRefCountObjectPtr<DataArrayInt>
         resIDs = uMesh->checkTypeConsistencyAndContig( code, idsPerType );
-      ids.assign( resIDs->begin(), resIDs->end() );
+      if (( const DataArrayInt *) resIDs )
+      {
+        ids.assign( resIDs->begin(), resIDs->end() );
+      }
+      else // mesh includes only one type
+      {
+        int nbE = code[1];
+        for ( ids.resize( nbE ); nbE; --nbE )
+          ids[ nbE-1 ] = nbE-1;
+      }
     }
 }