1 # -*- coding: utf-8 -*-
2 ####### Concentric (Spherical) Grid Test ##########
7 doc = hexablock.addDocument ("Spherical Grid Test")
9 # Simple Spherical Grid -----
14 grid0 = doc.makeSphericalTop(nbLayers, crit)
15 grid0.saveVtk("makeSphericalTop.vtk")
17 # Uniform Spherical Grid -----
19 center = doc.addVertex (0, 0, 10)
20 vx = doc.addVector (1, 0, 0)
21 vz = doc.addVector (0, 1, 1)
24 grid1 = doc.makeSphericalUni(center, vx, vz, rayon, nbLayers, crit);
25 grid1.saveVtk("makeSphericalUni.vtk")
27 # Custom Spherical Grid-----
29 tr = [10, 20, 30, 40] # a list of radiuses (one radius for each layer)
31 grid2 = doc.makeSpherical (center, vx, vz, tr, crit)
32 grid2.saveVtk("makeSpherical.vtk")