- Timestamp:
- Mar 11, 2013, 3:00:50 PM (12 years ago)
- Location:
- trunk/examples/zoo/mesh
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/zoo/mesh/mesh.tcl
r3456 r3483 21 21 set mesh "output.unirect2d" 22 22 23 $driver put $mesh.dim 2 23 24 $driver put $mesh.about.label "unirect2d mesh" 24 25 $driver put $mesh.units "m" … … 48 49 "oldcloud" { 49 50 set mesh output.cloud 51 $driver put $mesh.dim 2 50 52 $driver put $mesh.about.label "cloud (deprecated)" 51 53 $driver put $mesh.units "m" … … 66 68 set mesh output.mesh 67 69 68 $driver put $mesh.about.label "cloud in mesh" 70 $driver put $mesh.dim 2 71 $driver put $mesh.about.label "cloud in unstructured mesh" 69 72 $driver put $mesh.units "m" 70 73 $driver put $mesh.hide "yes" … … 76 79 } 77 80 } 78 $driver put $mesh.cloud.points $points 81 $driver put $mesh.unstructured.points $points 82 $driver put $mesh.unstructured.celltypes "" 79 83 } 80 84 "regular" { 81 85 set mesh output.mesh 82 86 87 $driver put $mesh.dim 2 83 88 $driver put $mesh.about.label "uniform grid mesh" 84 89 $driver put $mesh.units "m" … … 95 100 set mesh output.mesh 96 101 102 $driver put $mesh.dim 2 97 103 $driver put $mesh.about.label "irregular grid mesh" 98 104 $driver put $mesh.units "m" … … 105 111 set mesh output.mesh 106 112 113 $driver put $mesh.dim 2 107 114 $driver put $mesh.about.label "hybrid regular and irregular grid mesh" 108 115 $driver put $mesh.units "m" … … 118 125 set mesh output.mesh 119 126 120 $driver put $mesh.about.label "triangular mesh" 121 $driver put $mesh.units "m" 122 $driver put $mesh.hide "yes" 123 124 $driver put $mesh.triangles.points $points 125 $driver put $mesh.triangles.indices $triangles 127 $driver put $mesh.dim 2 128 $driver put $mesh.about.label "triangles in unstructured mesh" 129 $driver put $mesh.units "m" 130 $driver put $mesh.hide "yes" 131 132 $driver put $mesh.unstructured.points $points 133 $driver put $mesh.unstructured.triangles $triangles 126 134 } 127 135 "generic" { 128 136 set mesh output.mesh 129 137 138 $driver put $mesh.dim 2 130 139 $driver put $mesh.about.label "nodes and elements mesh" 131 140 $driver put $mesh.units "m" … … 146 155 set mesh output.mesh 147 156 157 $driver put $mesh.dim 2 148 158 $driver put $mesh.about.label "Unstructured Grid" 149 159 $driver put $mesh.units "m" … … 151 161 152 162 $driver put $mesh.unstructured.points $points 153 set celltypes {}154 163 set cells {} 155 164 foreach { a b c } $triangles { 156 lappend celltypes "5" 157 append cells "3 $a $b $c\n" 165 append cells "$a $b $c\n" 158 166 } 159 167 $driver put $mesh.unstructured.cells $cells 160 $driver put $mesh.unstructured.celltypes $celltypes168 $driver put $mesh.unstructured.celltypes "triangle" 161 169 } 162 170 "cells" { 163 171 set mesh output.mesh 164 172 165 $driver put $mesh.about.label "homogeneous cells" 166 $driver put $mesh.units "m" 167 $driver put $mesh.hide "yes" 168 169 $driver put $mesh.cells.points $points 170 $driver put $mesh.cells.triangles $triangles 173 $driver put $mesh.dim 2 174 $driver put $mesh.about.label "unstructured grid with heterogeneous cells" 175 $driver put $mesh.units "m" 176 $driver put $mesh.hide "yes" 177 178 set celltypes {} 179 foreach { a b c } $triangles { 180 append cells "$a $b $c\n" 181 append celltypes "triangle\n" 182 } 183 $driver put $mesh.unstructured.points $points 184 $driver put $mesh.unstructured.celltypes "triangle" 185 $driver put $mesh.unstructured.cells $cells 171 186 } 172 187 "vtkmesh" { … … 177 192 close $f 178 193 194 $driver put $mesh.dim 2 179 195 $driver put $mesh.about.label "vtk mesh" 180 196 $driver put $mesh.units "m" … … 190 206 close $f 191 207 $driver put output.field(substrate).component.vtk "$data" 192 #$driver put output.field(substrate).about.view "contour" 193 # save the updated XML describing the run... 208 $driver put output.string.current "" 194 209 Rappture::result $driver 195 210 exit 0 -
trunk/examples/zoo/mesh/tool.xml
r3456 r3483 2 2 <run> 3 3 <tool> 4 <title>mesh</title>5 <about>Example of a Rappture <mesh> object.6 7 Meshes define the geometry for field. Here are variety of 2D mesh types.8 See <mesh> and <field> elements for details.9 10 When you click the Simulate button, the inputs will be used to generate output fields.11 </about>12 13 4 <about>Press Simulate to view results.</about> 14 5 <command>tclsh @tool/mesh.tcl @driver</command> … … 67 58 <option> 68 59 <about> 69 <label>mesh as cell types</label>70 <description>Unstructured 2 dimensional grid ofcells.</description>60 <label>mesh as hybid cell types</label> 61 <description>Unstructured 2D grid of (possibly) hybrid cells.</description> 71 62 </about> 72 63 <value>cells</value>
Note: See TracChangeset
for help on using the changeset viewer.