X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FINTERP_KERNEL%2FInterpolationOptions.hxx;h=9b11b0cedf7a0b16ee40387258f5dd981b185b31;hb=be4c3bb042d5426fbbe54378b9d7b35173ab27ef;hp=6ba269bb7427b11c515bd71688baf11a786f217e;hpb=293a6104470482e450701aa8061d9b244f2057d5;p=tools%2Fmedcoupling.git diff --git a/src/INTERP_KERNEL/InterpolationOptions.hxx b/src/INTERP_KERNEL/InterpolationOptions.hxx index 6ba269bb7..9b11b0ced 100644 --- a/src/INTERP_KERNEL/InterpolationOptions.hxx +++ b/src/INTERP_KERNEL/InterpolationOptions.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D +// Copyright (C) 2007-2013 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -22,17 +22,13 @@ #define __INTERPOLATIONOPTIONS_HXX__ #include "INTERPKERNELDefines.hxx" +#include "NormalizedUnstructuredMesh.hxx" #include namespace INTERP_KERNEL { - typedef enum { Triangulation, Convex, Geometric2D, PointLocator } IntersectionType; - /// Type describing the different ways in which the hexahedron can be split into tetrahedra. - /// The PLANAR_* policies persume that each face is to be considered planar, while the general - /// policies make no such hypothesis. The integer at the end gives the number of tetrahedra - /// that result from the split. - typedef enum { PLANAR_FACE_5 = 5, PLANAR_FACE_6 = 6, GENERAL_24 = 24, GENERAL_48 = 48 } SplittingPolicy; + typedef enum { Triangulation, Convex, Geometric2D, PointLocator, Barycentric, BarycentricGeo2D } IntersectionType; /*! * \class InterpolationOptions @@ -57,8 +53,6 @@ namespace INTERP_KERNEL int _orientation ; bool _measure_abs; SplittingPolicy _splitting_policy ; - bool _P1P0_bary_method; // issue 0020440 - public: InterpolationOptions() { init(); } int getPrintLevel() const { return _print_level; } @@ -96,26 +90,10 @@ namespace INTERP_KERNEL void setSplittingPolicy(SplittingPolicy sp) { _splitting_policy=sp; } std::string getSplittingPolicyRepr() const; - void setP1P0BaryMethod(bool isP1P0) { _P1P0_bary_method=isP1P0; } - bool getP1P0BaryMethod() const { return _P1P0_bary_method; } - std::string filterInterpolationMethod(const std::string& meth) const; - void init() - { - _print_level=0; - _intersection_type=Triangulation; - _precision=1e-12; - _median_plane=DFT_MEDIAN_PLANE; - _do_rotate=true; - _bounding_box_adjustment=DFT_SURF3D_ADJ_EPS; - _bounding_box_adjustment_abs=0.; - _max_distance_for_3Dsurf_intersect=DFT_MAX_DIST_3DSURF_INTERSECT; - _orientation=0; - _measure_abs=true; - _splitting_policy=GENERAL_48; - _P1P0_bary_method=false; - } + void init(); + bool setInterpolationOptions(long print_level, std::string intersection_type, double precision, @@ -126,13 +104,14 @@ namespace INTERP_KERNEL double max_distance_for_3Dsurf_intersect, long orientation, bool measure_abs, - std::string splitting_policy, - bool P1P0_bary_method ); + std::string splitting_policy); void copyOptions(const InterpolationOptions & other) { *this = other; } bool setOptionDouble(const std::string& key, double value); bool setOptionInt(const std::string& key, int value); bool setOptionString(const std::string& key, const std::string& value); std::string printOptions() const; + public: + static void CheckAndSplitInterpolationMethod(const std::string& method, std::string& srcMeth, std::string& trgMeth); private: static const double DFT_MEDIAN_PLANE; static const double DFT_SURF3D_ADJ_EPS; @@ -153,6 +132,8 @@ namespace INTERP_KERNEL static const char CONVEX_INTERSECT2D_STR[]; static const char GEOMETRIC_INTERSECT2D_STR[]; static const char POINTLOCATOR_INTERSECT_STR[]; + static const char BARYCENTRIC_INTERSECT_STR[]; + static const char BARYCENTRICGEO2D_INTERSECT_STR[]; static const char PLANAR_SPLIT_FACE_5_STR[]; static const char PLANAR_SPLIT_FACE_6_STR[]; static const char GENERAL_SPLIT_24_STR[];