* The modified cells, if any, are systematically declared as NORM_POLYGON or NORM_QPOLYG depending on the initial quadraticness of geometric type.
*
* This method expects that \b this has a meshDim equal 2 and spaceDim equal to 2 too.
- * This method expects that all nodes in \a this are not closer than \a eps.
- * If it is not the case you can invoke MEDCouplingUMesh::mergeNodes before calling this method.
+ * This method will also merge any duplicate node in the mesh.
*
* \param [in] eps the relative error to detect merged edges.
* \return DataArrayInt * - The list of cellIds in \a this that have been subdivided. If empty, nothing changed in \a this (as if it were a const method). The array is a newly allocated array
checkConsistencyLight();
if(getSpaceDimension()!=2 || getMeshDimension()!=2)
throw INTERP_KERNEL::Exception("MEDCouplingUMesh::conformize2D : This method only works for meshes with spaceDim=2 and meshDim=2 !");
+
+ // conformizeXD() doesn't like meshes with duplicate nodes. Do the merge here.
+ {
+ bool dnu;
+ int dnu2;
+ MCAuto<DataArrayInt> dnu3(mergeNodes(eps, dnu, dnu2));
+ }
+
MCAuto<DataArrayInt> desc1(DataArrayInt::New()),descIndx1(DataArrayInt::New()),revDesc1(DataArrayInt::New()),revDescIndx1(DataArrayInt::New());
MCAuto<MEDCouplingUMesh> mDesc(buildDescendingConnectivity(desc1,descIndx1,revDesc1,revDescIndx1));
const int *c(mDesc->getNodalConnectivity()->begin()),*ci(mDesc->getNodalConnectivityIndex()->begin()),*rd(revDesc1->begin()),*rdi(revDescIndx1->begin());
/*!
+ *
+ *
+ *
* \b WARNING this method is \b potentially \b non \b const (if returned array is not empty).
* \b WARNING this method lead to have a non geometric type sorted mesh (for MED file users) !
- * This method performs a conformization of \b this.
*
- * Only polyhedron cells are supported. You can call convertAllToPoly()
+ * This method performs a conformization of \b this.
+ * Only polyhedron cells are supported. You can call convertAllToPoly(). For the moment, only partition-like non conformities are handled, that is to say
+ * that many small coplanar faces of a given polyhedron must exactly fit into a single big face of an adjacent polyhedron.
+ * This method will also merge duplicate nodes in the mesh.
*
* This method expects that \b this has a meshDim equal 3 and spaceDim equal to 3 too.
- * This method expects that all nodes in \a this are not closer than \a eps.
- * If it is not the case you can invoke MEDCouplingUMesh::mergeNodes before calling this method.
*
* \param [in] eps the relative error to detect merged edges.
* \return DataArrayInt * - The list of cellIds in \a this that have been subdivided. If empty, nothing changed in \a this (as if it were a const method). The array is a newly allocated array
if(_types.size() != 1 || *(_types.begin()) != INTERP_KERNEL::NORM_POLYHED)
throw INTERP_KERNEL::Exception("MEDCouplingUMesh::conformize3D : This method only works for polyhedrons! Call convertAllToPoly first.");
+ // conformizeXD() doesn't like meshes with duplicate nodes. Do the merge here.
+ {
+ bool dnu;
+ int dnu2;
+ MCAuto<DataArrayInt> dnu3(mergeNodes(eps, dnu, dnu2));
+ }
+
MCAuto<MEDCouplingSkyLineArray> connSla(MEDCouplingSkyLineArray::BuildFromPolyhedronConn(getNodalConnectivity(), getNodalConnectivityIndex()));
const double * coo(_coords->begin());
MCAuto<DataArrayInt> ret(DataArrayInt::New());