COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
utest-mesh-make-boundary-global.py
Go to the documentation of this file.
1 import sys
2 import coolfluid as cf
3 
4 env = cf.Core.environment()
5 env.log_level = 4
6 env.only_cpu0_writes = True
7 
8 root = cf.Core.root()
9 mesh = root.create_component('mesh','cf3.mesh.Mesh')
10 
11 
12 blocks = root.create_component('model', 'cf3.mesh.BlockMesh.BlockArrays')
13 points = blocks.create_points(dimensions = 2, nb_points = 4)
14 points[0] = [0., 0.]
15 points[1] = [1., 0.]
16 points[2] = [1., 1.]
17 points[3] = [0., 1.]
18 block_nodes = blocks.create_blocks(1)
19 block_nodes[0] = [0, 1, 2, 3]
20 block_subdivs = blocks.create_block_subdivisions()
21 block_subdivs[0] = [10,10]
22 gradings = blocks.create_block_gradings()
23 gradings[0] = [1., 1., 1., 1.]
24 blocks.create_patch_nb_faces(name = 'bottom', nb_faces = 1)[0] = [0, 1]
25 blocks.create_patch_nb_faces(name = 'right', nb_faces = 1)[0] = [1, 2]
26 blocks.create_patch_nb_faces(name = 'top', nb_faces = 1)[0] = [2, 3]
27 blocks.create_patch_nb_faces(name = 'left', nb_faces = 1)[0] = [3, 0]
28 blocks.partition_blocks(nb_partitions = 2, direction = 0)
29 blocks.partition_blocks(nb_partitions = 2, direction = 1)
30 blocks.create_mesh(mesh.uri())
31 
32 make_boundary_global = root.create_component('MakeBoundaryGlobal', 'cf3.mesh.actions.MakeBoundaryGlobal')
33 make_boundary_global.mesh = mesh
34 make_boundary_global.execute()
35 
36 writer = root.create_component('MshWriter', 'cf3.mesh.gmsh.Writer')
37 writer.enable_overlap = True
38 writer.mesh = mesh
39 writer.file = cf.URI('make-boundary-global.msh')
40 writer.execute()
Send comments to:
COOLFluiD Web Admin