Example 13c: Generating a Vornoi mesh of a cube.

This example calculates a 3D Voronoi mesh from a created Delaunay tetrahedralisation.


The comfile run by this example is as follows:

#Example_13c Calculating a 3D cube Voronoi mesh

fem
fem de para;r;voronoi;example;    # Redefine parameters for Voronoi arrays.
fem de coor 3,1;                  # Define 3D rectangular Cartesian coordinates.
fem de reg;r;voronoi;example;     # Region1 for a cube, region 2 for Voronoi.
fem de base;r;voronoi;example;    # 4 basis fns. 2 linear for a cube, 2 simplex for Voronoi.
fem de node;r;cube;example reg 1; # 8 nodes for a cube
fem de elem;r;cube;example reg 1; # 1 element
fem de node;c delaunay reg 1 target 2 division 3 radius 0.05;
#                                 # Calculate Delaunay tetrahedra in region 2.
fem de mesh;c delaunay basis 3 B_nodes boundary IB_nodes internal_boundary reg 2;
#                                 # Calculate node groups for boundary and internal_boundary.
fem de node;w;delaunay reg 2;     # Write nodes for Delaunay tetrahedra.
fem de elem;w;delaunay reg 2;     # Write elements for Delaunay tetrahedra.
fem update delaunay reg 2;
fem de mesh;c voronoi B_nodes boundary IB_nodes internal_boundary reg 2;
#                                 # Calculate Voronoi.
fem export voronoi reg 2;         # Write export file for cmgui.

# NB/ Currently different solution on linux platform than on other platforms
# Perhaps due to different rounding on different platforms...

Additional testing commands:

fem list voronoi total reg 2

Files used by this example are:

Name                  Modified     Size

example_13c.com 03-Feb-2004 1.3k cube.ipelem 20-Jan-2003 404 cube.ipnode 20-Jan-2003 1.7k delaunay.ipelem 26-Aug-2004 686k delaunay.ipnode 26-Aug-2004 111k delaunay_voro.exelem 26-Aug-2004 834k delaunay_voro.exnode 26-Aug-2004 172k test_output.com 05-Jul-2005 29 voronoi.ipbase 20-Jan-2003 4.4k voronoi.ippara 27-Jun-2003 6.0k voronoi.ipregi 20-Jan-2003 93

Download the entire example:

Name                      Modified     Size

examples_1_13_13c.tar.gz 18-Aug-2006 111k

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmSuccessSun Mar 6 00:04:25 20164
cm-debugSuccessSat Mar 5 00:42:06 201634
mips-irix
cmSuccessWed Apr 9 11:22:23 200846
cm-debugSuccessWed Apr 9 11:28:16 2008351
cm-debug-clear-mallocSuccessWed Apr 9 11:34:13 2008356
cm-debug-clear-malloc7SuccessWed Apr 9 11:40:11 2008356
cm64SuccessWed Apr 9 11:41:01 200849
cm64-debugSuccessWed Apr 9 11:47:30 2008389
cm64-debug-clear-mallocSuccessWed Apr 9 11:53:56 2008384
rs6000-aix
cmSuccessWed Mar 4 01:12:56 20098
cm-debugSuccessMon Mar 2 01:28:45 200990
cm64SuccessWed Mar 4 01:12:16 20097
cm64-debugSuccessTue Mar 3 01:35:54 2009114
x86_64-linux
cmSuccessSun Mar 6 00:01:11 20162
cm-debugSuccessSat Mar 5 00:03:53 201615

Testing status by file:


Html last generated: Sun Mar 6 05:50:07 2016

Input last modified: Tue Jul 5 09:43:37 2005


CMISS Help / Examples / 1 / 13 / 13c