+/*!
+ * This method renumbers only nodal connectivity in \a this. The renumbering is only an offset applied. So this method is a specialization of
+ * \a renumberNodesInConn. \b WARNING, this method does not check that the resulting node ids in the nodal connectivity is in a valid range !
+ *
+ * \param [in] offset - specifies the offset to be applied on each element of connectivity.
+ *
+ * \sa renumberNodesInConn
+ */
+void MEDCoupling1DGTUMesh::renumberNodesWithOffsetInConn(int offset)
+{
+ getNumberOfCells();//only to check that all is well defined.
+ //
+ int nbOfTuples(_conn->getNumberOfTuples());
+ int *pt(_conn->getPointer());
+ for(int i=0;i<nbOfTuples;i++,pt++)
+ {
+ if(*pt==-1) continue;
+ *pt+=offset;
+ }
+ //
+ updateTime();
+}
+
+/*!
+ * Same than renumberNodesInConn(const int *) except that here the format of old-to-new traducer is using map instead
+ * of array. This method is dedicated for renumbering from a big set of nodes the a tiny set of nodes which is the case during extraction
+ * of a big mesh.
+ */
+void MEDCoupling1DGTUMesh::renumberNodesInConn(const INTERP_KERNEL::HashMap<int,int>& newNodeNumbersO2N)
+{
+ getNumberOfCells();//only to check that all is well defined.
+ //
+ int nbElemsIn(getNumberOfNodes()),nbOfTuples(_conn->getNumberOfTuples());
+ int *pt(_conn->getPointer());
+ for(int i=0;i<nbOfTuples;i++,pt++)
+ {
+ if(*pt==-1) continue;
+ if(*pt>=0 && *pt<nbElemsIn)
+ {
+ INTERP_KERNEL::HashMap<int,int>::const_iterator it(newNodeNumbersO2N.find(*pt));
+ if(it!=newNodeNumbersO2N.end())
+ *pt=(*it).second;
+ else
+ {
+ std::ostringstream oss; oss << "MEDCoupling1DGTUMesh::renumberNodesInConn : At pos #" << i << " of connectivity, node id is " << *pt << ". Not in keys of input map !";
+ throw INTERP_KERNEL::Exception(oss.str().c_str());
+ }
+ }
+ else
+ {
+ std::ostringstream oss; oss << "MEDCoupling1DGTUMesh::renumberNodesInConn : error on tuple #" << i << " value is " << *pt << " and indirectionnal array as a size equal to " << nbElemsIn;
+ throw INTERP_KERNEL::Exception(oss.str().c_str());
+ }
+ }
+ //
+ updateTime();
+}
+