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

proc fenfloss_write_input {} {
    global confname file_name fenfloss_output_path icem_powermesh
    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)/fenfloss
    set project $file_name(project_dir)

    get_boco_topo

    if {![dialog .fenfloss "FENFLOSS" \
          "Please edit the following FENFLOSS options." {
               {bocofile -type path -title "bocofile" \
                        -help "Boundary Conditions File"}
               {outfile -type path -title "Output file" -help "Output File"}
           }]} return
  
    if {![file exists $domain]} {
        errormsg "Domain file $domain doesn't exist"
        return
    }

    set command "\"$fenfloss_output_path\" -dom \"$domain\" -b \"$bocofile\""
    set command "$command -p \"$project\" \"$outfile\""

    runxcom ICEM-CFD/FENFLOSS-Interface $command "" 1 0
}
