COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
utest-mesh-triangulator.py
Go to the documentation of this file.
1 import sys
2 import coolfluid as cf
3 
4 root = cf.Core.root()
5 
6 # 2D triangles test
7 mesh2d = root.create_component('mesh2d','cf3.mesh.Mesh')
8 mesh_generator = root.create_component("mesh_generator","cf3.mesh.SimpleMeshGenerator")
9 mesh_generator.options().set("mesh",mesh2d.uri())
10 mesh_generator.options().set("nb_cells",[100,100])
11 mesh_generator.options().set("lengths",[1.,1.])
12 mesh_generator.options().set("offsets",[0.,0.])
13 mesh_generator.execute()
14 
15 triangulator = root.create_component('triangulator', 'cf3.mesh.MeshTriangulator')
16 triangulator.options().set('mesh', mesh2d)
17 triangulator.execute()
18 
19 mesh2d.write_mesh(cf.URI('triangulated.msh'))
Send comments to:
COOLFluiD Web Admin