return fabs(p1.first-p2.first)<QUADRATIC_PLANAR::_precision;
}
+/**
+ * This method takes in input nodes in \a subNodes (using \a coo)
+ *
+ * \param [in,out] subNodes to be sorted
+ * \return true if a reordering was necessary false if not.
+ */
+bool Edge::sortSubNodesAbs(const double *coo, std::vector<int>& subNodes)
+{
+ Bounds b;
+ b.prepareForAggregation();
+ b.aggregate(getBounds());
+ double xBary,yBary;
+ double dimChar(b.getCaracteristicDim());
+ b.getBarycenter(xBary,yBary);
+ applySimilarity(xBary,yBary,dimChar);
+ _start->applySimilarity(xBary,yBary,dimChar);
+ _end->applySimilarity(xBary,yBary,dimChar);
+ //
+ std::size_t sz(subNodes.size()),i(0);
+ std::vector< std::pair<double,Node *> > an2(sz);
+ std::map<Node *, int> m;
+ for(std::vector<int>::const_iterator it=subNodes.begin();it!=subNodes.end();it++,i++)
+ {
+ Node *n(new Node(coo[2*(*it)],coo[2*(*it)+1]));
+ n->applySimilarity(xBary,yBary,dimChar);
+ m[n]=*it;
+ an2[i]=std::pair<double,Node *>(getCharactValueBtw0And1(*n),n);
+ }
+ std::sort(an2.begin(),an2.end());
+ //
+ bool ret(false);
+ for(i=0;i<sz;i++)
+ {
+ int id(m[an2[i].second]);
+ if(id!=subNodes[i])
+ { subNodes[i]=id; ret=true; }
+ }
+ //
+ for(std::map<INTERP_KERNEL::Node *,int>::const_iterator it2=m.begin();it2!=m.end();it2++)
+ (*it2).first->decrRef();
+ return ret;
+}
+
/**
* Sort nodes so that they all lie consecutively on the edge that has been cut.
*/
virtual double getCurveLength() const = 0;
virtual void getBarycenter(double *bary) const = 0;
virtual void getBarycenterOfZone(double *bary) const = 0;
+ virtual void getMiddleOfPoints(const double *p1, const double *p2, double *mid) const = 0;
//! Retrieves a point that is owning to this, well placed for IN/OUT detection of this. Typically midlle of this is returned.
virtual Node *buildRepresentantOfMySelf() const = 0;
//! Given a magnitude specified by sub-type returns if in or not. See getCharactValue method.
virtual void dumpInXfigFile(std::ostream& stream, bool direction, int resolution, const Bounds& box) const = 0;
bool isEqual(const Edge& other) const;
public:
+ bool sortSubNodesAbs(const double *coo, std::vector<int>& subNodes);
void sortIdsAbs(const std::vector<INTERP_KERNEL::Node *>& addNodes, const std::map<INTERP_KERNEL::Node *, int>& mapp1, const std::map<INTERP_KERNEL::Node *, int>& mapp2, std::vector<int>& edgesThis);
virtual void fillGlobalInfoAbs(bool direction, const std::map<INTERP_KERNEL::Node *,int>& mapThis, const std::map<INTERP_KERNEL::Node *,int>& mapOther, int offset1, int offset2, double fact, double baryX, double baryY,
std::vector<int>& edgesThis, std::vector<double>& addCoo, std::map<INTERP_KERNEL::Node *,int> mapAddCoo) const = 0;
+tmp2*(tmp4-tmp3+(tmp3*tmp3*tmp3-tmp4*tmp4*tmp4)/3.)/2.;
}
+void EdgeArcCircle::getMiddleOfPoints(const double *p1, const double *p2, double *mid) const
+{
+ double dx1((p1[0]-_center[0])/_radius),dy1((p1[1]-_center[1])/_radius),dx2((p2[0]-_center[0])/_radius),dy2((p2[1]-_center[1])/_radius);
+ double angle1(GetAbsoluteAngleOfNormalizedVect(dx1,dy1)),angle2(GetAbsoluteAngleOfNormalizedVect(dx2,dy2));
+ //
+ double myDelta1(angle1-_angle0),myDelta2(angle2-_angle0);
+ if(_angle>0.)
+ { myDelta1=myDelta1>=0.?myDelta1:myDelta1+2.*M_PI; myDelta2=myDelta2>=0.?myDelta2:myDelta2+2.*M_PI; }
+ else
+ { myDelta1=myDelta1<=0.?myDelta1:myDelta1-2.*M_PI; myDelta2=myDelta2<=0.?myDelta2:myDelta2-2.*M_PI; }
+ ////
+ mid[0]=_center[0]+_radius*cos(_angle0+(myDelta1+myDelta2)/2.);
+ mid[1]=_center[1]+_radius*sin(_angle0+(myDelta1+myDelta2)/2.);
+}
+
/*!
* Characteristic value used is angle in ]_Pi;Pi[ from axe 0x.
*/
double getCurveLength() const;
void getBarycenter(double *bary) const;
void getBarycenterOfZone(double *bary) const;
+ void getMiddleOfPoints(const double *p1, const double *p2, double *mid) const;
bool isIn(double characterVal) const;
Node *buildRepresentantOfMySelf() const;
bool isLower(double val1, double val2) const;
bary[1]=(x1-x2)*(y1*(y1+y2)+y2*y2)/6.;
}
+/*!
+ * Here \a this is not used (contrary to EdgeArcCircle class).
+ */
+void EdgeLin::getMiddleOfPoints(const double *p1, const double *p2, double *mid) const
+{
+ mid[0]=(p1[0]+p2[0])/2.;
+ mid[1]=(p1[1]+p2[1])/2.;
+}
+
double EdgeLin::getCurveLength() const
{
double x=(*_start)[0]-(*_end)[0];
double getCurveLength() const;
void getBarycenter(double *bary) const;
void getBarycenterOfZone(double *bary) const;
+ void getMiddleOfPoints(const double *p1, const double *p2, double *mid) const;
bool isIn(double characterVal) const;
Node *buildRepresentantOfMySelf() const;
double getCharactValue(const Node& node) const;
MEDCOUPLING_EXPORT virtual void copyTinyStringsFrom(const MEDCouplingField *other);
MEDCOUPLING_EXPORT void setMesh(const ParaMEDMEM::MEDCouplingMesh *mesh);
MEDCOUPLING_EXPORT const ParaMEDMEM::MEDCouplingMesh *getMesh() const { return _mesh; }
+ MEDCOUPLING_EXPORT ParaMEDMEM::MEDCouplingMesh *getMesh() { return const_cast<ParaMEDMEM::MEDCouplingMesh *>(_mesh); }
MEDCOUPLING_EXPORT void setName(const std::string& name) { _name=name; }
MEDCOUPLING_EXPORT std::string getDescription() const { return _desc; }
MEDCOUPLING_EXPORT void setDescription(const std::string& desc) { _desc=desc; }
renumberCellsWithoutMesh(cellCor->getConstPointer(),false);
if(nodeCor)
renumberNodesWithoutMesh(nodeCor->getConstPointer(),nodeCor->getMaxValueInArray()+1,eps);
- setMesh(const_cast<MEDCouplingMesh *>(other));
+ setMesh(other);
}
/*!
else
r=s1;
}
- DataArrayInt *ret=DataArrayInt::New();
+ DataArrayInt *ret(DataArrayInt::New());
ret->alloc((int)r.size(),1);
std::copy(r.begin(),r.end(),ret->getPointer());
return ret;
}
+/*!
+ * This method allows to put a vector of vector of integer into a more compact data stucture (skyline).
+ * This method is not available into python because no available optimized data structure available to map std::vector< std::vector<int> >.
+ *
+ * \param [in] v the input data structure to be translate into skyline format.
+ * \param [out] data the first element of the skyline format. The user is expected to deal with newly allocated array.
+ * \param [out] dataIndex the second element of the skyline format.
+ */
+void DataArrayInt::PutIntoToSkylineFrmt(const std::vector< std::vector<int> >& v, DataArrayInt *& data, DataArrayInt *& dataIndex)
+{
+ int sz((int)v.size());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret0(DataArrayInt::New()),ret1(DataArrayInt::New());
+ ret1->alloc(sz+1,1);
+ int *pt(ret1->getPointer()); *pt=0;
+ for(int i=0;i<sz;i++,pt++)
+ pt[1]=pt[0]+(int)v[i].size();
+ ret0->alloc(ret1->back(),1);
+ pt=ret0->getPointer();
+ for(int i=0;i<sz;i++)
+ pt=std::copy(v[i].begin(),v[i].end(),pt);
+ data=ret0.retn(); dataIndex=ret1.retn();
+}
+
/*!
* Returns a new DataArrayInt which contains a complement of elements of \a this
* one-dimensional array. I.e. the result array contains all elements from the range [0,
MEDCOUPLING_EXPORT static DataArrayInt *MakePartition(const std::vector<const DataArrayInt *>& groups, int newNb, std::vector< std::vector<int> >& fidsOfGroups);
MEDCOUPLING_EXPORT static DataArrayInt *BuildUnion(const std::vector<const DataArrayInt *>& arr);
MEDCOUPLING_EXPORT static DataArrayInt *BuildIntersection(const std::vector<const DataArrayInt *>& arr);
+ MEDCOUPLING_EXPORT static void PutIntoToSkylineFrmt(const std::vector< std::vector<int> >& v, DataArrayInt *& data, DataArrayInt *& dataIndex);
MEDCOUPLING_EXPORT DataArrayInt *buildComplement(int nbOfElement) const;
MEDCOUPLING_EXPORT DataArrayInt *buildSubstraction(const DataArrayInt *other) const;
MEDCOUPLING_EXPORT DataArrayInt *buildSubstractionOptimized(const DataArrayInt *other) const;
INTERP_KERNEL::NormalizedCellType getTypeOfElement(int) const { return (INTERP_KERNEL::NormalizedCellType)0; }
// end
};
+
+ /*!
+ * Warning the nodes in \a m should be decrRefed ! To avoid that Node * pointer be replaced by another instance.
+ */
+ INTERP_KERNEL::Edge *MEDCouplingUMeshBuildQPFromEdge2(INTERP_KERNEL::NormalizedCellType typ, const int *bg, const double *coords2D, std::map<INTERP_KERNEL::Node *,int>& m)
+ {
+ INTERP_KERNEL::Edge *ret=0;
+ INTERP_KERNEL::Node *n0(new INTERP_KERNEL::Node(coords2D[2*bg[0]],coords2D[2*bg[0]+1])),*n1(new INTERP_KERNEL::Node(coords2D[2*bg[1]],coords2D[2*bg[1]+1]));
+ m[n0]=bg[0]; m[n1]=bg[1];
+ switch(typ)
+ {
+ case INTERP_KERNEL::NORM_SEG2:
+ {
+ ret=new INTERP_KERNEL::EdgeLin(n0,n1);
+ break;
+ }
+ case INTERP_KERNEL::NORM_SEG3:
+ {
+ INTERP_KERNEL::Node *n2(new INTERP_KERNEL::Node(coords2D[2*bg[2]],coords2D[2*bg[2]+1])); m[n2]=bg[2];
+ INTERP_KERNEL::EdgeLin *e1(new INTERP_KERNEL::EdgeLin(n0,n2)),*e2(new INTERP_KERNEL::EdgeLin(n2,n1));
+ INTERP_KERNEL::SegSegIntersector inters(*e1,*e2);
+ // is the SEG3 degenerated, and thus can be reduced to a SEG2?
+ bool colinearity(inters.areColinears());
+ delete e1; delete e2;
+ if(colinearity)
+ { ret=new INTERP_KERNEL::EdgeLin(n0,n1); }
+ else
+ { ret=new INTERP_KERNEL::EdgeArcCircle(n0,n2,n1); }
+ break;
+ }
+ default:
+ throw INTERP_KERNEL::Exception("MEDCouplingUMeshBuildQPFromEdge2 : Expecting a mesh with spaceDim==2 and meshDim==1 !");
+ }
+ return ret;
+ }
INTERP_KERNEL::Edge *MEDCouplingUMeshBuildQPFromEdge(INTERP_KERNEL::NormalizedCellType typ, std::map<int, std::pair<INTERP_KERNEL::Node *,bool> >& mapp2, const int *bg)
{
}
}
+void IKGeo2DInternalMapper2(INTERP_KERNEL::Node *n, const std::map<INTERP_KERNEL::Node *,int>& m, int forbVal0, int forbVal1, std::vector<int>& isect)
+{
+ std::map<INTERP_KERNEL::Node *,int>::const_iterator it(m.find(n));
+ if(it==m.end())
+ throw INTERP_KERNEL::Exception("Internal error in remapping !");
+ int v((*it).second);
+ if(v==forbVal0 || v==forbVal1)
+ return ;
+ if(std::find(isect.begin(),isect.end(),v)==isect.end())
+ isect.push_back(v);
+}
+
+bool IKGeo2DInternalMapper(const INTERP_KERNEL::ComposedEdge& c, const std::map<INTERP_KERNEL::Node *,int>& m, int forbVal0, int forbVal1, std::vector<int>& isect)
+{
+ int sz(c.size());
+ if(sz<=1)
+ return false;
+ bool presenceOfOn(false);
+ for(int i=0;i<sz;i++)
+ {
+ INTERP_KERNEL::ElementaryEdge *e(c[i]);
+ if(e->getLoc()!=INTERP_KERNEL::FULL_ON_1)
+ continue ;
+ IKGeo2DInternalMapper2(e->getStartNode(),m,forbVal0,forbVal1,isect);
+ IKGeo2DInternalMapper2(e->getEndNode(),m,forbVal0,forbVal1,isect);
+ }
+ return presenceOfOn;
+}
+
+/**
+ * This method split some of edges of 2D cells in \a this. The edges to be split are specified in \a subNodesInSeg and in \a subNodesInSegI using index storage mode.
+ * To do the work this method can optionnaly needs information about middle of subedges for quadratic cases if a minimal creation of new nodes is wanted.
+ * So this method try to reduce at most the number of new nodes. The only case that can lead this method to add nodes if a SEG3 is split without information of middle.
+ * \b WARNING : is returned value is different from 0 a call to MEDCouplingUMesh::mergeNodes is necessary to avoid to have a non conform mesh.
+ *
+ * \return int - the number of new nodes created (in most of cases 0).
+ *
+ * \throw If \a this is not coherent.
+ * \throw If \a this has not spaceDim equal to 2.
+ * \throw If \a this has not meshDim equal to 2.
+ * \throw If some subcells needed to be split are orphan.
+ * \sa MEDCouplingUMesh::conformize2D
+ */
+int MEDCouplingUMesh::split2DCells(const DataArrayInt *desc, const DataArrayInt *descI, const DataArrayInt *subNodesInSeg, const DataArrayInt *subNodesInSegI, const DataArrayInt *midOpt, const DataArrayInt *midOptI)
+{
+ if(!desc || !descI || !subNodesInSeg || !subNodesInSegI)
+ throw INTERP_KERNEL::Exception("MEDCouplingUMesh::split2DCells : the 4 first arrays must be not null !");
+ desc->checkAllocated(); descI->checkAllocated(); subNodesInSeg->checkAllocated(); subNodesInSegI->checkAllocated();
+ if(getSpaceDimension()!=2 || getMeshDimension()!=2)
+ throw INTERP_KERNEL::Exception("MEDCouplingUMesh::split2DCells : This method only works for meshes with spaceDim=2 and meshDim=2 !");
+ if(midOpt==0 && midOptI==0)
+ {
+ split2DCellsLinear(desc,descI,subNodesInSeg,subNodesInSegI);
+ return 0;
+ }
+ else if(midOpt!=0 && midOptI!=0)
+ return split2DCellsQuadratic(desc,descI,subNodesInSeg,subNodesInSegI,midOpt,midOptI);
+ else
+ throw INTERP_KERNEL::Exception("MEDCouplingUMesh::split2DCells : middle parameters must be set to null for all or not null for all.");
+}
+
+/*!
+ * \b WARNING this method is \b potentially \b non \b const (if returned array is 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. So if a edge in \a this can be split into entire edges in \a this this method
+ * will suppress such edges to use sub edges in \a this. So this method does not add nodes in \a this if merged edges have same nature each other (Linear,Quadratic).
+ * Whatever the returned value, this method does not alter the order of cells in \a this neither the orientation of cells.
+ * The modified cells if any are systematically declared as NORM_POLYGON or NORM_QPOLYG depending on the
+ *
+ * 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.
+ *
+ * \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
+ * that the user is expected to deal with.
+ *
+ * \throw If \a this is not coherent.
+ * \throw If \a this has not spaceDim equal to 2.
+ * \throw If \a this has not meshDim equal to 2.
+ * \sa MEDCouplingUMesh::mergeNodes, MEDCouplingUMesh::split2DCells
+ */
+DataArrayInt *MEDCouplingUMesh::conformize2D(double eps)
+{
+ static const int SPACEDIM=2;
+ checkCoherency();
+ if(getSpaceDimension()!=2 || getMeshDimension()!=2)
+ throw INTERP_KERNEL::Exception("MEDCouplingUMesh::conformize2D : This method only works for meshes with spaceDim=2 and meshDim=2 !");
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> desc1(DataArrayInt::New()),descIndx1(DataArrayInt::New()),revDesc1(DataArrayInt::New()),revDescIndx1(DataArrayInt::New());
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> mDesc(buildDescendingConnectivity(desc1,descIndx1,revDesc1,revDescIndx1));
+ const int *c(mDesc->getNodalConnectivity()->getConstPointer()),*ci(mDesc->getNodalConnectivityIndex()->getConstPointer()),*rd(revDesc1->getConstPointer()),*rdi(revDescIndx1->getConstPointer());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> bboxArr(mDesc->getBoundingBoxForBBTree());
+ const double *bbox(bboxArr->begin()),*coords(getCoords()->begin());
+ int nCell(getNumberOfCells()),nDescCell(mDesc->getNumberOfCells());
+ std::vector< std::vector<int> > intersectEdge(nDescCell),overlapEdge(nDescCell);
+ std::vector<double> addCoo;
+ BBTree<SPACEDIM,int> myTree(bbox,0,0,nDescCell,-eps);
+ INTERP_KERNEL::QUADRATIC_PLANAR::_precision=eps;
+ INTERP_KERNEL::QUADRATIC_PLANAR::_arc_detection_precision=eps;
+ for(int i=0;i<nDescCell;i++)
+ {
+ std::vector<int> candidates;
+ myTree.getIntersectingElems(bbox+i*2*SPACEDIM,candidates);
+ for(std::vector<int>::const_iterator it=candidates.begin();it!=candidates.end();it++)
+ if(*it>i)
+ {
+ std::map<INTERP_KERNEL::Node *,int> m;
+ INTERP_KERNEL::Edge *e1(MEDCouplingUMeshBuildQPFromEdge2((INTERP_KERNEL::NormalizedCellType)c[ci[i]],c+ci[i]+1,coords,m)),
+ *e2(MEDCouplingUMeshBuildQPFromEdge2((INTERP_KERNEL::NormalizedCellType)c[ci[*it]],c+ci[*it]+1,coords,m));
+ INTERP_KERNEL::MergePoints merge;
+ INTERP_KERNEL::QuadraticPolygon c1,c2;
+ e1->intersectWith(e2,merge,c1,c2);
+ e1->decrRef(); e2->decrRef();
+ if(IKGeo2DInternalMapper(c1,m,c[ci[i]+1],c[ci[i]+2],intersectEdge[i]))
+ overlapEdge[i].push_back(*it);
+ if(IKGeo2DInternalMapper(c2,m,c[ci[*it]+1],c[ci[*it]+2],intersectEdge[*it]))
+ overlapEdge[*it].push_back(i);
+ for(std::map<INTERP_KERNEL::Node *,int>::const_iterator it2=m.begin();it2!=m.end();it2++)
+ (*it2).first->decrRef();
+ }
+ }
+ // splitting done. sort intersect point in intersectEdge.
+ std::vector< std::vector<int> > middle(nDescCell);
+ int nbOf2DCellsToBeSplit(0);
+ bool middleNeedsToBeUsed(false);
+ std::vector<bool> cells2DToTreat(nDescCell,false);
+ for(int i=0;i<nDescCell;i++)
+ {
+ std::vector<int>& isect(intersectEdge[i]);
+ int sz((int)isect.size());
+ if(sz>1)
+ {
+ std::map<INTERP_KERNEL::Node *,int> m;
+ INTERP_KERNEL::Edge *e(MEDCouplingUMeshBuildQPFromEdge2((INTERP_KERNEL::NormalizedCellType)c[ci[i]],c+ci[i]+1,coords,m));
+ e->sortSubNodesAbs(coords,isect);
+ e->decrRef();
+ for(std::map<INTERP_KERNEL::Node *,int>::const_iterator it2=m.begin();it2!=m.end();it2++)
+ (*it2).first->decrRef();
+ }
+ if(sz!=0)
+ {
+ int idx0(rdi[i]),idx1(rdi[i+1]);
+ if(idx1-idx0!=1)
+ throw INTERP_KERNEL::Exception("MEDCouplingUMesh::conformize2D : internal error #0 !");
+ if(!cells2DToTreat[rd[idx0]])
+ {
+ cells2DToTreat[rd[idx0]]=true;
+ nbOf2DCellsToBeSplit++;
+ }
+ // try to reuse at most eventual 'middle' of SEG3
+ std::vector<int>& mid(middle[i]);
+ mid.resize(sz+1,-1);
+ if((INTERP_KERNEL::NormalizedCellType)c[ci[i]]==INTERP_KERNEL::NORM_SEG3)
+ {
+ middleNeedsToBeUsed=true;
+ const std::vector<int>& candidates(overlapEdge[i]);
+ std::vector<int> trueCandidates;
+ for(std::vector<int>::const_iterator itc=candidates.begin();itc!=candidates.end();itc++)
+ if((INTERP_KERNEL::NormalizedCellType)c[ci[*itc]]==INTERP_KERNEL::NORM_SEG3)
+ trueCandidates.push_back(*itc);
+ int stNode(c[ci[i]+1]),endNode(isect[0]);
+ for(int j=0;j<sz+1;j++)
+ {
+ for(std::vector<int>::const_iterator itc=trueCandidates.begin();itc!=trueCandidates.end();itc++)
+ {
+ int tmpSt(c[ci[*itc]+1]),tmpEnd(c[ci[*itc]+2]);
+ if((tmpSt==stNode && tmpEnd==endNode) || (tmpSt==endNode && tmpEnd==stNode))
+ { mid[j]=*itc; break; }
+ }
+ stNode=endNode;
+ endNode=j<sz-1?isect[j+1]:c[ci[i]+2];
+ }
+ }
+ }
+ }
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret(DataArrayInt::New()),notRet(DataArrayInt::New()); ret->alloc(nbOf2DCellsToBeSplit,1);
+ if(nbOf2DCellsToBeSplit==0)
+ return ret.retn();
+ //
+ int *retPtr(ret->getPointer());
+ for(int i=0;i<nCell;i++)
+ if(cells2DToTreat[i])
+ *retPtr++=i;
+ //
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> mSafe,nSafe,oSafe,pSafe,qSafe,rSafe;
+ DataArrayInt *m(0),*n(0),*o(0),*p(0),*q(0),*r(0);
+ MEDCouplingUMesh::ExtractFromIndexedArrays(ret->begin(),ret->end(),desc1,descIndx1,m,n); mSafe=m; nSafe=n;
+ DataArrayInt::PutIntoToSkylineFrmt(intersectEdge,o,p); oSafe=o; pSafe=p;
+ if(middleNeedsToBeUsed)
+ { DataArrayInt::PutIntoToSkylineFrmt(middle,q,r); qSafe=q; rSafe=r; }
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> modif(static_cast<MEDCouplingUMesh *>(buildPartOfMySelf(ret->begin(),ret->end(),true)));
+ int nbOfNodesCreated(modif->split2DCells(mSafe,nSafe,oSafe,pSafe,qSafe,rSafe));
+ setCoords(modif->getCoords());//if nbOfNodesCreated==0 modif and this have the same coordinates pointer so this line has no effect. But for quadratic cases this line is important.
+ setPartOfMySelf(ret->begin(),ret->end(),*modif);
+ {
+ bool areNodesMerged; int newNbOfNodes;
+ if(nbOfNodesCreated!=0)
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> tmp(mergeNodes(eps,areNodesMerged,newNbOfNodes));
+ }
+ return ret.retn();
+}
+
/*!
* This method is private and is the first step of Partition of 2D mesh (spaceDim==2 and meshDim==2).
* It builds the descending connectivity of the two meshes, and then using a binary tree
return ret0.retn();
}
+/*!
+ * It is the linear part of MEDCouplingUMesh::split2DCells. Here no additionnal nodes will be added in \b this. So coordinates pointer remain unchanged (is not even touch).
+ *
+ * \sa MEDCouplingUMesh::split2DCells
+ */
+void MEDCouplingUMesh::split2DCellsLinear(const DataArrayInt *desc, const DataArrayInt *descI, const DataArrayInt *subNodesInSeg, const DataArrayInt *subNodesInSegI)
+{
+ checkConnectivityFullyDefined();
+ int ncells(getNumberOfCells()),lgthToReach(getMeshLength()+subNodesInSeg->getNumberOfTuples());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> c(DataArrayInt::New()); c->alloc((std::size_t)lgthToReach);
+ const int *subPtr(subNodesInSeg->begin()),*subIPtr(subNodesInSegI->begin()),*descPtr(desc->begin()),*descIPtr(descI->begin()),*oldConn(getNodalConnectivity()->begin());
+ int *cPtr(c->getPointer()),*ciPtr(getNodalConnectivityIndex()->getPointer());
+ int prevPosOfCi(ciPtr[0]);
+ for(int i=0;i<ncells;i++,ciPtr++,descIPtr++)
+ {
+ int offset(descIPtr[0]),sz(descIPtr[1]-descIPtr[0]),deltaSz(0);
+ *cPtr++=(int)INTERP_KERNEL::NORM_POLYGON; *cPtr++=oldConn[prevPosOfCi+1];
+ for(int j=0;j<sz;j++)
+ {
+ int offset2(subIPtr[descPtr[offset+j]]),sz2(subIPtr[descPtr[offset+j]+1]-subIPtr[descPtr[offset+j]]);
+ for(int k=0;k<sz2;k++)
+ *cPtr++=subPtr[offset2+k];
+ if(j!=sz-1)
+ *cPtr++=oldConn[prevPosOfCi+j+2];
+ deltaSz+=sz2;
+ }
+ prevPosOfCi=ciPtr[1];
+ ciPtr[1]=ciPtr[0]+1+sz+deltaSz;//sz==old nb of nodes because (nb of subedges=nb of nodes for polygons)
+ }
+ if(c->end()!=cPtr)
+ throw INTERP_KERNEL::Exception("MEDCouplingUMesh::split2DCellsLinear : Some of edges to be split are orphan !");
+ _nodal_connec->decrRef();
+ _nodal_connec=c.retn(); _types.clear(); _types.insert(INTERP_KERNEL::NORM_POLYGON);
+}
+
+int internalAddPoint(const INTERP_KERNEL::Edge *e, int id, const double *coo, int startId, int endId, DataArrayDouble& addCoo, int& nodesCnter)
+{
+ if(id!=-1)
+ return id;
+ else
+ {
+ int ret(nodesCnter++);
+ double newPt[2];
+ e->getMiddleOfPoints(coo+2*startId,coo+2*endId,newPt);
+ addCoo.insertAtTheEnd(newPt,newPt+2);
+ return ret;
+ }
+}
+
+/*!
+ * It is the quadratic part of MEDCouplingUMesh::split2DCells. Here some additionnal nodes can be added at the end of coordinates array object.
+ *
+ * \return int - the number of new nodes created.
+ * \sa MEDCouplingUMesh::split2DCells
+ */
+int MEDCouplingUMesh::split2DCellsQuadratic(const DataArrayInt *desc, const DataArrayInt *descI, const DataArrayInt *subNodesInSeg, const DataArrayInt *subNodesInSegI, const DataArrayInt *mid, const DataArrayInt *midI)
+{
+ checkCoherency();
+ int ncells(getNumberOfCells()),lgthToReach(getMeshLength()+2*subNodesInSeg->getNumberOfTuples()),nodesCnt(getNumberOfNodes());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> c(DataArrayInt::New()); c->alloc((std::size_t)lgthToReach);
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> addCoo(DataArrayDouble::New()); addCoo->alloc(0,1);
+ const int *subPtr(subNodesInSeg->begin()),*subIPtr(subNodesInSegI->begin()),*descPtr(desc->begin()),*descIPtr(descI->begin()),*oldConn(getNodalConnectivity()->begin());
+ const int *midPtr(mid->begin()),*midIPtr(midI->begin());
+ const double *oldCoordsPtr(getCoords()->begin());
+ int *cPtr(c->getPointer()),*ciPtr(getNodalConnectivityIndex()->getPointer());
+ int prevPosOfCi(ciPtr[0]);
+ for(int i=0;i<ncells;i++,ciPtr++,descIPtr++)
+ {
+ int offset(descIPtr[0]),sz(descIPtr[1]-descIPtr[0]),deltaSz(sz);
+ for(int j=0;j<sz;j++)
+ { int sz2(subIPtr[descPtr[offset+j]+1]-subIPtr[descPtr[offset+j]]); deltaSz+=sz2; }
+ *cPtr++=(int)INTERP_KERNEL::NORM_QPOLYG; cPtr[0]=oldConn[prevPosOfCi+1];
+ for(int j=0;j<sz;j++)//loop over subedges of oldConn
+ {
+ int offset2(subIPtr[descPtr[offset+j]]),sz2(subIPtr[descPtr[offset+j]+1]-subIPtr[descPtr[offset+j]]),offset3(midIPtr[descPtr[offset+j]]);
+ if(sz2==0)
+ {
+ if(j<sz-1)
+ cPtr[1]=oldConn[prevPosOfCi+2+j];
+ cPtr[deltaSz]=oldConn[prevPosOfCi+1+j+sz]; cPtr++;
+ continue;
+ }
+ std::vector<INTERP_KERNEL::Node *> ns(3);
+ ns[0]=new INTERP_KERNEL::Node(oldCoordsPtr[2*oldConn[prevPosOfCi+1+j]],oldCoordsPtr[2*oldConn[prevPosOfCi+1+j]+1]);
+ ns[1]=new INTERP_KERNEL::Node(oldCoordsPtr[2*oldConn[prevPosOfCi+1+(1+j)%sz]],oldCoordsPtr[2*oldConn[prevPosOfCi+1+(1+j)%sz]+1]);
+ ns[2]=new INTERP_KERNEL::Node(oldCoordsPtr[2*oldConn[prevPosOfCi+1+sz+j]],oldCoordsPtr[2*oldConn[prevPosOfCi+1+sz+j]+1]);
+ MEDCouplingAutoRefCountObjectPtr<INTERP_KERNEL::Edge> e(INTERP_KERNEL::QuadraticPolygon::BuildArcCircleEdge(ns));
+ for(int k=0;k<sz2;k++)//loop over subsplit of current subedge
+ {
+ cPtr[1]=subPtr[offset2+k];
+ cPtr[deltaSz]=internalAddPoint(e,midPtr[offset3+k],oldCoordsPtr,cPtr[0],cPtr[1],*addCoo,nodesCnt); cPtr++;
+ }
+ int tmpEnd(oldConn[prevPosOfCi+1+(j+1)%sz]);
+ if(j!=sz-1)
+ { cPtr[1]=tmpEnd; }
+ cPtr[deltaSz]=internalAddPoint(e,midPtr[offset3+sz2],oldCoordsPtr,cPtr[0],tmpEnd,*addCoo,nodesCnt); cPtr++;
+ }
+ prevPosOfCi=ciPtr[1]; cPtr+=deltaSz;
+ ciPtr[1]=ciPtr[0]+1+2*deltaSz;//sz==old nb of nodes because (nb of subedges=nb of nodes for polygons)
+ }
+ if(c->end()!=cPtr)
+ throw INTERP_KERNEL::Exception("MEDCouplingUMesh::split2DCellsQuadratic : Some of edges to be split are orphan !");
+ _nodal_connec->decrRef();
+ _nodal_connec=c.retn(); _types.clear(); _types.insert(INTERP_KERNEL::NORM_QPOLYG);
+ addCoo->rearrange(2);
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> coo(DataArrayDouble::Aggregate(getCoords(),addCoo));//info are copied from getCoords() by using Aggregate
+ setCoords(coo);
+ return addCoo->getNumberOfTuples();
+}
+
MEDCouplingUMeshCellIterator::MEDCouplingUMeshCellIterator(MEDCouplingUMesh *mesh):_mesh(mesh),_cell(new MEDCouplingUMeshCell(mesh)),
_own_cell(true),_cell_id(-1),_nb_cell(0)
{
MEDCOUPLING_EXPORT DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const;
MEDCOUPLING_EXPORT DataArrayDouble *getPartBarycenterAndOwner(const int *begin, const int *end) const;
MEDCOUPLING_EXPORT DataArrayDouble *computePlaneEquationOf3DFaces() const;
+ MEDCOUPLING_EXPORT DataArrayInt *conformize2D(double eps);
+ MEDCOUPLING_EXPORT int split2DCells(const DataArrayInt *desc, const DataArrayInt *descI, const DataArrayInt *subNodesInSeg, const DataArrayInt *subNodesInSegI, const DataArrayInt *midOpt=0, const DataArrayInt *midOptI=0);
MEDCOUPLING_EXPORT static MEDCouplingUMesh *Build0DMeshFromCoords(DataArrayDouble *da);
MEDCOUPLING_EXPORT static MEDCouplingUMesh *MergeUMeshes(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2);
MEDCOUPLING_EXPORT static MEDCouplingUMesh *MergeUMeshes(std::vector<const MEDCouplingUMesh *>& a);
const int *desc, const int *descIndx, std::vector< std::pair<int,int> >& cut3DSurf) throw(INTERP_KERNEL::Exception);
void assemblyForSplitFrom3DSurf(const std::vector< std::pair<int,int> >& cut3DSurf,
const int *desc, const int *descIndx, DataArrayInt *nodalRes, DataArrayInt *nodalResIndx, DataArrayInt *cellIds) const throw(INTERP_KERNEL::Exception);
+ void split2DCellsLinear(const DataArrayInt *desc, const DataArrayInt *descI, const DataArrayInt *subNodesInSeg, const DataArrayInt *subNodesInSegI);
+ int split2DCellsQuadratic(const DataArrayInt *desc, const DataArrayInt *descI, const DataArrayInt *subNodesInSeg, const DataArrayInt *subNodesInSegI, const DataArrayInt *mid, const DataArrayInt *midI);
public:
MEDCOUPLING_EXPORT static DataArrayInt *ComputeRangesFromTypeDistribution(const std::vector<int>& code);
MEDCOUPLING_EXPORT static const int N_MEDMEM_ORDER=24;
self.assertTrue(p.getCoords().isEqual(DataArrayDouble([0.,0.,1.,0.,2.,0.,3.,0.,4.,0.,5.,0.,0.,1.,1.,1.,2.,1.,3.,1.,4.,1.,5.,1.,0.,2.,1.,2.,2.,2.,3.,2.,4.,2.,5.,2.,0.,3.,1.,3.,2.,3.,3.,3.,4.,3.,5.,3.,0.,4.,1.,4.,2.,4.,3.,4.,4.,4.,5.,4.,0.,5.,1.,5.,2.,5.,3.,5.,4.,5.,5.,5.,0.5,0.,0.,0.5,0.5,1.,1.,0.5,1.5,0.,1.5,1.,2.,0.5,2.5,0.,2.5,1.,3.,0.5,3.5,0.,3.5,1.,4.,0.5,4.5,0.,4.5,1.,5.,0.5,1.,1.5,1.5,2.,2.,1.5,2.5,2.,3.,1.5,3.5,2.,4.,1.5,4.5,2.,5.,1.5,0.5,2.,0.,2.5,0.5,3.,1.,2.5,2.,2.5,2.5,3.,3.,2.5,3.5,3.,4.,2.5,4.5,3.,5.,2.5,0.,3.5,0.5,4.,1.,3.5,1.5,3.,1.5,4.,2.,3.5,3.,3.5,3.5,4.,4.,3.5,4.5,4.,5.,3.5,0.,4.5,0.5,5.,1.,4.5,1.5,5.,2.,4.5,2.5,4.,2.5,5.,3.,4.5,4.,4.5,4.5,5.,5.,4.5,0.,1.5,0.5,1.5,1.5,2.5,2.5,3.5,3.5,4.5,3.5,5.0],100,2),1e-13))
pass
+ def testSwig2Conformize2D1(self):
+ eps = 1.0e-8
+ coo = [0.,-0.5,0.,0.,0.5,0.,0.5,-0.5,0.25,
+ -0.1,0.25,0.,0.5,-0.1,0.,0.5,0.5,0.5,0.25,0.4,0.25,0.5,0.5,0.4]
+ conn = [5,5,2,6,4,5,6,3,0,1,5,4,5,10,8,11,9,5,11,2,1,7,10,9]
+ connI = [0,5,12,17,24]
+ m = MEDCouplingUMesh("box",2)
+ cooArr = DataArrayDouble(coo,len(coo)/2,2)
+ m.setCoords(cooArr)
+ m.setConnectivity(DataArrayInt(conn),DataArrayInt(connI))
+ m.mergeNodes(eps)
+ m.checkCoherency()
+ self.assertTrue(m.conformize2D(eps).isEqual(DataArrayInt([3])))
+ self.assertEqual(m.getCoords().getHiddenCppPointer(),cooArr.getHiddenCppPointer()) # check that coordinates remain the same here
+ self.assertTrue(m.getNodalConnectivity().isEqual(DataArrayInt([5,5,2,6,4,5,6,3,0,1,5,4,5,10,8,11,9,5,11,2,5,1,7,10,9])))
+ self.assertTrue(m.getNodalConnectivityIndex().isEqual(DataArrayInt([0,5,12,17,25])))
+ pass
+
+ def testSwig2Conformize2D2(self):
+ eps = 1.0e-8
+ coo=DataArrayDouble([-10,-6,0,-6,0,0,7,0,-10,2,0,2,0,6,7,6,0,8,7,8,-10,12,-4,12,0,12,0,11,7,11,-4,16,0,16,7,16],18,2)
+ conn=DataArrayInt([2,3,7,6, 13,16,17,14, 4,10,12,5, 9,14,13,8, 8,9,7,6, 5,4,0,1, 16,12,11,15])
+ m=MEDCoupling1SGTUMesh("mesh",NORM_QUAD4)
+ m.setCoords(coo)
+ m.setNodalConnectivity(conn)
+ m=m.buildUnstructured()
+ self.assertTrue(m.conformize2D(eps).isEqual(DataArrayInt([0,1,2,5])))
+ self.assertEqual(m.getCoords().getHiddenCppPointer(),coo.getHiddenCppPointer()) # check that coordinates remain the same here
+ self.assertTrue(m.getNodalConnectivity().isEqual(DataArrayInt([5,2,3,7,6,5, 5,13,12,16,17,14, 5,4,10,11,12,13,8,6,5, 4,9,14,13,8, 4,8,9,7,6, 5,5,4,0,1,2, 4,16,12,11,15])))
+ self.assertTrue(m.getNodalConnectivityIndex().isEqual(DataArrayInt([0,6,12,21,26,31,37,42])))
+ pass
+
+ def testSwigSplit2DCells1(self):
+ coo=DataArrayDouble([[0,0],[1,0],[1,1],[0,1],[0.5,0],[1,0.5],[0.5,1],[0.,0.5]])
+ m=MEDCouplingUMesh("mesh",2)
+ m.setCoords(coo)
+ m.allocateCells()
+ m.insertNextCell(NORM_QUAD8,[0,1,2,3,4,5,6,7])
+ _,d,di,_,_=m.buildDescendingConnectivity()
+ subb=DataArrayInt([5])
+ subbi=DataArrayInt([0,0,1,1,1])
+ mid=DataArrayInt([-1,-1])
+ midi=DataArrayInt([0,0,2,2,2])
+ self.assertEqual(2,m.split2DCells(d,di,subb,subbi,mid,midi))
+ self.assertTrue(m.getNodalConnectivity().isEqual(DataArrayInt([32,0,1,5,2,3,4,8,9,6,7])))
+ self.assertTrue(m.getNodalConnectivityIndex().isEqual(DataArrayInt([0,11])))
+ self.assertTrue(m.getCoords().isEqual(DataArrayDouble([[0,0],[1,0],[1,1],[0,1],[0.5,0],[1,0.5],[0.5,1],[0.,0.5],[1.,0.25],[1.,0.75]]),1e-12))
+ pass
+
+ def testSwig2Conformize2D3(self):
+ eps = 1.0e-8
+ coo=DataArrayDouble([-10,-6,0,-6,0,0,7,0,-10,2,0,2,0,6.5,7,6.5,0,8,7,8,-10,12,-4,12,0,12,0,11,7,11,-4,16,0,16,7,16],18,2)
+ conn=DataArrayInt([2,3,7,6, 13,16,17,14, 4,10,12,5, 9,14,13,8, 8,9,7,6, 5,4,0,1, 16,12,11,15])
+ m=MEDCoupling1SGTUMesh("mesh",NORM_QUAD4)
+ m.setCoords(coo)
+ m.setNodalConnectivity(conn)
+ m=m.buildUnstructured()
+ m.convertLinearCellsToQuadratic()
+ self.assertTrue(m.conformize2D(eps).isEqual(DataArrayInt([0,1,2,5])))
+ self.assertTrue(m.getCoords().getHiddenCppPointer()!=coo.getHiddenCppPointer()) # coordinates are not the same here contrary to testSwig2Conformize2D2 ...
+ self.assertTrue(m.getCoords()[:18].isEqual(coo,1e-12)) # but the 18 first nodes are the same
+ pass
+
+ def testSwig2Conformize2D4(self):
+ eps = 1.0e-8
+ coo=DataArrayDouble([-10,-6,0,-6,0,0,7,0,-10,2,0,2,0,6.5,7,6.5,0,8,7,8,-10,12,-4,12,0,12,0,11,7,11,-4,16,0,16,7,16],18,2)
+ conn=DataArrayInt([2,3,7,6, 13,16,17,14, 4,10,12,5, 9,14,13,8, 8,9,7,6, 5,4,0,1, 16,12,11,15])
+ m=MEDCoupling1SGTUMesh("mesh",NORM_QUAD4)
+ m.setCoords(coo)
+ m.setNodalConnectivity(conn)
+ m=m.buildUnstructured()
+ m.convertLinearCellsToQuadratic()
+ self.assertEqual(42,m.getNumberOfNodes())
+ oldCoo=m.getCoords().deepCpy()
+ m.conformize2D(eps)
+ self.assertTrue(m.getCoords()[:42].isEqual(oldCoo,1e-12))
+ self.assertTrue(m.getNodalConnectivity().isEqual(DataArrayInt([32,2,3,7,6,5,18,19,20,42,43,32,13,12,16,17,14,44,38,23,24,25,32,4,10,11,12,13,8,6,5,26,45,39,44,31,34,42,29,8,9,14,13,8,30,25,31,32,8,8,9,7,6,32,33,20,34,32,5,4,0,1,2,29,35,36,46,43,8,16,12,11,15,38,39,40,41])))
+ self.assertTrue(m.getNodalConnectivityIndex().isEqual(DataArrayInt([0,11,22,39,48,57,68,77])))
+ self.assertTrue(m.getCoords().isEqual(DataArrayDouble([[-10.,-6.0],[0.,-6.0],[0.,0.0],[7.,0.0],[-10.,2.0],[0.,2.0],[0.,6.5],[7.,6.5],[0.,8.0],[7.,8.0],[-10.,12.0],[-4.,12.0],[0.,12.0],[0.,11.0],[7.,11.0],[-4.,16.0],[0.,16.0],[7.,16.0],[3.5, 0.0],[7.,3.25],[3.5, 6.5],[0.,3.25],[0.,13.5],[3.5, 16.0],[7.,13.5],[3.5, 11.0],[-10.,7.0],[-5.,12.0],[0.,7.0],[-5.,2.0],[7.,9.5],[0.,9.5],[3.5, 8.0],[7.,7.25],[0.,7.25],[-10.,-2.0],[-5.,-6.0],[0.,-2.0],[0.,14.0],[-2.,12.0],[-4.,14.0],[-2.,16.0],[0.,4.25],[0.,1.0],[0.,11.5],[-7.,12.0],[0.,-3.]]),1e-12))
+ pass
+
+ def testSwig2Conformize2D5(self):
+ eps=1e-8
+ coo=DataArrayDouble([[2,2],[2,-6],[10,-2],[-2,-2],[6,0],[6,-4],[2,7],[2,4.5],[-1.4641016151377544,0],[-1.950753362380551,-1.3742621398390762],[-7,-3],[-0.8284271247461898,-4.82842712474619],[0.26794919243112281,3.5],[0,1.4641016151377548],[-4.4753766811902755,-2.1871310699195381],[-3.9142135623730949,-3.9142135623730949],[-1.8042260651806146,-3.23606797749979]])
+ m=MEDCouplingUMesh("mesh",2)
+ m.allocateCells()
+ m.setCoords(coo)
+ m.insertNextCell(NORM_TRI6,[1,2,0,5,4,3])
+ m.insertNextCell(NORM_TRI6,[8,6,0,12,7,13])
+ m.insertNextCell(NORM_TRI6,[11,9,10,16,14,15])
+ self.assertTrue(m.conformize2D(eps).isEqual(DataArrayInt([0])))
+ self.assertTrue(m.getCoords().isEqual(DataArrayDouble([2.,2.,2.,-6.,10.,-2.,-2.,-2.,6.,0.,6.,-4.,2.,7.,2.,4.5,-1.4641016151377544,0.,-1.950753362380551,-1.3742621398390762,-7.,-3.,-0.8284271247461898,-4.82842712474619,0.2679491924311228,3.5,8.881784197001252e-16,1.4641016151377548,-4.4753766811902755,-2.187131069919538,-3.914213562373095,-3.914213562373095,-1.8042260651806146,-3.236067977499789,-1.7705659643687133,-0.6647725630649153,0.46926627053963865,-5.695518130045146],19,2),1e-12))
+ self.assertTrue(m.getNodalConnectivity().isEqual(DataArrayInt([32,1,2,0,8,9,11,5,4,13,17,16,18,6,8,6,0,12,7,13,6,11,9,10,16,14,15])))
+ self.assertTrue(m.getNodalConnectivityIndex().isEqual(DataArrayInt([0,13,20,27])))
+ pass
+
def setUp(self):
pass
pass
%newobject ParaMEDMEM::MEDCouplingUMesh::ComputeSpreadZoneGradually;
%newobject ParaMEDMEM::MEDCouplingUMesh::ComputeSpreadZoneGraduallyFromSeed;
%newobject ParaMEDMEM::MEDCouplingUMesh::buildNewNumberingFromCommNodesFrmt;
+%newobject ParaMEDMEM::MEDCouplingUMesh::conformize2D;
%newobject ParaMEDMEM::MEDCouplingUMesh::rearrange2ConsecutiveCellTypes;
%newobject ParaMEDMEM::MEDCouplingUMesh::sortCellsInMEDFileFrmt;
%newobject ParaMEDMEM::MEDCouplingUMesh::getRenumArrForMEDFileFrmt;
std::string reprConnectivityOfThis() const throw(INTERP_KERNEL::Exception);
MEDCouplingUMesh *buildSetInstanceFromThis(int spaceDim) const throw(INTERP_KERNEL::Exception);
//tools
+ DataArrayInt *conformize2D(double eps) throw(INTERP_KERNEL::Exception);
void shiftNodeNumbersInConn(int delta) throw(INTERP_KERNEL::Exception);
std::vector<bool> getQuadraticStatus() const throw(INTERP_KERNEL::Exception);
DataArrayInt *findCellIdsOnBoundary() const throw(INTERP_KERNEL::Exception);
DataArrayDouble *getBoundingBoxForBBTreeFast() const throw(INTERP_KERNEL::Exception);
DataArrayDouble *getBoundingBoxForBBTree2DQuadratic(double arcDetEps=1e-12) const throw(INTERP_KERNEL::Exception);
DataArrayDouble *getBoundingBoxForBBTree1DQuadratic(double arcDetEps=1e-12) const throw(INTERP_KERNEL::Exception);
+ int split2DCells(const DataArrayInt *desc, const DataArrayInt *descI, const DataArrayInt *subNodesInSeg, const DataArrayInt *subNodesInSegI, const DataArrayInt *midOpt=0, const DataArrayInt *midOptI=0) throw(INTERP_KERNEL::Exception);
static MEDCouplingUMesh *Build0DMeshFromCoords(DataArrayDouble *da) throw(INTERP_KERNEL::Exception);
static MEDCouplingUMesh *MergeUMeshes(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2) throw(INTERP_KERNEL::Exception);
static MEDCouplingUMesh *MergeUMeshesOnSameCoords(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2) throw(INTERP_KERNEL::Exception);