Changeset 4797 for branches/uq/gui/scripts/field.tcl
- Timestamp:
- Nov 26, 2014, 4:45:43 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/uq/gui/scripts/field.tcl
r4520 r4797 427 427 set min "" 428 428 set max "" 429 blt::vector tmp zero430 429 431 430 foreach cname [array names _comp2dims] { … … 453 452 454 453 if {$log} { 455 # on a log scale, use abs value and ignore 0's 454 blt::vector tmp zero 455 # on a log scale, use abs value and ignore zeros 456 456 $vname dup tmp 457 457 $vname dup zero 458 zero expr {tmp == 0} ;# find the 0's458 zero expr {tmp == 0} ;# find the zeros 459 459 tmp expr {abs(tmp)} ;# get the abs value 460 tmp expr {tmp + zero*max(tmp)} ;# replace 0 's with abs max460 tmp expr {tmp + zero*max(tmp)} ;# replace 0s with abs max 461 461 set axisMin [blt::vector expr min(tmp)] 462 462 set axisMax [blt::vector expr max(tmp)] 463 blt::vector destroy tmp zero 463 464 } else { 464 465 set axisMin [$vname min] … … 477 478 } 478 479 } 479 2D - 3D{480 default { 480 481 if {[info exists _comp2limits($cname)]} { 481 482 array set limits $_comp2limits($cname) … … 519 520 } 520 521 } 521 blt::vector destroy tmp zero522 522 set val [$_field get "${axis}axis.min"] 523 523 if {"" != $val && "" != $min} { … … 536 536 return [list $min $max] 537 537 } 538 539 538 540 539 # ---------------------------------------------------------------------- … … 1513 1512 set dim 0 1514 1513 foreach axis {x y z} { 1515 foreach {min max} [$mesh limits $axis] { 1514 foreach {min max} [$mesh limits $axis] { 1516 1515 if { $min < $max } { 1517 1516 incr dim … … 1702 1701 } 1703 1702 1704 foreach key [array names data] { 1705 if {$key == "vtkdata"} { 1706 if {1} { 1707 set f [open /tmp/$cname.vtk "w"] 1708 fconfigure $f -translation binary -encoding binary 1709 puts -nonewline $f $data(vtkdata) 1710 close $f 1711 } 1712 } else { 1713 puts stderr "$key = \"$data($key)\"" 1703 if 0 { 1704 foreach key [array names data] { 1705 if {$key == "vtkdata"} { 1706 if 0 { 1707 set f [open /tmp/$cname.vtk "w"] 1708 fconfigure $f -translation binary -encoding binary 1709 puts -nonewline $f $data(vtkdata) 1710 close $f 1711 } 1712 } else { 1713 puts stderr "$key = \"$data($key)\"" 1714 } 1714 1715 } 1715 1716 }
Note: See TracChangeset
for help on using the changeset viewer.