Salome HOME
Merge remote branch 'origin/V7_4_BR'
[modules/homard.git] / doc / en / tui_create_hypothese.rst
index 6c727642c073cd611421564d6e6b997e3b834efb..63fb554ba5f32c01b651f4d4d1299a10f3c19fce 100644 (file)
@@ -1,7 +1,7 @@
 .. _tui_create_hypothese:
 
 The hypothesis
-==============
+##############
 
 .. index:: single: iteration
 .. index:: single: hypothesis
@@ -10,7 +10,7 @@ The hypothesis
 The variables are described in :ref:`gui_create_hypothese`.
 
 Methods of the class homard
-""""""""""""""""""""""""""""
+***************************
 
 +---------------------------------------------------------------+
 +---------------------------------------------------------------+
@@ -38,10 +38,10 @@ Methods of the class homard
 +---------------------------------------------------------------+
 
 Methods of the class hypothese
-"""""""""""""""""""""""""""""""
+******************************
 
 General methods
-^^^^^^^^^^^^^^^
+===============
 
 +---------------------------------------------------------------+
 +---------------------------------------------------------------+
@@ -50,44 +50,30 @@ General methods
 | **GetName()**                                                 |
 |     Returns the name of the hypothesis                        |
 +---------------------------------------------------------------+
-| .. module:: SetAdapRefinUnRef                                 |
-|                                                               |
-| **SetAdapRefinUnRef(Adap, Refin, UnRef)**                     |
-|     Gives the type of adaptation to the hypothesis            |
+| .. module:: GetAdapType                                       |
 |                                                               |
-|     - ``Adap``: integer that defines the type of adaptation   |
+| **GetAdapType()**                                             |
+|     Returns the type of the adaptation                        |
 |                                                               |
 |         * -1: uniform                                         |
 |         * 0: by zones                                         |
 |         * 1: by a field                                       |
-|                                                               |
-|     - ``Refin``: integer that informs if the refinement is    |
-|       active or not                                           |
-|                                                               |
-|         * 0: unactive                                         |
-|         * 1: active                                           |
-|                                                               |
-|     - ``UnRef``: integer that informs if the refinement is    |
-|       active or not                                           |
-|                                                               |
-|         * 0: unactive                                         |
-|         * 1: active                                           |
-|                                                               |
-+---------------------------------------------------------------+
-| .. module:: GetAdapType                                       |
-|                                                               |
-| **GetAdapType()**                                             |
-|     Returns the type of the adaptation                        |
 +---------------------------------------------------------------+
 | .. module:: GetRefinType                                      |
 |                                                               |
 | **GetRefinType()**                                            |
 |     Returns the type of the refinement                        |
+|                                                               |
+|         * 0: unactive                                         |
+|         * 1: active                                           |
 +---------------------------------------------------------------+
 | .. module:: GetUnRefType                                      |
 |                                                               |
 | **GetUnRefType()**                                            |
 |     Returns the type of the unrefinement                      |
+|                                                               |
+|         * 0: unactive                                         |
+|         * 1: active                                           |
 +---------------------------------------------------------------+
 | .. module:: Delete                                            |
 |                                                               |
@@ -99,30 +85,50 @@ General methods
 |         * other value: problem                                |
 +---------------------------------------------------------------+
 
-The field and the thresholds
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Uniform adaptation
+==================
+
++---------------------------------------------------------------+
++---------------------------------------------------------------+
+| .. module:: SetUnifRefinUnRef                                 |
+|                                                               |
+| **SetUnifRefinUnRef(RefinUnRef)**                             |
+|     Defines a type of adaptation for the whole mesh           |
+|                                                               |
+|     - ``RefinUnRef``: integer that defines the                |
+|       type of adaptation                                      |
+|                                                               |
+|         * 1: refinement                                       |
+|         * -1: unrefinement                                    |
++---------------------------------------------------------------+
+
+Adaptation by a field
+=====================
+
+The driving field and the thresholds
+------------------------------------
 
 +---------------------------------------------------------------+
 +---------------------------------------------------------------+
 | .. module:: SetField                                          |
 |                                                               |
-| **SetField(field_name)**                                      |
-|     Gives the name of a field to the hypothesis               |
+| **SetField(FieldName)**                                       |
+|     Gives the name of a driving field to the hypothesis       |
 |                                                               |
-|     - ``field_name``: the name of the field                   |
+|     - ``FieldName``: the name of the driving field            |
 +---------------------------------------------------------------+
 | .. module:: GetFieldName                                      |
 |                                                               |
 | **GetFieldName()**                                            |
-|     Returns the name of the field                             |
+|     Returns the name of the driving field                     |
 +---------------------------------------------------------------+
 | .. module:: SetUseField                                       |
 |                                                               |
 | **SetUseField(use_field)**                                    |
-|     Gives the usage of the field for the hypothesis           |
+|     Gives the usage of the driving field                      |
 |                                                               |
-|     - ``use_field``: integer that defines how the field is    |
-|       used                                                    |
+|     - ``use_field``: integer that defines how the driving     |
+|       field is used                                           |
 |                                                               |
 |        * 0: value by element (default)                        |
 |        * 1: jump between an element and its neighbours        |
@@ -171,8 +177,8 @@ The field and the thresholds
 +---------------------------------------------------------------+
 
 
-The components of the field
-^^^^^^^^^^^^^^^^^^^^^^^^^^^
+The components of the driving field
+-----------------------------------
 
 +---------------------------------------------------------------+
 +---------------------------------------------------------------+
@@ -182,6 +188,9 @@ The components of the field
 |     Add a component of the field                              |
 |                                                               |
 |     - ``comp_name``: name of a component to take into account |
+|                                                               |
+|     Note: if this method is not used, every component         |
+|     of the field is taken into account.                       |
 +---------------------------------------------------------------+
 | .. module:: SetUseComp                                        |
 |                                                               |
@@ -195,15 +204,27 @@ The components of the field
 |        * 1: infinite norm                                     |
 |        * 2: relative value, if only one component             |
 +---------------------------------------------------------------+
-| .. module:: GetListComp                                       |
+| .. module:: GetComps                                          |
 |                                                               |
-| **GetListComp()**                                             |
+| **GetComps()**                                                |
 |     Returns the list of the used components                   |
 +---------------------------------------------------------------+
+| .. module:: SupprComp                                         |
+|                                                               |
+| **SupprComp(comp_name)**                                      |
+|     Eliminates a component of the field                       |
+|                                                               |
+|     - ``comp_name``: name of a component to eliminate         |
++---------------------------------------------------------------+
+| .. module:: SupprComps                                        |
+|                                                               |
+| **SupprComps()**                                              |
+|     Eliminates all the components of the field                |
++---------------------------------------------------------------+
 
 
-The zones
-^^^^^^^^^
+Adaptation by zones
+===================
 
 +---------------------------------------------------------------+
 +---------------------------------------------------------------+
@@ -217,10 +238,32 @@ The zones
 |         * 1: refinement                                       |
 |         * -1: unrefinement                                    |
 +---------------------------------------------------------------+
+| .. module:: GetZones                                          |
+|                                                               |
+| **GetZones()**                                                |
+|     Returns the list of the used zones with their uses        |
+|                                                               |
+|     Warning: the use is stored as a string in the list and    |
+|     not as an integer.                                        |
+|                                                               |
+|     Example: ['Zone_A', '1', 'Zone_B', '1', 'Zone_C', '1']    |
++---------------------------------------------------------------+
+| .. module:: SupprZone                                         |
+|                                                               |
+| **SupprZone(zone_name)**                                      |
+|     Eliminates a zone from the hypothesis                     |
+|                                                               |
+|     - ``zone_name``: name of a zone to eliminate              |
++---------------------------------------------------------------+
+| .. module:: SupprZones                                        |
+|                                                               |
+| **SupprZones()**                                              |
+|     Eliminates all the zones from the hypothesis              |
++---------------------------------------------------------------+
 
 
 The filtering by the groups
-^^^^^^^^^^^^^^^^^^^^^^^^^^^
+===========================
 
 +---------------------------------------------------------------+
 +---------------------------------------------------------------+
@@ -238,8 +281,89 @@ The filtering by the groups
 |     filtering                                                 |
 +---------------------------------------------------------------+
 
+Interpolation of fields
+=======================
+
++---------------------------------------------------------------+
++---------------------------------------------------------------+
+| .. module:: SetTypeFieldInterp                                |
+|                                                               |
+| **SetTypeFieldInterp(typefieldinterp)**                       |
+|                                                               |
+|     - ``typefieldinterp``: integer that defines if some fields|
+|       are interpolated or not                                 |
+|                                                               |
+|         * 0: no field (default)                               |
+|         * 1: every field is interpolated                      |
+|         * 2: some fields are interpolated; automatically set  |
+|           after using AddFieldInterp or AddFieldInterpType    |
++---------------------------------------------------------------+
+| .. module:: GetTypeFieldInterp                                |
+|                                                               |
+| **GetTypeFieldInterp()**                                      |
+|     Returns the integer that defines if some fields are       |
+|     interpolated or not                                       |
++---------------------------------------------------------------+
+| .. module:: AddFieldInterp                                    |
+|                                                               |
+| **AddFieldInterp(FieldName)**                                 |
+|                                                               |
+|     - ``FieldName``: the name of the field to interpolate     |
+|                                                               |
+|     The interpolation type is automatically deduced by        |
+|     HOMARD; it corresponds to the type 0 of AddFieldInterpType|
++---------------------------------------------------------------+
+| .. module:: AddFieldInterpType                                |
+|                                                               |
+| **AddFieldInterpType(FieldName, type_interp)**                |
+|                                                               |
+|     - ``FieldName``: the name of the field to interpolate     |
+|     - ``type_interp``: integer that defines the type of       |
+|       interpolation                                           |
+|                                                               |
+|     For a field over the nodes:                               |
+|                                                               |
+|         * 0: the field will be interpolated in degree 1 or 2  |
+|           depending on its baseframe.                         |
+|         * 1: interpolation en degree 1                        |
+|         * 2: interpolation en degree 2                        |
+|         * 3: interpolation iso-P2                             |
+|                                                               |
+|     For a field over the elements:                            |
+|                                                               |
+|         * 0: the field will be interpolated as an intensive   |
+|           variable                                            |
+|         * 1: the field will be interpolated as an extensive   |
+|           variable                                            |
++---------------------------------------------------------------+
+| .. module:: GetFieldInterps                                   |
+|                                                               |
+| **GetFieldInterps()**                                         |
+|     Returns the list of the interpolated fields with their use|
+|                                                               |
+|     Warning: the use is stored as a string in the list and    |
+|     not as an integer.                                        |
+|                                                               |
+|     Example: ['DEPL', '0', 'Mass', '1', 'Density', '0']       |
++---------------------------------------------------------------+
+| .. module:: SupprFieldInterp                                  |
+|                                                               |
+| **SupprFieldInterp(FieldName)**                               |
+|     Eliminates a field from the hypothesis                    |
+|                                                               |
+|     - ``FieldName``: name of a field to eliminate             |
++---------------------------------------------------------------+
+| .. module:: SupprFieldInterps                                 |
+|                                                               |
+| **SupprFieldInterps()**                                       |
+|     Eliminates all the fields from the hypothesis             |
++---------------------------------------------------------------+
+
+.. note::
+  The file and the time steps for the fiels are defined with the iteration; see :ref:`tui_create_iteration`.
+
 Advanced options
-^^^^^^^^^^^^^^^^
+================
 
 +---------------------------------------------------------------+
 +---------------------------------------------------------------+
@@ -286,40 +410,42 @@ Advanced options
 |     Returns the treatment of the elements where the field that|
 |     governs the adaptation is not defined                     |
 +---------------------------------------------------------------+
-| .. module:: SetLevelOutput                                    |
+| .. module:: SetExtraOutput                                    |
 |                                                               |
-| **SetLevelOutput(option)**                                    |
-|     Acts if the level of refinement is returned as a field in |
-|     the output MED file                                       |
+| **SetExtraOutput(option)**                                    |
+|     Acts if some extra information are required into the      |
+|     output MED file. The option is a product of 2, 3, 5.      |
 |                                                               |
 |     - ``option``: integer as follows:                         |
 |                                                               |
-|         *  0: no effect (default)                             |
-|         *  1: the field is produced                           |
+|         *  1 : no effect (default)                            |
+|         *  2x : the refinement level of every mesh is produced|
+|         *  3x : the quality of every mesh                     |
+|         *  5x : the diameter of every mesh                    |
 +---------------------------------------------------------------+
-| .. module:: GetLevelOutput                                    |
+| .. module:: GetExtraOutput                                    |
 |                                                               |
-| **GetLevelOutput()**                                          |
-|     Returns the choice for the output of the level of         |
-|     refinement                                                |
+| **GetExtraOutput()**                                          |
+|     Returns the choice for the output of extra information    |
 +---------------------------------------------------------------+
 
 
 Example
-"""""""
+*******
 The creation of the object hypo_1 is done as follows:
 ::
 
     hypo_1 = homard.CreateHypothesis("HypoField")
-    hypo_1.SetAdapRefinUnRef(1, 1, 0)
     hypo_1.SetField("INDICATEUR")
     hypo_1.AddComp("INDX")
     hypo_1.AddComp("INDZ")
     hypo_1.SetRefinThr(1, 80.)
+    hypo_1.AddFieldInterp("DEPL")
+    hypo_1.AddFieldInterpType("MASS", 1)
 
 
 Similar graphical input
-"""""""""""""""""""""""
+***********************
 Look at :ref:`gui_create_hypothese`
 
 .. warning::