1 // Copyright (C) 2007-2019 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // Author : Anthony Geay
21 #ifndef __BOXSPLITTINGOPTIONS_HXX__
22 #define __BOXSPLITTINGOPTIONS_HXX__
24 #include "INTERPKERNELDefines.hxx"
28 namespace INTERP_KERNEL
31 * \class BoxSplittingOptions
32 * Class defining the options for box splitting used for AMR algorithm like creation of patches following a criterion.
34 class INTERPKERNEL_EXPORT BoxSplittingOptions
37 double _efficiency_goal;
38 double _efficiency_threshold;
39 int _min_patch_length;
40 int _max_patch_length;
41 int _max_nb_cells_in_patch;
43 BoxSplittingOptions() { init(); }
45 double getEfficiencyGoal() const { return _efficiency_goal; }
46 void setEfficiencyGoal(double efficiency) { _efficiency_goal=efficiency; }
47 double getEfficiencyThreshold() const { return _efficiency_threshold; }
48 void setEfficiencyThreshold(double efficiencyThreshold) { _efficiency_threshold=efficiencyThreshold; }
49 int getMinimumPatchLength() const { return _min_patch_length; }
50 void setMinimumPatchLength(int minPatchLength) { _min_patch_length=minPatchLength; }
51 int getMaximumPatchLength() const { return _max_patch_length; }
52 void setMaximumPatchLength(int maxNbCellPatch) { _max_patch_length=maxNbCellPatch; }
53 int getMaximumNbOfCellsInPatch() const { return _max_nb_cells_in_patch; }
54 void setMaximumNbOfCellsInPatch(int maxNbCellsInPatch) { _max_nb_cells_in_patch=maxNbCellsInPatch; }
55 void copyOptions(const BoxSplittingOptions & other) { *this=other; }
56 std::string printOptions() const;
58 static const int DFT_MIN_PATCH_LENGTH=1;
59 static const int DFT_MAX_PATCH_LENGTH=2147483647;
60 static const int DFT_MAX_PATCH_MEASURE=2147483647;
61 static const double DFT_EFFICIENCY_GOAL;
62 static const double DFT_EFFICIENCY_THRESHOLD;
64 static const char PRECISION_STR[];