Salome HOME
Merge branch 'agy/codeutils'
[tools/medcoupling.git] / src / MEDCoupling / MEDCouplingCurveLinearMesh.cxx
index c96ed77f10278c3e7f605c6fdc3c6610fee5718d..f54754b37199370f3e079fb5ceab5799b2c5fe37 100644 (file)
@@ -168,14 +168,13 @@ void MEDCouplingCurveLinearMesh::checkDeepEquivalWith(const MEDCouplingMesh *oth
 
 /*!
  * Nothing is done here (except to check that the other is a ParaMEDMEM::MEDCouplingCurveLinearMesh instance too).
- * The user intend that the nodes are the same, so by construction of ParaMEDMEM::MEDCouplingCurveLinearMesh, 'this' and 'other' are the same !
+ * The user intend that the nodes are the same, so by construction of ParaMEDMEM::MEDCouplingCurveLinearMesh, \a this and \a other are the same !
  */
 void MEDCouplingCurveLinearMesh::checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
                                                                  DataArrayInt *&cellCor) const
 {
-  const MEDCouplingCurveLinearMesh *otherC=dynamic_cast<const MEDCouplingCurveLinearMesh *>(other);
-  if(!otherC)
-    throw INTERP_KERNEL::Exception("MEDCouplingCurveLinearMesh::checkDeepEquivalOnSameNodesWith : other is NOT a cartesian mesh ! Impossible to check equivalence !");
+  if(!isEqualWithoutConsideringStr(other,prec))
+    throw INTERP_KERNEL::Exception("MEDCouplingCurveLinearMesh::checkDeepEquivalOnSameNodesWith : Meshes are not the same !");
 }
 
 void MEDCouplingCurveLinearMesh::checkCoherency() const
@@ -224,30 +223,6 @@ int MEDCouplingCurveLinearMesh::getNumberOfNodes() const
   return MEDCouplingStructuredMesh::getNumberOfNodes();
 }
 
-void MEDCouplingCurveLinearMesh::getSplitCellValues(int *res) const
-{
-  int meshDim=getMeshDimension();
-  for(int l=0;l<meshDim;l++)
-    {
-      int val=1;
-      for(int p=0;p<meshDim-l-1;p++)
-        val*=_structure[p]-1;
-      res[meshDim-l-1]=val;
-    }
-}
-
-void MEDCouplingCurveLinearMesh::getSplitNodeValues(int *res) const
-{
-  int meshDim=getMeshDimension();
-  for(int l=0;l<meshDim;l++)
-    {
-      int val=1;
-      for(int p=0;p<meshDim-l-1;p++)
-        val*=_structure[p];
-      res[meshDim-l-1]=val;
-    }
-}
-
 void MEDCouplingCurveLinearMesh::getNodeGridStructure(int *res) const
 {
   std::copy(_structure.begin(),_structure.end(),res);
@@ -345,11 +320,11 @@ std::vector<int> MEDCouplingCurveLinearMesh::getNodeGridStructure() const
 MEDCouplingStructuredMesh *MEDCouplingCurveLinearMesh::buildStructuredSubPart(const std::vector< std::pair<int,int> >& cellPart) const
 {
   checkCoherency();
-  int dim(getMeshDimension());
+  int dim(getSpaceDimension());
   std::vector<int> dims(getMeshDimension());
   if(dim!=(int)cellPart.size())
     {
-      std::ostringstream oss; oss << "MEDCouplingCurveLinearMesh::buildStructuredSubPart : the mesh dimension is " << dim << " and cell part size is " << cellPart.size() << " !";
+      std::ostringstream oss; oss << "MEDCouplingCurveLinearMesh::buildStructuredSubPart : the space dimension is " << dim << " and cell part size is " << cellPart.size() << " !";
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
   std::vector< std::pair<int,int> > nodePartFormat(cellPart);
@@ -943,6 +918,11 @@ void MEDCouplingCurveLinearMesh::reprQuickOverview(std::ostream& stream) const
   coo->reprQuickOverviewData(stream,200);
 }
 
+std::string MEDCouplingCurveLinearMesh::getVTKFileExtension() const
+{
+  return std::string("vts");
+}
+
 std::string MEDCouplingCurveLinearMesh::getVTKDataSetType() const
 {
   return std::string("StructuredGrid");