]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Management of 1D interpolation in remapper.
authorageay <ageay>
Mon, 28 Jun 2010 12:25:54 +0000 (12:25 +0000)
committerageay <ageay>
Mon, 28 Jun 2010 12:25:54 +0000 (12:25 +0000)
src/MEDCoupling/MEDCouplingRemapper.cxx

index ca57b48a6dc1b8d3c9dc69dbbd49865f9f643050..e1b0efeeef986fb8ca8c5ecf58e5bf8238346518 100644 (file)
@@ -168,7 +168,21 @@ int MEDCouplingRemapper::prepareUU(const char *method)
     if(trgSpaceDim!=-1 && srcSpaceDim!=-1)
       throw INTERP_KERNEL::Exception("Incoherent space dimension detected between target and source.");
   int nbCols;
-  if(srcMeshDim==2 && trgMeshDim==2 && srcSpaceDim==2)
+  if(srcMeshDim==1 && trgMeshDim==1 && srcSpaceDim==1)
+    {
+      MEDCouplingNormalizedUnstructuredMesh<1,1> source_mesh_wrapper(src_mesh);
+      MEDCouplingNormalizedUnstructuredMesh<1,1> target_mesh_wrapper(target_mesh);
+      INTERP_KERNEL::Interpolation1D interpolation(*this);
+      nbCols=interpolation.interpolateMeshes(source_mesh_wrapper,target_mesh_wrapper,_matrix,method);
+    }
+  else if(srcMeshDim==1 && trgMeshDim==1 && srcSpaceDim==2)
+    {
+      MEDCouplingNormalizedUnstructuredMesh<2,1> source_mesh_wrapper(src_mesh);
+      MEDCouplingNormalizedUnstructuredMesh<2,1> target_mesh_wrapper(target_mesh);
+      INTERP_KERNEL::Interpolation2DCurve interpolation(*this);
+      nbCols=interpolation.interpolateMeshes(source_mesh_wrapper,target_mesh_wrapper,_matrix,method);
+    }
+  else if(srcMeshDim==2 && trgMeshDim==2 && srcSpaceDim==2)
     {
       MEDCouplingNormalizedUnstructuredMesh<2,2> source_mesh_wrapper(src_mesh);
       MEDCouplingNormalizedUnstructuredMesh<2,2> target_mesh_wrapper(target_mesh);