COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
utest-mesh-actions-shortest-edge.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 mesh = root.create_component('mesh','cf3.mesh.Mesh')
8 mesh_generator = root.create_component("mesh_generator","cf3.mesh.SimpleMeshGenerator")
9 mesh_generator.options().set("mesh",mesh.uri())
10 mesh_generator.options().set("nb_cells",[10])
11 mesh_generator.options().set("lengths",[10.])
12 mesh_generator.options().set("offsets",[3.2])
13 mesh_generator.execute()
14 
15 short_edge_action = root.create_component('ShortestEdge', 'cf3.mesh.actions.ShortestEdge')
16 short_edge_action.mesh = mesh
17 short_edge_action.execute()
18 
19 if abs(short_edge_action.properties.h_xi - 1.) > 1e-10:
20  raise Exception('Incorrect length')
Send comments to:
COOLFluiD Web Admin