
# ICEM CFD solver interface routine for the manager.
#
# Copyright (c) 1993-1995 ICEM Systems.

proc firev8_write_input {} {
    global confname file_name firev8_output_path icem_powermesh s2u_path
    global file_name
    
    set domain [domain_select $file_name(domains_dir) "Select an unstructured domain." unstruct 0]
    if {$domain == {}} return

    set outfile $file_name(transfer_dir)/firev8.flm
    set ascii 0
    set scale 0
    set x 1.0
    set y 1.0
    set z 1.0

    if {![dialog .firev8 "FIRE_V8" \
	  "Please edit the following options for Fire .flm file." {
	       {ascii -title "Create ascii file" \
		-opt {{"Yes" 1} {"No" 0}} -help "Create ascii file"}
               {scale -opt {{"Yes" 1} {"No" 0}} -title "Scaling"\
                       -help "Scaling of coordinates of geometry file"}
               {x -type string -active {$scale} -title "x scaling factor" \
                        -help "Enter x scaling factor"}
               {y -type string -active {$scale} -title "y scaling factor" \
                        -help "Enter y scaling factor"}
               {z -type string -active {$scale} -title "z scaling factor" \
                        -help "Enter z scaling factor"}
	       {outfile -type path -title "Output file" -help "Output file"}
	   }]} return
    
   
     set command "\"$firev8_output_path\" -dom \"$domain\""
     if {$ascii} {set command "$command -asc"}
     if {$scale} {set command "$command -scale $x,$y,$z"}
     set command "$command \"$outfile\"" 
    
    runcom $command ""
}
