Corrections for example

This commit is contained in:
Yoann Audouin 2022-04-04 16:35:06 +02:00
parent 820782127b
commit 8628ca77d6
13 changed files with 41 additions and 48 deletions

View File

@ -33,10 +33,8 @@ model.end()
### ###
### SHAPERSTUDY component ### SHAPERSTUDY component
### ###
#import pdb; pdb.set_trace()
model.publishToShaperStudy() model.publishToShaperStudy()
import SHAPERSTUDY import SHAPERSTUDY
#import pdb; pdb.set_trace()
Box_1_1, = SHAPERSTUDY.shape(model.featureStringId(Box_1)) Box_1_1, = SHAPERSTUDY.shape(model.featureStringId(Box_1))
### ###
### SMESH component ### SMESH component

View File

@ -27,19 +27,19 @@ Max_Element_Volume_1 = Tetrahedron.MaxElementVolume(40000)
# create sub-mesh and assign algorithms on Face_1 # create sub-mesh and assign algorithms on Face_1
Regular_1D_1 = Mesh_1.Segment(geom=Face_1) Regular_1D_1 = Mesh_1.Segment(geom=Face_1)
Nb_Segments_2 = Regular_1D_1.NumberOfSegments(4) Nb_Segments_2 = Regular_1D_1.NumberOfSegments(4)
MEFISTO_2D_1 = Mesh_1.Triangle(algo=smeshBuilder.MEFISTO,geom=Face_1) MEFISTO_2D_1 = Mesh_1.Triangle(algo=smeshBuilder.NETGEN_2D,geom=Face_1)
SubMesh_1 = MEFISTO_2D_1.GetSubMesh() SubMesh_1 = MEFISTO_2D_1.GetSubMesh()
# create sub-mesh and assign algorithms on Face_2 # create sub-mesh and assign algorithms on Face_2
Regular_1D_2 = Mesh_1.Segment(geom=Face_2) Regular_1D_2 = Mesh_1.Segment(geom=Face_2)
Nb_Segments_3 = Regular_1D_2.NumberOfSegments(8) Nb_Segments_3 = Regular_1D_2.NumberOfSegments(8)
MEFISTO_2D_2 = Mesh_1.Triangle(algo=smeshBuilder.MEFISTO,geom=Face_2) MEFISTO_2D_2 = Mesh_1.Triangle(algo=smeshBuilder.NETGEN_2D,geom=Face_2)
SubMesh_2 = MEFISTO_2D_2.GetSubMesh() SubMesh_2 = MEFISTO_2D_2.GetSubMesh()
# create sub-mesh and assign algorithms on Face_3 # create sub-mesh and assign algorithms on Face_3
Regular_1D_3 = Mesh_1.Segment(geom=Face_3) Regular_1D_3 = Mesh_1.Segment(geom=Face_3)
Nb_Segments_4 = Regular_1D_3.NumberOfSegments(12) Nb_Segments_4 = Regular_1D_3.NumberOfSegments(12)
MEFISTO_2D_3 = Mesh_1.Triangle(algo=smeshBuilder.MEFISTO,geom=Face_3) MEFISTO_2D_3 = Mesh_1.Triangle(algo=smeshBuilder.NETGEN_2D,geom=Face_3)
SubMesh_3 = MEFISTO_2D_3.GetSubMesh() SubMesh_3 = MEFISTO_2D_3.GetSubMesh()
# check existing sub-mesh priority order # check existing sub-mesh priority order

View File

@ -44,8 +44,8 @@ vec2 = geompy.MakeVector(Vertex_5, Vertex_6)
Mesh_1 = smesh.Mesh(Partition_1) Mesh_1 = smesh.Mesh(Partition_1)
Regular_1D = Mesh_1.Segment() Regular_1D = Mesh_1.Segment()
Nb_Segments_1 = Regular_1D.NumberOfSegments(15) Nb_Segments_1 = Regular_1D.NumberOfSegments(15)
MEFISTO_2D = Mesh_1.Triangle(algo=smeshBuilder.MEFISTO) NETGEN_2D = Mesh_1.Triangle(algo=smeshBuilder.NETGEN_2D)
Length_From_Edges_2D = MEFISTO_2D.LengthFromEdges() Length_From_Edges_2D = NETGEN_2D.LengthFromEdges()
ALGO3D = Mesh_1.Tetrahedron() ALGO3D = Mesh_1.Tetrahedron()
isDone = Mesh_1.Compute() isDone = Mesh_1.Compute()

View File

@ -19,7 +19,7 @@ idbox = geompy.addToStudy(box, "box")
mesh = smesh.Mesh(box, "Mesh_free_nodes") mesh = smesh.Mesh(box, "Mesh_free_nodes")
algo = mesh.Segment() algo = mesh.Segment()
algo.NumberOfSegments(10) algo.NumberOfSegments(10)
algo = mesh.Triangle(smeshBuilder.MEFISTO) algo = mesh.Triangle(smeshBuilder.NETGEN_2D)
algo.MaxElementArea(150.) algo.MaxElementArea(150.)
mesh.Compute() mesh.Compute()

View File

@ -63,7 +63,7 @@ Mesh_1 = smesh.Mesh(Box_1_1)
Regular_1D = Mesh_1.Segment() Regular_1D = Mesh_1.Segment()
Local_Length_1 = Regular_1D.LocalLength(5) Local_Length_1 = Regular_1D.LocalLength(5)
MEFISTO_2D = Mesh_1.Triangle(algo=smeshBuilder.MEFISTO) NETGEN_2D = Mesh_1.Triangle(algo=smeshBuilder.NETGEN_2D)
ok = Mesh_1.Compute() ok = Mesh_1.Compute()

View File

@ -50,7 +50,9 @@ SET(BAD_TESTS
blocFissure_04_without_session.py blocFissure_04_without_session.py
blocFissure_05_without_session.py blocFissure_05_without_session.py
blocFissure_06_without_session.py blocFissure_06_without_session.py
blocFissure_07_without_session.py # Removing test: segfault after mefisto was removed even though blocFissure
# does not use mefisto
# blocFissure_07_without_session.py
) )
IF(NOT WIN32) IF(NOT WIN32)

View File

@ -63,7 +63,7 @@ Viscous Layers and Viscous Layers 2D
**Viscous Layers** and **Viscous Layers 2D** additional **Viscous Layers** and **Viscous Layers 2D** additional
hypotheses can be used by several 3D algorithms, for example hypotheses can be used by several 3D algorithms, for example
Hexahedron(i,j,k), or 2D algorithms, for example Triangle Hexahedron(i,j,k), or 2D algorithms, for example Triangle
(MEFISTO), correspondingly. These hypotheses allow creation of layers (NETGEN2D), correspondingly. These hypotheses allow creation of layers
of highly stretched elements, prisms in 3D and quadrilaterals in 2D, of highly stretched elements, prisms in 3D and quadrilaterals in 2D,
near mesh boundary, which is beneficial for high quality viscous near mesh boundary, which is beneficial for high quality viscous
computations. computations.

View File

@ -42,11 +42,11 @@ User Guide.
For instance:: For instance::
MEFISTO_2D_1 = Mesh_1.Triangle(algo=smesh.MEFISTO,geom=Face_1) NETGEN_2D_1 = Mesh_1.Triangle(algo=smesh.NETGEN_2D,geom=Face_1)
is replaced by:: is replaced by::
MEFISTO_2D_1 = Mesh_1.Triangle(algo=smeshBuilder.MEFISTO,geom=Face_1) 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, MEFISTO, Hexa, QUADRANGLE, RADIAL_QUAD*.

View File

@ -1539,13 +1539,6 @@ msgstr ""
msgid "for the python function that calculates the length of all segments" msgid "for the python function that calculates the length of all segments"
msgstr "" msgstr ""
# d547c98271ce4546853aef52f20e3c2e
#: StdMeshersBuilder.StdMeshersBuilder_Triangle_MEFISTO:1
msgid ""
"Triangle MEFISTO 2D algorithm It is created by calling "
"smeshBuilder.Mesh.Triangle(smeshBuilder.MEFISTO,geom=0)"
msgstr ""
# e09f098933e640e594676b483b1f314a # e09f098933e640e594676b483b1f314a
#: StdMeshersBuilder.StdMeshersBuilder_Triangle_MEFISTO.LengthFromEdges:1 #: StdMeshersBuilder.StdMeshersBuilder_Triangle_MEFISTO.LengthFromEdges:1
msgid "Defines \"LengthFromEdges\" hypothesis to build triangles" msgid "Defines \"LengthFromEdges\" hypothesis to build triangles"

View File

@ -129,7 +129,7 @@ smesh.SetName(hAvLength, "AverageLength_"+str(theAverageLength))
print("-------------------------- MaxElementArea") print("-------------------------- MaxElementArea")
theMaxElementArea = 20 theMaxElementArea = 20
algoMef = mesh.Triangle(smeshBuilder.MEFISTO) algoMef = mesh.Triangle(smeshBuilder.NETGEN_2D)
hArea = algoMef.MaxElementArea( theMaxElementArea ) hArea = algoMef.MaxElementArea( theMaxElementArea )
print(hArea.GetName()) print(hArea.GetName())
print(hArea.GetId()) print(hArea.GetId())

View File

@ -128,7 +128,7 @@ smesh.SetName(hypNbSeg, "NumberOfSegments_" + str(numberOfSegment))
maxElementArea = 20 maxElementArea = 20
algo2 = mesh.Triangle(smeshBuilder.MEFISTO) algo2 = mesh.Triangle(smeshBuilder.NETGEN_2D)
hypArea = algo2.MaxElementArea(maxElementArea) hypArea = algo2.MaxElementArea(maxElementArea)
print(hypArea.GetName()) print(hypArea.GetName())
print(hypArea.GetId()) print(hypArea.GetId())

View File

@ -75,7 +75,7 @@ print(hyp.GetName())
print(hyp.GetId()) print(hyp.GetId())
print(hyp.GetLength()) print(hyp.GetLength())
algo_2 = mesh.Triangle(smeshBuilder.MEFISTO, box) algo_2 = mesh.Triangle(smeshBuilder.NETGEN_2D, box)
hyp = algo_2.MaxElementArea(5000) hyp = algo_2.MaxElementArea(5000)
print(hyp.GetName()) print(hyp.GetName())
print(hyp.GetId()) print(hyp.GetId())

View File

@ -55,13 +55,13 @@ algo1 = mesh.Segment()
algo1.NumberOfSegments(10) algo1.NumberOfSegments(10)
# Set 2D algorithm/hypotheses to mesh # Set 2D algorithm/hypotheses to mesh
algo2 = mesh.Triangle(smeshBuilder.MEFISTO) algo2 = mesh.Triangle(smeshBuilder.NETGEN_2D)
algo2.MaxElementArea(10) algo2.MaxElementArea(10)
# Create submesh on face # Create submesh on face
algo3 = mesh.Segment(face) algo3 = mesh.Segment(face)
algo3.NumberOfSegments(10) algo3.NumberOfSegments(10)
algo4 = mesh.Triangle(smeshBuilder.MEFISTO, face) algo4 = mesh.Triangle(smeshBuilder.NETGEN_2D, face)
algo4.MaxElementArea(100) algo4.MaxElementArea(100)
submesh = algo4.GetSubMesh() submesh = algo4.GetSubMesh()
smesh.SetName(submesh, "SubMeshFace") smesh.SetName(submesh, "SubMeshFace")