Salome HOME
On the road of fields on AMR meshes
[modules/med.git] / src / INTERP_KERNEL / BoxSplittingOptions.hxx
1 // Copyright (C) 2007-2014  CEA/DEN, EDF R&D
2 //
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.
7 //
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.
12 //
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
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 // Author : Anthony Geay
20
21 #ifndef __BOXSPLITTINGOPTIONS_HXX__
22 #define __BOXSPLITTINGOPTIONS_HXX__
23
24 #include "INTERPKERNELDefines.hxx"
25 #include "NormalizedUnstructuredMesh.hxx"
26
27 #include <string>
28
29 namespace INTERP_KERNEL
30
31   /*!
32    * \class BoxSplittingOptions
33    * Class defining the options for box splitting used for AMR algorithm like creation of patches following a criterion.
34    */
35   class INTERPKERNEL_EXPORT BoxSplittingOptions
36   {
37   private:
38     double _effeciency;
39     double _effeciency_snd;
40     int _min_cell_direction;
41     int _max_cells;
42   public:
43     BoxSplittingOptions() { init(); }
44     void init();
45     double getEffeciency() const { return _effeciency; }
46     void setEffeciency(double effeciency) { _effeciency=effeciency; }
47     double getEffeciencySnd() const { return _effeciency_snd; }
48     void setEffeciencySnd(double effeciencySnd) { _effeciency_snd=effeciencySnd; }
49     int getMinCellDirection() const { return _min_cell_direction; }
50     void setMinCellDirection(int minCellDirection) { _min_cell_direction=minCellDirection; }
51     int getMaxCells() const { return _max_cells; }
52     void setMaxCells(int maxCells) { _max_cells=maxCells; }
53     void copyOptions(const BoxSplittingOptions & other) { *this=other; }
54     std::string printOptions() const;
55   private:
56     static const int DFT_MIN_CELL_DIRECTION=3;
57     static const int DFT_MAX_CELLS=1000;
58     static const double DFT_EFFECIENCY;
59     static const double DFT_EFFECIENCY_SND;
60   public:
61     static const char PRECISION_STR[];
62   };
63 }
64
65 #endif