Salome HOME
Merge V8_3_BR branch.
authorrnv <rnv@opencascade.com>
Tue, 30 May 2017 13:03:39 +0000 (16:03 +0300)
committerrnv <rnv@opencascade.com>
Tue, 30 May 2017 13:03:39 +0000 (16:03 +0300)
1  2 
CMakeLists.txt
src/MEDCoupling/MEDCouplingUMesh.cxx
src/MEDCoupling/MEDCouplingVoronoi.cxx
src/MEDCoupling_Swig/MEDCouplingBasicsTest5.py
src/MEDLoader/Swig/MEDLoaderTest3.py

diff --cc CMakeLists.txt
Simple merge
Simple merge
index a7cff07b99e0befa55f595047fc950a6afb63657,1dead8e8d599c2ca3f2f5e2d9c715ba5d8d23fbe..deac498563bbf4bac719bb33cc32d9c2f5656974
@@@ -500,44 -529,8 +535,44 @@@ MCAuto<MEDCouplingUMesh> MEDCoupling::V
            newVorCell->zipCoords();
            MCAuto<MEDCouplingUMesh> modifiedCell(cells->buildPartOfMySelfSlice(0,1,1,true));
            modifiedCell->zipCoords();
 +          l0[poly]=modifiedCell;
 +          if(std::find(polygsToIterOn.begin(),polygsToIterOn.end(),poly)!=polygsToIterOn.end())// we iterate on a polyhedron containg the point to add pt -> add cells sharing faces with just computed newVorCell
 +            {
 +              MCAuto<MEDCouplingUMesh> faces2;
 +              {
 +                MCAuto<DataArrayInt> d2(DataArrayInt::New()),d2I(DataArrayInt::New()),rd2(DataArrayInt::New()),rd2I(DataArrayInt::New());
 +                faces2=newVorCell->buildDescendingConnectivity(d2,d2I,rd2,rd2I);
 +              }
 +              MCAuto<MEDCouplingUMesh> faces3(faces2->buildPartOfMySelfSlice(1,faces2->getNumberOfCells(),1,true));// suppress internal face
 +              MCAuto<MEDCouplingUMesh> facesOfCurSplitPol(faces->buildPartOfMySelf(d->begin()+dI->getIJ(poly,0),d->begin()+dI->getIJ(poly+1,0),true));
 +              // intersection between the out faces of newVorCell and the neighbor faces of poly polyhedron -> candidates
 +              MEDCouplingNormalizedUnstructuredMesh<3,2> source_mesh_wrapper(facesOfCurSplitPol);
 +              MEDCouplingNormalizedUnstructuredMesh<3,2> target_mesh_wrapper(faces3);
 +              INTERP_KERNEL::Interpolation3DSurf interpolation;
 +              interpolation.setMinDotBtwPlane3DSurfIntersect(eps2);
 +              interpolation.setMaxDistance3DSurfIntersect(eps);
 +              interpolation.setPrecision(1e-12);
 +              std::vector<std::map<int,double> > matrix;
 +              interpolation.interpolateMeshes(source_mesh_wrapper,target_mesh_wrapper,matrix,"P0P0");
 +              std::set<int> zeCandidates;
 +              for(std::vector<std::map<int,double> >::const_iterator it2=matrix.begin();it2!=matrix.end();it2++)
 +                for(std::map<int,double>::const_iterator it3=(*it2).begin();it3!=(*it2).end();it3++)
 +                  {
 +                    int faceIdInVorTess(d->getIJ(dI->getIJ(poly,0)+(*it3).first,0));
 +                    for(const int *it4=rd->begin()+rdI->getIJ(faceIdInVorTess,0);it4!=rd->begin()+rdI->getIJ(faceIdInVorTess+1,0);it4++)
 +                      {
 +                        if(*it4!=poly)
 +                          zeCandidates.insert(*it4);
 +                      }
 +                  }
 +              std::set<int> tmp2,newElementsToDo;
 +              std::set_difference(zeCandidates.begin(),zeCandidates.end(),elemsDone.begin(),elemsDone.end(),std::inserter(tmp2,tmp2.begin()));
 +              std::set_union(elemsToDo.begin(),elemsToDo.end(),tmp2.begin(),tmp2.end(),std::inserter(newElementsToDo,newElementsToDo.begin()));
 +              elemsToDo=newElementsToDo;
 +            }
 +          //
            newVorCells.push_back(newVorCell);
-           ii++;
+           l0[poly]=modifiedCell;
          }
        l0.push_back(MergeVorCells3D(newVorCells,eps));
      }
index 0bc7f7898f82cf5a15f281a8b978236e504ac16f,9c1ae7c6b10f38adc8eafd739b10484386501b43..1719e3488c34d290ef566997f0cf17330c24fcc5
@@@ -696,7 -696,7 +696,7 @@@ class MEDCouplingBasicsTest5(unittest.T
          self.assertRaises(InterpKernelException,m.buildUnstructured().splitProfilePerType,invalidPfl)
          ##
          pfl1=DataArrayInt([1,2,3])
--        a=m.checkTypeConsistencyAndContig([NORM_QUAD4,3,0],[pfl1])
++        a=m.getCellsContainingPointcheckTypeConsistencyAndContig([NORM_QUAD4,3,0],[pfl1])
          b=m.buildUnstructured().checkTypeConsistencyAndContig([NORM_QUAD4,3,0],[pfl1])
          self.assertTrue(a.isEqual(b) and pfl1.getHiddenCppPointer(),a.getHiddenCppPointer())
          #
index 8536b2a1d5641307ab6040c544c574cf08d8fce1,c1c0156919e9054f255e9fc61c45a9dcb3e6062a..4dce1b328aac0317ea9fa7ab97458e241e473a7a
@@@ -139,7 -133,7 +139,7 @@@ class MEDLoaderTest3(unittest.TestCase)
          g1_2=DataArrayInt.New()
          g1_2.setValues([1,3],2,1)
          g1_2.setName("G1")
--        g2_2=DataArrayInt.New()
++        g2_2=DataArrayInt.New()getCellsContainingPoint
          g2_2.setValues([1,2,3],3,1)
          g2_2.setName("G2")
          mm.setGroupsAtLevel(0,[g1_2,g2_2],False)