lib = 'StdMeshersEngine'
self.processGuiEvents()
- # ---- create hypotheses
+ # ---- create hypotheses
print('... Create hypotheses')
- # **** create local length
+ # **** create local length
print('...... Local Length')
local_length = smesh.CreateHypothesis('LocalLength', lib)
self.assertIsNotNone(local_length)
self.assertEqual(regular.GetName(), 'Regular_1D')
self.processGuiEvents()
- # **** create mefisto 2d
- print('...... Mefisto 2D')
- mefisto = smesh.CreateHypothesis( 'MEFISTO_2D', lib )
- listHyp = mefisto.GetCompatibleHypothesis()
- self.assertEqual(mefisto.GetName(), 'MEFISTO_2D')
+ # **** create NETGEN 2d
+ print('...... NETGEN 2D')
+ netgen = smesh.CreateHypothesis( 'NETGEN_2D', lib )
+ listHyp = netgen.GetCompatibleHypothesis()
+ self.assertEqual(netgen.GetName(), 'NETGEN_2D')
self.processGuiEvents()
# ---- create mesh on box
print('... Create mesh on box')
mesh = smesh.CreateMesh(box)
self.assertEqual(mesh.AddHypothesis(box, regular)[0], SMESH.HYP_OK)
- self.assertEqual(mesh.AddHypothesis(box, mefisto)[0], SMESH.HYP_OK)
+ self.assertEqual(mesh.AddHypothesis(box, netgen)[0], SMESH.HYP_OK)
self.assertEqual(mesh.AddHypothesis(box, nb_segments)[0], SMESH.HYP_OK)
self.assertEqual(mesh.AddHypothesis(box, max_area)[0], SMESH.HYP_OK)
self.processGuiEvents()
# assign mesh algorithms and hypotheses
Regular_1D = Mesh_1.Segment()
Nb_Segments_1 = Regular_1D.NumberOfSegments(20)
-MEFISTO_2D = Mesh_1.Triangle()
-Max_Element_Area_1 = MEFISTO_2D.MaxElementArea(1200)
+NETGEN_2D = Mesh_1.Triangle()
+Max_Element_Area_1 = NETGEN_2D.MaxElementArea(1200)
Tetrahedron = Mesh_1.Tetrahedron()
Max_Element_Volume_1 = Tetrahedron.MaxElementVolume(40000)
# create sub-mesh and assign algorithms on Face_1
Regular_1D_1 = Mesh_1.Segment(geom=Face_1)
Nb_Segments_2 = Regular_1D_1.NumberOfSegments(4)
-MEFISTO_2D_1 = Mesh_1.Triangle(algo=smeshBuilder.NETGEN_2D,geom=Face_1)
-SubMesh_1 = MEFISTO_2D_1.GetSubMesh()
+NETGEN_2D_1 = Mesh_1.Triangle(algo=smeshBuilder.NETGEN_2D,geom=Face_1)
+SubMesh_1 = NETGEN_2D_1.GetSubMesh()
# create sub-mesh and assign algorithms on Face_2
Regular_1D_2 = Mesh_1.Segment(geom=Face_2)
Nb_Segments_3 = Regular_1D_2.NumberOfSegments(8)
-MEFISTO_2D_2 = Mesh_1.Triangle(algo=smeshBuilder.NETGEN_2D,geom=Face_2)
-SubMesh_2 = MEFISTO_2D_2.GetSubMesh()
+NETGEN_2D_2 = Mesh_1.Triangle(algo=smeshBuilder.NETGEN_2D,geom=Face_2)
+SubMesh_2 = NETGEN_2D_2.GetSubMesh()
# create sub-mesh and assign algorithms on Face_3
Regular_1D_3 = Mesh_1.Segment(geom=Face_3)
Nb_Segments_4 = Regular_1D_3.NumberOfSegments(12)
-MEFISTO_2D_3 = Mesh_1.Triangle(algo=smeshBuilder.NETGEN_2D,geom=Face_3)
-SubMesh_3 = MEFISTO_2D_3.GetSubMesh()
+NETGEN_2D_3 = Mesh_1.Triangle(algo=smeshBuilder.NETGEN_2D,geom=Face_3)
+SubMesh_3 = NETGEN_2D_3.GetSubMesh()
# check existing sub-mesh priority order
[ [ SubMesh_1, SubMesh_3, SubMesh_2 ] ] = Mesh_1.GetMeshOrder()
# create a Regular 1D algorithm for edges
algo1D = tetra.Segment()
-# create a Mefisto 2D algorithm for faces
+# create a NETGEN 2D algorithm for faces
algo2D = tetra.Triangle()
# create a 3D algorithm for solids
geompy.addToStudyInFather( box, Face_2, 'Face_2' )
-# Make the source mesh triangulated by MEFISTO
+# Make the source mesh triangulated by NETGEN
src_mesh = smesh.Mesh(Face_1, "Source mesh")
src_mesh.Segment().NumberOfSegments(15)
src_mesh.Triangle()
Mesh = smesh.Mesh(Sphere)
Regular_1D = Mesh.Segment()
Nb_Segments = Regular_1D.NumberOfSegments(5)
-MEFISTO_2D = Mesh.Triangle()
+NETGEN_2D = Mesh.Triangle()
Tetrahedron = Mesh.Tetrahedron()
# compute mesh
Mesh.ConvertToQuadratic( theForce3d=0 )
-# to convert not the whole mesh but a sub-mesh, provide it as
+# to convert not the whole mesh but a sub-mesh, provide it as
# an additional argument to the functions:
# Mesh.ConvertToQuadratic( 0, subMesh )
# Mesh.ConvertFromQuadratic( subMesh )
Mesh_1 = smesh.Mesh(Partition_1)
Regular_1D = Mesh_1.Segment()
Max_Size_1 = Regular_1D.MaxSize(34.641)
-MEFISTO_2D = Mesh_1.Triangle()
+NETGEN_2D = Mesh_1.Triangle()
Tetrahedronn = Mesh_1.Tetrahedron()
isDone = Mesh_1.Compute()
* For meshing of 2D entities (**faces**):
- * **Triangle: Mefisto** meshing algorithm - splits faces into triangular elements.
+ * **Triangle: NETGEN_2D** meshing algorithm - splits faces into triangular elements.
* :ref:`Quadrangle: Mapping <quad_ijk_algo_page>` meshing algorithm - splits faces into quadrangular elements.
.. image:: ../images/image123.gif
- :align: center
+ :align: center
.. centered::
Example of a triangular 2D mesh
- .. image:: ../images/image124.gif
- :align: center
+ .. image:: ../images/image124.gif
+ :align: center
.. centered::
Example of a quadrangular 2D mesh
* For meshing of 3D entities (**solid objects**):
* **Hexahedron (i,j,k)** meshing algorithm - solids are split into hexahedral elements thus forming a structured 3D mesh. The algorithm requires that 2D mesh generated on a solid could be considered as a mesh of a box, i.e. there should be eight nodes shared by three quadrangles and the rest nodes should be shared by four quadrangles.
- .. image:: ../images/hexa_ijk_mesh.png
- :align: center
+ .. image:: ../images/hexa_ijk_mesh.png
+ :align: center
.. centered::
Structured mesh generated by Hexahedron (i,j,k) on a solid bound by 16 faces
:ref:`constructing_meshes_page` page describes in detail how to apply meshing algorithms.
-**See Also** a sample TUI Script of a :ref:`tui_defining_meshing_algos` operation.
+**See Also** a sample TUI Script of a :ref:`tui_defining_meshing_algos` operation.
.. toctree::
To create a mesh on geometry, it is necessary to create a mesh object by choosing
* a geometrical shape produced in the Geometry module (*main shape*);
-* *meshing parameters*, including
+* *meshing parameters*, including
* :ref:`meshing algorithms <basic_meshing_algos_page>` and
* :ref:`hypotheses <about_hypo_page>` specifying constraints to be taken into account by the chosen meshing algorithms.
#. Select a geometrical object for meshing.
#. In the **Mesh** menu select **Create Mesh** or click *"Create Mesh"* button |img| in the toolbar.
- The following dialog box will appear:
+ The following dialog box will appear:
.. image:: ../images/createmesh-inv.png
:align: center
-
+
#. To filter off irrelevant meshing algorithms, you can select **Mesh Type** in the corresponding list from **Any, Hexahedral, Tetrahedral, Triangular** and **Quadrilateral** (there can be less items for the geometry of lower dimensions). Selection of a mesh type hides all meshing algorithms that cannot generate elements of this type.
#. Apply :ref:`meshing algorithms <basic_meshing_algos_page>` and :ref:`hypotheses <about_hypo_page>` which will be used to compute this mesh.
Click the *"Edit Hypothesis"* button |edt| to change the values for the current hypothesis.
Most 2D and 3D algorithms can work without hypotheses using default meshing parameters. Some algorithms do not require any hypotheses. After selection of an algorithm "Hypothesis" field of the dialog can contain:
-
+
* *\<Default\>* if the algorithm can work using default parameters.
* *\<None\>* if the algorithm requires a hypothesis defining its parameters.
* If the algorithm does not use hypotheses, this field is grayed.
-
+
After selection of an algorithm **Add. Hypothesis** field can contain:
-
+
* *\<None\>* if the algorithm can be tuned using an additional hypothesis.
* If the algorithm does not use additional hypotheses, this field is grayed.
-
+
Proceed in the same way with 2D and 1D Algorithms and Hypotheses that will be used to mesh faces and edges of your geometry. (Note that any object has edges, even if their existence is not apparent, for example, a sphere has 4 edges). Note that the choice of hypotheses and lower dimension algorithms depends on the higher dimension algorithm.
.. image:: ../images/image88.jpg
:align: center
- It contains:
-
+ It contains:
+
* a mesh name (*Mesh_mechanic*);
- * a reference to the geometrical object on the basis of which the mesh has been constructed (*mechanic*);
+ * a reference to the geometrical object on the basis of which the mesh has been constructed (*mechanic*);
* **Applied hypotheses** folder containing the references to the hypotheses chosen at the construction of the mesh;
- * **Applied algorithms** folder containing the references to the algorithms chosen at the construction of the mesh.
+ * **Applied algorithms** folder containing the references to the algorithms chosen at the construction of the mesh.
* **SubMeshes on Face** folder containing the sub-meshes defined on geometrical faces. There also can be folders for sub-meshes on vertices, edges, wires, shells, solids and compounds.
* **Groups of Faces** folder containing the groups of mesh faces. There also can be folders for groups of nodes, edges, volumes 0D elements and balls.
.. note::
* The list of sets of hypotheses can be shorter than in the above image depending on the geometry dimension.
-
+
Consider trying a sample script for construction of a mesh from our :ref:`TUI Scripts <tui_creating_meshes_page>` section.
####################
After the mesh object is created and all hypotheses are assigned and before :ref:`Compute <compute_anchor>` operation, it is possible to calculate the eventual mesh size. For this, select the mesh in the **Object Browser** and from the **Mesh** menu select **Evaluate**.
-The result of evaluation will be displayed in the following information box:
+The result of evaluation will be displayed in the following information box:
.. image:: ../images/mesh_evaluation_succeed.png
:align: center
For this, select the mesh in the Object Browser. From the **Mesh** menu select **Preview** or click "Preview" button |prv| in the toolbar or activate "Preview" item from the pop-up menu.
-Select **1D mesh** or **2D mesh** preview mode in the Preview dialog.
+Select **1D mesh** or **2D mesh** preview mode in the Preview dialog.
-.. image:: ../images/preview_mesh_1D.png
+.. image:: ../images/preview_mesh_1D.png
:align: center
.. centered::
1D mesh preview shows nodes computed on geometry edges
-.. image:: ../images/preview_mesh_2D.png
+.. image:: ../images/preview_mesh_2D.png
:align: center
.. centered::
*To change sub-mesh priority:*
-Choose **Change sub-mesh priority** from the **Mesh** menu or a pop-up menu. The opened dialog shows a list of sub-meshes in the order of their priority.
+Choose **Change sub-mesh priority** from the **Mesh** menu or a pop-up menu. The opened dialog shows a list of sub-meshes in the order of their priority.
There is an example of sub-mesh order modifications taking a Mesh created on a Box shape. The main Mesh object:
* *1D* **Wire discretisation** with **Number of Segments** = 20
-* *2D* **Triangle: Mefisto** with Hypothesis **Max Element Area**
-
+* *2D* **Triangle: NETGEN_2D** with Hypothesis **Max Element Area**
+
The first sub-mesh **Submesh_1** created on **Face_1** is:
* *1D* **Wire discretisation** with **Number of Segments** = 4
-* *2D* **Triangle: Mefisto** with Hypothesis **MaxElementArea** = 1200
+* *2D* **Triangle: NETGEN_2D** with Hypothesis **MaxElementArea** = 1200
The second sub-mesh **Submesh_2** created on **Face_2** is:
* *1D* **Wire discretisation** with **Number of Segments** = 8
-* *2D* **Triangle: Mefisto** with Hypothesis **MaxElementArea** = 1200
+* *2D* **Triangle: NETGEN_2D** with Hypothesis **MaxElementArea** = 1200
And the last sub-mesh **Submesh_3** created on **Face_3** is:
* *1D* **Wire discretisation** with **Number of Segments** = 12
-* *2D* **Triangle: Mefisto** with Hypothesis **MaxElementArea** = 1200
+* *2D* **Triangle: NETGEN_2D** with Hypothesis **MaxElementArea** = 1200
The sub-meshes become concurrent if they share sub-shapes that can be meshed with different algorithms (or different hypotheses). In the example, we have three sub-meshes with concurrent algorithms, because they have different hypotheses.
.. centered::
Mesh order SubMesh_3, SubMesh_2, SubMesh_1
-
+
.. image:: ../images/mesh_order_321_res.png
:align: center
Result mesh with order SubMesh_3, SubMesh_2, SubMesh_1
As we can see, each mesh computation has a different number of result
-elements and a different mesh discretization on the shared edges (the edges
+elements and a different mesh discretization on the shared edges (the edges
that are shared between **Face_1**, **Face_2** and **Face_3**)
Additionally, sub-mesh priority (the order of applied algorithms) can
be modified not only in a separate dialog box, but also in
the **Preview**. This helps to preview different mesh results,
-modifying the order of sub-meshes.
+modifying the order of sub-meshes.
.. image:: ../images/mesh_order_preview.png
:align: center
box appears. If you close this box and click "Compute" button again,
without previously changing meshing parameters, the mesh will NOT be
re-computed and the Mesh Computation information box will be shown
-with the same contents. (To fully re-compute the mesh, invoke
-:ref:`clear_mesh_anchor` command before).
+with the same contents. (To fully re-compute the mesh, invoke
+:ref:`clear_mesh_anchor` command before).
.. _meshing_result_anchor:
visualizing in magenta the geometrical entity meshing of which failed
(Name of this entity or its ID and type is shown in *Sub-shape* column).
-.. image:: ../images/failed_computation.png
+.. image:: ../images/failed_computation.png
:align: center
.. centered::
order to locally tune the hypotheses.
If the failure is caused by an invalid input mesh and the algorithm has
-found which mesh entities are bad, **Show bad Mesh**
+found which mesh entities are bad, **Show bad Mesh**
button appears in the dialog. Clicked, it shows the bad mesh entities in
the Viewer in magenta. Sometimes the shown mesh entities are too small
or/and hidden by other mesh elements. They can be seen after
Editing the mesh
################
-It is possible to :ref:`edit the mesh <modifying_meshes_page>` of a
+It is possible to :ref:`edit the mesh <modifying_meshes_page>` of a
lower dimension before generation of the mesh of a higher dimension.
For example you can generate a 2D mesh, modify it using e.g. :ref:`Pattern mapping <pattern_mapping_page>`, and then generate a 3D mesh basing on the modified 2D mesh. The workflow is as follows:
.. autosummary::
- StdMeshersBuilder_Triangle_MEFISTO.MaxElementArea
- StdMeshersBuilder_Triangle_MEFISTO.LengthFromEdges
+ StdMeshersBuilder_Triangle_NETGEN_2D.MaxElementArea
+ StdMeshersBuilder_Triangle_NETGEN_2D.LengthFromEdges
StdMeshersBuilder_Quadrangle.QuadrangleParameters
StdMeshersBuilder_Quadrangle.QuadranglePreference
StdMeshersBuilder_Quadrangle.TrianglePreference
Mesh.GetSubMesh
Mesh.ClearSubMesh
-Editing Meshes
+Editing Meshes
==============
.. autosummary::
Mesh.SetAutoColor
Mesh.GetAutoColor
Mesh.HasDuplicatedGroupNamesMED
-
+
Creating groups
===============
Mesh.AffectedElemGroupsInRegion
Mesh.DoubleNodesOnGroupBoundaries
Mesh.CreateFlatElementsOnFacesGroups
-
+
Renumbering nodes and elements
==============================
NETGEN_2D_1 = Mesh_1.Triangle(algo=smeshBuilder.NETGEN_2D,geom=Face_1)
- StdMeshers algorithms concerned are *REGULAR, PYTHON, COMPOSITE, MEFISTO, Hexa, QUADRANGLE, RADIAL_QUAD*.
+ StdMeshers algorithms concerned are *REGULAR, PYTHON, COMPOSITE, Hexa, QUADRANGLE, RADIAL_QUAD*.
SMESH Plugins provide such algorithms as: *NETGEN, NETGEN_FULL, FULL_NETGEN, NETGEN_1D2D3D, NETGEN_1D2D, NETGEN_2D, NETGEN_3D*.
.. code-block:: python
regular1D = mesh.Segment()
- mefisto = mesh.Triangle( smeshBuilder.MEFISTO )
+ netgen = mesh.Triangle( smeshBuilder.NETGEN_2D )
# use other triangle algorithm on a face -- a sub-mesh appears in the mesh
netgen = mesh.Triangle( smeshBuilder.NETGEN_1D2D, face )
.. code-block:: python
segLen10 = regular1D.LocalLength( 10. )
- maxArea = mefisto.LocalLength( 100. )
+ maxArea = netgen.LocalLength( 100. )
netgen.SetMaxSize( 20. )
netgen.SetFineness( smeshBuilder.VeryCoarse )
and hypotheses.
* Wire discretisation 1D algorithm
-
+
* :ref:`tui_1d_adaptive` hypothesis
* :ref:`Arithmetic Progression <tui_1d_arithmetic>` hypothesis
* :ref:`Geometric Progression <tui_1d_arithmetic>` hypothesis
* :ref:`Deflection and Number of Segments <tui_deflection_1d>` hypotheses
* :ref:`Start and End Length <tui_start_and_end_length>` hypothesis
* :ref:`tui_average_length` hypothesis
- * :ref:`tui_propagation` additional hypotheses
+ * :ref:`tui_propagation` additional hypotheses
* :ref:`Fixed Points 1D <tui_fixed_points>` hypothesis
-
-* Triangle: Mefisto 2D algorithm
-
- * :ref:`tui_max_element_area` hypothesis
- * :ref:`tui_length_from_edges` hypothesis
-
+
+* Triangle: netgen 2D algorithm
+
+ * :ref:`tui_max_element_area` hypothesis
+ * :ref:`tui_length_from_edges` hypothesis
+
* Quadrangle: Mapping 2D algorithm
-
- * :ref:`Quadrangle Parameters <tui_quadrangle_parameters>` hypothesis
+
+ * :ref:`Quadrangle Parameters <tui_quadrangle_parameters>` hypothesis
* :ref:`Radial Quadrangle 1D-2D <tui_radial_quadrangle>` algorithm
* NETGEN 3D algorithm
-
- * :ref:`tui_max_element_volume` hypothesis
+
+ * :ref:`tui_max_element_volume` hypothesis
* :ref:`Viscous layers <tui_viscous_layers>` hypotheses
* Hexahedron (i,j,k) 3D algorithm
:download:`Download this script <../../../examples/cartesian_algo.py>`
-.. _tui_use_existing_faces:
+.. _tui_use_existing_faces:
Usage of "Use Faces to be Created Manually" algorithm
#####################################################
msgid ""
"**Viscous Layers** and **Viscous Layers 2D** additional hypotheses can be"
" used by several 3D algorithms, for example Hexahedron(i,j,k), or 2D "
-"algorithms, for example Triangle (MEFISTO), correspondingly. These "
+"algorithms, for example Triangle (NETGEN_2D), correspondingly. These "
"hypotheses allow creation of layers of highly stretched elements, prisms "
"in 3D and quadrilaterals in 2D, near mesh boundary, which is beneficial "
"for high quality viscous computations."
# 96ff3177522e4abbac57c5166724c7db
#: ../../../../../../../SRC/SMESH_SRC/doc/salome/gui/SMESH/input/basic_meshing_algos.rst:22
msgid ""
-"**Triangle: Mefisto** meshing algorithm - splits faces into triangular "
+"**Triangle: NETGEN_2D** meshing algorithm - splits faces into triangular "
"elements."
msgstr ""
# 223a2036b61245b9a74d39e766c41171
#: ../../../../../../../SRC/SMESH_SRC/doc/salome/gui/SMESH/input/constructing_meshes.rst:242
-msgid "*2D* **Triangle: Mefisto** with Hypothesis **Max Element Area**"
+msgid "*2D* **Triangle: NETGEN_2D** with Hypothesis **Max Element Area**"
msgstr ""
# af68c57a6c6541e4a5ee565e61ce82a8
#: ../../../../../../../SRC/SMESH_SRC/doc/salome/gui/SMESH/input/constructing_meshes.rst:248
#: ../../../../../../../SRC/SMESH_SRC/doc/salome/gui/SMESH/input/constructing_meshes.rst:253
#: ../../../../../../../SRC/SMESH_SRC/doc/salome/gui/SMESH/input/constructing_meshes.rst:259
-msgid "*2D* **Triangle: Mefisto** with Hypothesis **MaxElementArea** =1200"
+msgid "*2D* **Triangle: NETGEN_2D** with Hypothesis **MaxElementArea** =1200"
msgstr ""
# dae60f1eb8924fd19c98131c2b68967a
# 5d5613278457472fbf4dd155ba325791
#: StdMeshersBuilder.MEFISTO:1
msgid ""
-"*Algorithm type* -- Triangle MEFISTO 2D algorithm, see "
+"*Algorithm type* -- Triangle NETGEN_2D algorithm, see "
":class:`~StdMeshersBuilder.StdMeshersBuilder_Triangle_MEFISTO`"
msgstr ""
#: ../../../../../../../SRC/SMESH_SRC/doc/salome/gui/SMESH/input/smesh_migration.rst:55
msgid ""
"StdMeshers algorithms concerned are **REGULAR, PYTHON, COMPOSITE, "
-"MEFISTO, Hexa, QUADRANGLE, RADIAL_QUAD**."
+"Hexa, QUADRANGLE, RADIAL_QUAD**."
msgstr ""
# ca97ecd8ffc74d798b1c512b44fb6b95
# 65a07e23b54b4b28a44b18cee2f6eb18
#: ../../../../../../../SRC/SMESH_SRC/doc/salome/gui/SMESH/input/tui_defining_hypotheses.rst:21
-msgid "Triangle: Mefisto 2D algorithm"
+msgid "Triangle: NETGEN 2D algorithm"
msgstr ""
# 88b6fff7e253450eb7ea36fb2fe5445d
mesh_add.png
mesh_add_sub.png
mesh_algo_hexa.png
- mesh_algo_mefisto.png
+ mesh_algo_tri.png
mesh_algo_quad.png
mesh_algo_regular.png
mesh_algo_tetra.png
mesh_tree_algo_0D.png
mesh_tree_algo_existing_2D.png
mesh_tree_algo_hexa.png
- mesh_tree_algo_mefisto.png
+ mesh_tree_algo_tri.png
mesh_tree_algo_polygon.png
mesh_tree_algo_prism.png
mesh_tree_algo_projection_2d.png
</message>
<message>
<source>ICON_PATTERN_2d</source>
- <translation>mesh_algo_mefisto.png</translation>
+ <translation>mesh_algo_tri.png</translation>
</message>
<message>
<source>ICON_PATTERN_3d</source>
algoMef = mesh.Triangle()
listHyp = algoMef.GetCompatibleHypothesis()
print(algoMef.GetName())
-algoMef.SetName("Triangle (Mefisto)")
+algoMef.SetName("Triangle (netgen)")
hypArea200 = algoMef.MaxElementArea(maxElementArea)
print(hypArea200.GetName())
maxElementArea = 30
algoMef = mesh1.Triangle()
-algoMef.SetName("MEFISTO_2D")
+algoMef.SetName("NETGEN_2D")
hypArea = algoMef.MaxElementArea(maxElementArea)
smesh.SetName(hypArea, "MaxElementArea_" + str(maxElementArea))
maxElementArea = 0.1
-mefisto2D = mesh.Triangle()
-hypArea = mefisto2D.MaxElementArea(maxElementArea)
+netgen2D = mesh.Triangle()
+hypArea = netgen2D.MaxElementArea(maxElementArea)
print(hypArea.GetName())
print(hypArea.GetId())
print(hypArea.GetMaxElementArea())
maxElementArea = 500
-mefisto2D = mesh.Triangle()
-hypArea = mefisto2D.MaxElementArea(maxElementArea)
+netgen2D = mesh.Triangle()
+hypArea = netgen2D.MaxElementArea(maxElementArea)
print(hypArea.GetName())
print(hypArea.GetId())
print(hypArea.GetMaxElementArea())
maxElementArea = 500
-mefisto2D = mesh.Triangle()
-hypArea = mefisto2D.MaxElementArea(maxElementArea)
+netgen2D = mesh.Triangle()
+hypArea = netgen2D.MaxElementArea(maxElementArea)
print(hypArea.GetName())
print(hypArea.GetId())
print(hypArea.GetMaxElementArea())
maxElementArea = 500
-mefisto2D = mesh.Triangle()
-hypArea = mefisto2D.MaxElementArea(maxElementArea)
+netgen2D = mesh.Triangle()
+hypArea = netgen2D.MaxElementArea(maxElementArea)
print(hypArea.GetName())
print(hypArea.GetId())
print(hypArea.GetMaxElementArea())
## maxElementArea = 80
-## mefisto2D = mesh.Triangle()
-## mefisto2D.SetName("MEFISTO_2D")
-## hypArea = mefisto2D.MaxElementArea(maxElementArea)
+## netgen2D = mesh.Triangle()
+## netgen2D.SetName("NETGEN_2D")
+## hypArea = netgen2D.MaxElementArea(maxElementArea)
## print hypArea.GetName()
## print hypArea.GetId()
## print hypArea.GetMaxElementArea()
print("-------------------------- LengthFromEdges")
-mefisto2D = mesh.Triangle()
-mefisto2D.SetName("MEFISTO_2D")
-hypLengthFromEdges = mefisto2D.LengthFromEdges()
+netgen2D = mesh.Triangle()
+netgen2D.SetName("NETGEN_2D")
+hypLengthFromEdges = netgen2D.LengthFromEdges()
print(hypLengthFromEdges.GetName())
print(hypLengthFromEdges.GetId())
smesh.SetName(hypLengthFromEdges, "LengthFromEdges")
print("Number of triangles : ", mesh.NbTriangles())
print("Number of volumes : ", mesh.NbVolumes())
print("Number of tetrahedrons : ", mesh.NbTetras())
-
+
else:
print("problem when computing the mesh")
print("-------------------------- LengthFromEdges")
-mefisto2D = mesh.Triangle()
-hypLengthFromEdge = mefisto2D.LengthFromEdges()
+netgen2D = mesh.Triangle()
+hypLengthFromEdge = netgen2D.LengthFromEdges()
print(hypLengthFromEdge.GetName())
print(hypLengthFromEdge.GetId())
smesh.SetName(hypLengthFromEdge,"LengthFromEdge")
//=============================================================================
/*!
- *
+ *
*/
//=============================================================================
//=============================================================================
/*!
- *
+ *
*/
//=============================================================================
//=============================================================================
/*!
- *
+ *
*/
//=============================================================================
void StdMeshers_LengthFromEdges::SetMode(int mode)
{
int oldMode = _mode;
- if (mode <= 0)
+ if (mode <= 0)
throw SALOME_Exception(LOCALIZED("mode must be positive"));
_mode = mode;
if (oldMode != _mode)
//=============================================================================
/*!
- *
+ *
*/
//=============================================================================
//=============================================================================
/*!
- *
+ *
*/
//=============================================================================
//=============================================================================
/*!
- *
+ *
*/
//=============================================================================
bool isOK = true;
int a;
isOK = static_cast<bool>(load >> a);
- if (isOK)
+ if (isOK)
this->_mode = a;
- else
+ else
load.clear(ios::badbit | load.rdstate());
return load;
}
//=============================================================================
/*!
- *
+ *
*/
//=============================================================================
//=============================================================================
/*!
- *
+ *
*/
//=============================================================================
<translation>mesh_tree_algo_hexa.png</translation>
</message>
<message>
- <source>ICON_SMESH_TREE_ALGO_MEFISTO_2D</source>
- <translation>mesh_tree_algo_mefisto.png</translation>
+ <source>ICON_SMESH_TREE_ALGO_TRI_2D</source>
+ <translation>mesh_tree_algo_tri.png</translation>
</message>
<message>
<source>ICON_SMESH_TREE_ALGO_PolygonPerFace_2D</source>
</message>
<message>
<source>ICON_SMESH_TREE_HYPO_TrianglePreference</source>
- <translation>mesh_tree_algo_mefisto.png</translation>
+ <translation>mesh_tree_algo_tri.png</translation>
</message>
<message>
<source>ICON_SMESH_TREE_HYPO_QuadraticMesh</source>