Salome HOME
getCellsContainingPoints is sensitive to 2D quadratic static cells.
[tools/medcoupling.git] / src / MEDCoupling / MEDCouplingNormalizedUnstructuredMesh.txx
index 5e8cfb985bc084e77a6f376ec0b6075c2dccd282..111b6186cb3776cf513ac447c6d1a7bef740cd51 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -22,6 +22,7 @@
 #define __MEDCOUPLINGNORMALIZEDUNSTRUCTUREDMESH_TXX__
 
 #include "MEDCouplingNormalizedUnstructuredMesh.hxx"
+#include "InterpKernelAssert.hxx"
 
 #include "MEDCouplingUMesh.hxx"
 #include "MEDCoupling1GTUMesh.hxx"
@@ -30,7 +31,7 @@
 #include <limits>
 
 template<int SPACEDIM,int MESHDIM>
-MEDCouplingNormalizedUnstructuredMesh<SPACEDIM,MESHDIM>::MEDCouplingNormalizedUnstructuredMesh(const ParaMEDMEM::MEDCouplingPointSet *mesh):_mesh(mesh)
+MEDCouplingNormalizedUnstructuredMesh<SPACEDIM,MESHDIM>::MEDCouplingNormalizedUnstructuredMesh(const MEDCoupling::MEDCouplingPointSet *mesh):_mesh(mesh)
 {
   if(_mesh)
     _mesh->incrRef();
@@ -45,7 +46,7 @@ void MEDCouplingNormalizedUnstructuredMesh<SPACEDIM,MESHDIM>::getBoundingBox(dou
       boundingBox[i]=std::numeric_limits<double>::max();
       boundingBox[SPACEDIM+i]=-std::numeric_limits<double>::max();
     }
-  const ParaMEDMEM::DataArrayDouble *array=_mesh->getCoords();
+  const MEDCoupling::DataArrayDouble *array=_mesh->getCoords();
   const double *ptr=array->getConstPointer();
   int nbOfPts=array->getNbOfElems()/SPACEDIM;
   for(int j=0;j<SPACEDIM;j++)
@@ -94,7 +95,7 @@ const int *MEDCouplingNormalizedUnstructuredMesh<SPACEDIM,MESHDIM>::getConnectiv
 template<int SPACEDIM,int MESHDIM>
 const double *MEDCouplingNormalizedUnstructuredMesh<SPACEDIM,MESHDIM>::getCoordinatesPtr() const
 {
-  const ParaMEDMEM::DataArrayDouble *array=_mesh->getCoords();
+  const MEDCoupling::DataArrayDouble *array=_mesh->getCoords();
   return array->getConstPointer();
 }
 
@@ -124,7 +125,8 @@ MEDCouplingNormalizedUnstructuredMesh<SPACEDIM,MESHDIM>::~MEDCouplingNormalizedU
 template<int SPACEDIM,int MESHDIM>
 void MEDCouplingNormalizedUnstructuredMesh<SPACEDIM,MESHDIM>::prepare()
 {
-  const ParaMEDMEM::MEDCouplingUMesh *m1(dynamic_cast<const ParaMEDMEM::MEDCouplingUMesh *>(_mesh));
+  IKAssert(_mesh->getSpaceDimension()==SPACEDIM);
+  const MEDCoupling::MEDCouplingUMesh *m1(dynamic_cast<const MEDCoupling::MEDCouplingUMesh *>(_mesh));
   if(m1)
     {
       int nbOfCell=m1->getNumberOfCells();
@@ -147,7 +149,7 @@ void MEDCouplingNormalizedUnstructuredMesh<SPACEDIM,MESHDIM>::prepare()
         }
       return ;
     }
-  const ParaMEDMEM::MEDCoupling1DGTUMesh *m2(dynamic_cast<const ParaMEDMEM::MEDCoupling1DGTUMesh *>(_mesh));
+  const MEDCoupling::MEDCoupling1DGTUMesh *m2(dynamic_cast<const MEDCoupling::MEDCoupling1DGTUMesh *>(_mesh));
   if(m2)
     {
       int nbOfCell(m2->getNumberOfCells());
@@ -158,7 +160,7 @@ void MEDCouplingNormalizedUnstructuredMesh<SPACEDIM,MESHDIM>::prepare()
       std::copy(m2->getNodalConnectivity()->begin(),m2->getNodalConnectivity()->end(),_conn_for_interp);
       return ;
     }
-  const ParaMEDMEM::MEDCoupling1SGTUMesh *m3(dynamic_cast<const ParaMEDMEM::MEDCoupling1SGTUMesh *>(_mesh));
+  const MEDCoupling::MEDCoupling1SGTUMesh *m3(dynamic_cast<const MEDCoupling::MEDCoupling1SGTUMesh *>(_mesh));
   if(m3)
     {
       int nbOfCell(m3->getNumberOfCells()),nbNodesPerCell(m3->getNumberOfNodesPerCell());