\page tui_defining_hypotheses_page Defining Hypotheses and Algorithms
+This page provides example codes of \ref tui_defining_meshing_algos
+"defining algorithms" and hypotheses.
+<ul>
+<li>Wire discretisation ( smesh.REGULAR ) 1D algorithm
+ <ul>
+ <li>\ref tui_1d_arithmetic "Arithmetic 1D" hypothesis</li>
+ <li>\ref tui_deflection_1d "Deflection 1D and Number of Segments" hypotheses</li>
+ <li>\ref tui_start_and_end_length "Start and End Length" hypotheses</li>
+ <li>\ref tui_average_length "Local Length"</li>
+ <li>\ref tui_propagation "Propagation" additional hypothesis </li>
+ <li>\ref tui_fixed_points "Fixed Points 1D" hypothesis</li>
+ </ul>
+</li>
+<li>Triangle (Mefisto) 2D algorithm
+ <ul>
+ <li>\ref tui_max_element_area "Max Element Area" hypothesis </li>
+ <li>\ref tui_length_from_edges "Length from Edges"
+ hypothesis </li>
+ </ul>
+</li>
+<li>Tetrahedron (Netgen) 3D algorithm
+ <ul>
+ <li> \ref tui_max_element_volume "Max. Element Volume"hypothesis </li>
+ <li> \ref tui_viscous_layers "Viscous layers"</li>
+ </ul>
+</li>
+<li>\ref tui_projection "Projection Algorithms"</li>
+<li>\ref tui_radial_quadrangle "Radial Quadrangle 1D2D"</li>
+<li>Quadrangle (Mapping) 2D algorithm
+ <ul>
+ <li> \ref tui_quadrangle_parameters "Quadrangle Parameters" hypothesis </li>
+ </ul>
+</li>
+<li>\ref tui_import "Use Existing Elements"</li>
+</ul>
+<br>
+
<h2>Defining 1D Hypotheses</h2>
<br>
\anchor tui_1d_arithmetic
-<h3>1D Arithmetic</h3>
+<h3>Arithmetic 1D</h3>
\code
import geompy
# assign algorithms
algo1D = tetra.Segment()
algo2D = tetra.Triangle()
-algo3D = tetra.Tetrahedron(smesh.NETGEN)
+algo3D = tetra.Tetrahedron()
# assign 1D and 2D hypotheses
algo1D.NumberOfSegments(7)
# create a Mefisto 2D algorithm for faces
algo2D = tetra.Triangle()
-# create a Netgen 3D algorithm for solids
-algo3D = tetra.Tetrahedron(smesh.NETGEN)
+# create a 3D algorithm for solids
+algo3D = tetra.Tetrahedron()
# define hypotheses
algo1D.Arithmetic1D(1, 4)
# compute the mesh
tetra.Compute()
-# 3. Create a tetrahedral mesh on the box with NETGEN_2D3D algorithm
-tetraN = smesh.Mesh(box, "Box : tetrahedrical mesh by NETGEN_2D3D")
-
-# create a Netgen_2D3D algorithm for solids
-algo3D = tetraN.Tetrahedron(smesh.FULL_NETGEN)
-
-# define hypotheses
-n23_params = algo3D.Parameters()
-
-# compute the mesh
-tetraN.Compute()
\endcode
<br>
\endcode
+<h3>Projection 1D2D</h3>
+
+\code
+# Project triangles from one meshed face to another mesh on the same box
+
+from smesh import *
+
+# Prepare geometry
+
+# Create a box
+box = geompy.MakeBoxDXDYDZ(100, 100, 100)
+
+# Get geom faces to mesh with triangles in the 1ts and 2nd meshes
+faces = geompy.SubShapeAll(box, geompy.ShapeType["FACE"])
+# 2 adjacent faces of the box
+Face_1 = faces[2]
+Face_2 = faces[0]
+
+geompy.addToStudy( box, 'box' )
+geompy.addToStudyInFather( box, Face_1, 'Face_1' )
+geompy.addToStudyInFather( box, Face_2, 'Face_2' )
+
+# Make the source mesh with Netgem2D
+src_mesh = Mesh(Face_1, "Source mesh")
+src_mesh.Segment().NumberOfSegments(15)
+src_mesh.Triangle()
+src_mesh.Compute()
+
+# Mesh the target mesh using the algoritm Projection1D2D
+tgt_mesh = smesh.Mesh(Face_2, "Target mesh")
+tgt_mesh.Projection1D2D().SourceFace(Face_1,src_mesh)
+tgt_mesh.Compute()
+\endcode
+
<br>
\anchor tui_fixed_points
tgtMesh.Compute()
\endcode
-\n Other meshing algorithms:
+\anchor tui_viscous_layers
+<h2>Viscous layers construction</h2>
+
+\code
+from smesh import *
+SetCurrentStudy(salome.myStudy)
+
+X = geompy.MakeVectorDXDYDZ( 1,0,0 )
+O = geompy.MakeVertex( 100,50,50 )
+plane = geompy.MakePlane( O, X, 200 ) # plane YZ
+
+box = geompy.MakeBoxDXDYDZ(200,100,100)
+
+shape = geompy.MakeHalfPartition( box, plane )
+
+faces = geompy.SubShapeAllSorted(shape, geompy.ShapeType["FACE"])
+face1 = faces[1]
+ignoreFaces = [ faces[0], faces[-1]]
+
+geompy.addToStudy( shape, "shape" )
+geompy.addToStudyInFather( shape, face1, "face1")
+
+
+mesh = Mesh(shape, "CFD")
+
+mesh.Segment().NumberOfSegments( 4 )
+
+mesh.Triangle()
+mesh.Quadrangle(face1)
+mesh.Compute()
+algo3D = mesh.Tetrahedron()
+
+thickness = 20
+numberOfLayers = 10
+stretchFactor = 1.5
+layersHyp = algo3D.ViscousLayers(thickness,numberOfLayers,stretchFactor,ignoreFaces)
+
+mesh.Compute()
+
+mesh.MakeGroup("Tetras",VOLUME,FT_ElemGeomType,"=",Geom_TETRA)
+mesh.MakeGroup("Pyras",VOLUME,FT_ElemGeomType,"=",Geom_PYRAMID)
+mesh.MakeGroup("Prims",VOLUME,FT_ElemGeomType,"=",Geom_PENTA)
+
+\endcode
-<ul>
-<li>\subpage tui_defining_blsurf_hypotheses_page</li>
-<li>\subpage tui_defining_ghs3d_hypotheses_page</li>
-</ul>
*/