From 7b7943d716f48c0566f789fc6de9a270a9057e14 Mon Sep 17 00:00:00 2001 From: ageay Date: Mon, 28 Jun 2010 12:25:54 +0000 Subject: [PATCH] Management of 1D interpolation in remapper. --- src/MEDCoupling/MEDCouplingRemapper.cxx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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); -- 2.39.2