From: ageay Date: Mon, 28 Jun 2010 12:25:54 +0000 (+0000) Subject: Management of 1D interpolation in remapper. X-Git-Tag: V5_1_main_FINAL~113 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7b7943d716f48c0566f789fc6de9a270a9057e14;p=tools%2Fmedcoupling.git Management of 1D interpolation in remapper. --- diff --git a/src/MEDCoupling/MEDCouplingRemapper.cxx b/src/MEDCoupling/MEDCouplingRemapper.cxx index ca57b48a6..e1b0efeee 100644 --- a/src/MEDCoupling/MEDCouplingRemapper.cxx +++ b/src/MEDCoupling/MEDCouplingRemapper.cxx @@ -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);