Back to index

salome-smesh  6.5.0
Functions | Variables
ex04_cube5tetraHexa Namespace Reference

Functions

def localMesh

Variables

int arete = 100
int arete0 = 0
 arete1 = arete
int arete2 = 2
int arete3 = 3
tuple box_tetra1 = MakeBox(arete0, arete0, 0, arete1, arete1, arete)
tuple box_ijk1 = MakeBox(arete1, arete0, 0, arete2, arete1, arete)
tuple box_hexa = MakeBox(arete1, arete1, 0, arete2, arete2, arete)
tuple box_ijk2 = MakeBox(arete2, arete1, 0, arete3, arete2, arete)
tuple box_tetra2 = MakeBox(arete2, arete2, 0, arete3 ,arete3, arete)
tuple piece_cpd = MakeCompound([box_tetra1, box_ijk1, box_hexa, box_ijk2, box_tetra2])
tuple piece = MakeGlueFaces(piece_cpd, 1e-4)
tuple piece_id = addToStudy(piece, "ex04_cube5tetraHexa")
tuple mixed = smesh.Mesh(piece, "ex04_cube5tetraHexa:mixed")
tuple algo = mixed.Segment()

Function Documentation

def ex04_cube5tetraHexa.localMesh (   b,
  hyp 
)

Definition at line 88 of file ex04_cube5tetraHexa.py.

00088 
00089 def localMesh(b, hyp):
00090     box   = GetInPlace(piece, b)
00091     faces = SubShapeAll(box, ShapeType["FACE"])
00092 
00093     i = 0
00094     n = len(faces)
00095     while i<n:
00096         algo = mixed.Triangle(faces[i])
00097         if hyp:
00098             algo.MaxElementArea(80)
00099         else:
00100             algo.LengthFromEdges()
00101         i = i + 1
00102 
00103     algo = mixed.Tetrahedron(smesh.NETGEN, box)
00104     algo.MaxElementVolume(400)
00105 
00106 localMesh(box_tetra1, 1)
00107 localMesh(box_tetra2, 0)
00108 
00109 # Mesh calculus
00110 # -------------
00111 
00112 mixed.Compute()

Variable Documentation

tuple ex04_cube5tetraHexa.algo = mixed.Segment()

Definition at line 77 of file ex04_cube5tetraHexa.py.

Definition at line 38 of file ex04_cube5tetraHexa.py.

Definition at line 40 of file ex04_cube5tetraHexa.py.

Definition at line 41 of file ex04_cube5tetraHexa.py.

Definition at line 42 of file ex04_cube5tetraHexa.py.

Definition at line 43 of file ex04_cube5tetraHexa.py.

Definition at line 52 of file ex04_cube5tetraHexa.py.

Definition at line 50 of file ex04_cube5tetraHexa.py.

Definition at line 54 of file ex04_cube5tetraHexa.py.

Definition at line 48 of file ex04_cube5tetraHexa.py.

Definition at line 56 of file ex04_cube5tetraHexa.py.

tuple ex04_cube5tetraHexa.mixed = smesh.Mesh(piece, "ex04_cube5tetraHexa:mixed")

Definition at line 75 of file ex04_cube5tetraHexa.py.

tuple ex04_cube5tetraHexa.piece = MakeGlueFaces(piece_cpd, 1e-4)

Definition at line 63 of file ex04_cube5tetraHexa.py.

Definition at line 61 of file ex04_cube5tetraHexa.py.

tuple ex04_cube5tetraHexa.piece_id = addToStudy(piece, "ex04_cube5tetraHexa")

Definition at line 65 of file ex04_cube5tetraHexa.py.