
# The GUI for Autohex.
#
# Copyright (c) 1993, 1994 Pacific Marketing and Consulting
# Author:  Wayne A. Christopher, wayne@pmac.com
#          Pacific Marketing and Consulting, Berkeley, California

proc grid_smooth {domain} {
    global no_exit_job smoother_path grid_smoother_params
    
    set tetin [directory smoother]/smoother_tetin
    write_tetin_file $tetin 1
    
    mess "Running smoother...\n"
    set no_exit_job smoother
    
    set cmd [list $smoother_path -tetin $tetin -domain $domain]
    foreach p [array names grid_smoother_params] {
	lappend cmd -$p $grid_smoother_params($p)
    }
    
    set retval [run_background $cmd "" 1]
    
    unset no_exit_job
    
    return $retval
}
