+/*!
+ * \param [out] famIds - Can be null. If not null the instance has to be dealt by the caller (decrRef).
+ * \param [out] isWithoutCopy - When true the returned instance \a famIds if not null is directly those in the data structure.
+ */
+void MEDMeshMultiLev::retrieveFamilyIdsOnNodes(DataArrayInt *& famIds, bool& isWithoutCopy) const
+{
+ const DataArrayInt *fids(_node_fam_ids);
+ if(!fids)
+ { famIds=0; isWithoutCopy=true; return ; }
+ const DataArrayInt *nr(_node_reduction);
+ if(nr)
+ {
+ isWithoutCopy=false;
+ famIds=fids->selectByTupleIdSafe(nr->begin(),nr->end());
+ }
+ else
+ {
+ famIds=const_cast<DataArrayInt *>(fids); famIds->incrRef();
+ isWithoutCopy=_mesh->isObjectInTheProgeny(famIds);
+ }
+}
+
+/*!
+ * \param [out] numIds - Can be null. If not null the instance has to be dealt by the caller (decrRef).
+ * \param [out] isWithoutCopy - When true the returned instance \a numIds if not null is directly those in the data structure.
+ */
+void MEDMeshMultiLev::retrieveNumberIdsOnNodes(DataArrayInt *& numIds, bool& isWithoutCopy) const
+{
+ const DataArrayInt *fids(_node_num_ids);
+ if(!fids)
+ { numIds=0; isWithoutCopy=true; return ; }
+ const DataArrayInt *nr(_node_reduction);
+ if(nr)
+ {
+ isWithoutCopy=false;
+ numIds=fids->selectByTupleIdSafe(nr->begin(),nr->end());
+ }
+ else
+ {
+ numIds=const_cast<DataArrayInt *>(fids); numIds->incrRef();
+ isWithoutCopy=_mesh->isObjectInTheProgeny(numIds);
+ }
+}
+
+/*!
+ * This method returns, if any, a new object containing the global node ids **BUT CONTRARY TO OTHER RETRIEVE METHODS** the returned object is always a NON AGGREGATED object. So the returned object if not null
+ * can be used as this safely.
+ */
+DataArrayInt *MEDMeshMultiLev::retrieveGlobalNodeIdsIfAny() const
+{
+ const MEDFileUMesh *umesh(dynamic_cast<const MEDFileUMesh *>(_mesh));
+ if(!umesh)
+ return 0;
+ const PartDefinition *pd(umesh->getPartDefAtLevel(1));
+ if(!pd)
+ return 0;
+ MCAuto<DataArrayInt> tmp(pd->toDAI());
+ const DataArrayInt *tmpCpp(tmp);
+ if(!tmpCpp)
+ return 0;
+ //
+ const DataArrayInt *nr(_node_reduction);
+ if(nr)
+ return tmp->selectByTupleIdSafe(nr->begin(),nr->end());
+ else
+ return tmp->deepCopy();// Yes a deep copy is needed because this method has to return a non aggregated object !
+}
+
+std::vector< INTERP_KERNEL::NormalizedCellType > MEDMeshMultiLev::getGeoTypes() const
+{
+ return _geo_types;
+}
+
+void MEDMeshMultiLev::setFamilyIdsOnCells(DataArrayInt *famIds)
+{
+ _cell_fam_ids=famIds;
+ if(famIds)
+ famIds->incrRef();
+}
+
+void MEDMeshMultiLev::setNumberIdsOnCells(DataArrayInt *numIds)
+{
+ _cell_num_ids=numIds;
+ if(numIds)
+ numIds->incrRef();
+}
+
+void MEDMeshMultiLev::setFamilyIdsOnNodes(DataArrayInt *famIds)
+{
+ _node_fam_ids=famIds;
+ if(famIds)
+ famIds->incrRef();
+}
+
+void MEDMeshMultiLev::setNumberIdsOnNodes(DataArrayInt *numIds)
+{
+ _node_num_ids=numIds;
+ if(numIds)
+ numIds->incrRef();
+}
+