File: reorder.cmd

package info (click to toggle)
evolver 2.70+ds-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 17,148 kB
  • sloc: ansic: 127,395; makefile: 209; sh: 98
file content (37 lines) | stat: -rw-r--r-- 1,140 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// reorder.cmd

// Surface Evolver command script illustrating how to re-order
// element storage in memory, to test the effect of memory
// storage on execution speed.  Also, in preparation for 
// using the "renumber_all" command to re-number elements.

// This example reorders vertices in diagonal order, by their
// distance along the (1,1,1) direction.  Other elements are
// reordered according to their vertices.

// Programmer: Ken Brakke, brakke@susqu.edu  www.susqu.edu/brakke

// Usage: reorder

define vertex attribute vertex_order_key real
define edge attribute edge_order_key real
define facet attribute facet_order_key real
define body attribute body_order_key real
define facetedge attribute facetedge_order_key real

reorder := {
  set vertex vertex_order_key x+y+z;
  set edge ee edge_order_key min(ee.vertex,vertex_order_key);
  set facetedge fe facetedge_order_key fe.edge[1].edge_order_key;
  set facet ff facet_order_key min(ff.vertex,vertex_order_key);
  set body bb body_order_key min(bb.facet,facet_order_key);
  reorder_storage;
  }

// End reorder.cmd

// Usage: reorder