From 5fb884c16a31c6abb79e985f3ef2e5a5fdf3626f Mon Sep 17 00:00:00 2001 From: ageay Date: Fri, 29 Nov 2013 07:17:59 +0000 Subject: [PATCH] Optimization of reading process to reduce at most copies. Externalize famIds for new MEDReader to perform filtering on output datasets. --- src/MEDLoader/MEDFileFieldOverView.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/MEDLoader/MEDFileFieldOverView.cxx b/src/MEDLoader/MEDFileFieldOverView.cxx index ebead6485..f219d829d 100644 --- a/src/MEDLoader/MEDFileFieldOverView.cxx +++ b/src/MEDLoader/MEDFileFieldOverView.cxx @@ -602,6 +602,19 @@ MEDUMeshMultiLev::MEDUMeshMultiLev(const MEDFileUMesh *m, const std::vector > numIdsSafe(sz); + std::vector numIds(sz); + bool n(true); + for(std::size_t i=0;iextractNumberFieldOnGeoType(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) -- 2.39.2