From: eap Date: Tue, 29 Sep 2009 06:50:22 +0000 (+0000) Subject: 0020440: [CEA 349] P1P0 barycentric interpolators X-Git-Tag: V5_1_main_FINAL~342 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7c7ec1e2f3c774b3939eaf3f1ad1d1a257928381;p=tools%2Fmedcoupling.git 0020440: [CEA 349] P1P0 barycentric interpolators - std::string methC(method); + std::string methC = InterpolationOptions::filterInterpolationMethod(method); if(methC=="P0P0") intersector=new PolyhedronIntersector(targetMesh, srcMesh, getSplittingPolicy()); else if(methC=="P0P1") intersector=new PolyhedronIntersectorP0P1(targetMesh, srcMesh, getSplittingPolicy()); else if(methC=="P1P0") intersector=new PolyhedronIntersectorP1P0(targetMesh, srcMesh, getSplittingPolicy()); + else if(methC=="P1P0Bary") + intersector=new PolyhedronIntersectorP1P0Bary(targetMesh, srcMesh, getSplittingPolicy()); --- diff --git a/src/INTERP_KERNEL/Interpolation3D.txx b/src/INTERP_KERNEL/Interpolation3D.txx index 35ee63b34..ec23db946 100644 --- a/src/INTERP_KERNEL/Interpolation3D.txx +++ b/src/INTERP_KERNEL/Interpolation3D.txx @@ -26,6 +26,8 @@ #include "PolyhedronIntersector.txx" #include "PolyhedronIntersectorP0P1.txx" #include "PolyhedronIntersectorP1P0.txx" +#include "PolyhedronIntersectorP1P0Bary.txx" +#include "PolyhedronIntersectorP0P1.txx" #include "Log.hxx" /// If defined, use recursion to traverse the binary search tree, else use the BBTree class //#define USE_RECURSIVE_BBOX_FILTER @@ -103,13 +105,15 @@ namespace INTERP_KERNEL targetElems[i] = new MeshElement(i, targetMesh); Intersector3D* intersector=0; - std::string methC(method); + std::string methC = InterpolationOptions::filterInterpolationMethod(method); if(methC=="P0P0") intersector=new PolyhedronIntersector(targetMesh, srcMesh, getSplittingPolicy()); else if(methC=="P0P1") intersector=new PolyhedronIntersectorP0P1(targetMesh, srcMesh, getSplittingPolicy()); else if(methC=="P1P0") intersector=new PolyhedronIntersectorP1P0(targetMesh, srcMesh, getSplittingPolicy()); + else if(methC=="P1P0Bary") + intersector=new PolyhedronIntersectorP1P0Bary(targetMesh, srcMesh, getSplittingPolicy()); else throw Exception("Invalid method choosed must be in \"P0P0\", \"P0P1\"."); // create empty maps for all source elements