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

proc acri_write_input {} {
    global confname acri_output_path icem_powermesh
    global file_name

    get_boco_topo

    set outfile $file_name(transfer_dir)/acri
    set domainfile $file_name(domains_dir)/hex.uns

    if {![dialog .acri "ACRi" \
	    "Please edit the following ACRi options." {
	{bocofile -type path -title "Boco file" \
		-help "Boundary condition file"}
        {domainfile -type path -title "Domain file" -help "Domain file"}
	{outfile -type path -title "Output file" -help "Output file"}
    }]} return
	
    if {![file exists $domainfile]} {
	errormsg "Domain file doesn't exist!"
	return
    }	    
    if {![file exists $bocofile]} {
	errormsg "Boundary condition file doesn't exist!"
	return
    }
    
    set command "\"$acri_output_path\" -b \"$bocofile\""
    set command "$command -d \"$domainfile\" -o \"$outfile\""

    runcom $command ""
}
















