]> SALOME platform Git repositories - modules/med.git/commitdiff
Salome HOME
Optimization of reading process to reduce at most copies.
authorageay <ageay>
Fri, 29 Nov 2013 07:17:59 +0000 (07:17 +0000)
committerageay <ageay>
Fri, 29 Nov 2013 07:17:59 +0000 (07:17 +0000)
Externalize famIds for new MEDReader to perform filtering on output datasets.

src/MEDLoader/MEDFileFieldOverView.cxx

index ebead6485adc999912ee034d81446d047e7bcdd2..f219d829d022c1a794ac89645c5ce08c0f9542d5 100644 (file)
@@ -602,6 +602,19 @@ MEDUMeshMultiLev::MEDUMeshMultiLev(const MEDFileUMesh *m, const std::vector<INTE
     }
   if(f)
     _cell_fam_ids=DataArrayInt::Aggregate(famIds);
+  _cell_num_ids_nocpy=false;
+  std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayInt> > numIdsSafe(sz);
+  std::vector<const DataArrayInt *> numIds(sz);
+  bool n(true);
+  for(std::size_t i=0;i<sz;i++)
+    {
+      numIdsSafe[i]=m->extractNumberFieldOnGeoType(gts[i]);
+      numIds[i]=numIdsSafe[i];
+      if(!numIds[i])
+        n=false;
+    }
+  if(n)
+    _cell_num_ids=DataArrayInt::Aggregate(numIds);
 }
 
 void MEDUMeshMultiLev::selectPartOfNodes(const DataArrayInt *pflNodes)