TABLE OF CONTENTS


::pwtk::dmi::load_fromDMI

SYNOPSIS

proc ::pwtk::dmi::load_fromDMI {dmi {clear_existing 1}} {

PURPOSE

Load the input data from existing dynmat.x input file.

If clear_existing == 1, then the current input will be cleared, but otherwise the data will be simply added to the existing data.

ARGUMENTS

SOURCE

    ::pwtk::fileMustExist $dmi "dynmat.x input"

    if { [::pwtk::is_true $clear_existing] } {
        # clear the current dynmat.x input data ...
        ::pwtk::input::clear DYNMAT
    }

    # read the namelists & replace INPUT with DYNMAT

    set output [regsub INPUT \
                    [::pwtk::readNamelists $dmi INPUT] DYNMAT]
                
    # dynmat.x must contain an INPUT namelist
    if { $output == "" } {
        ::pwtk::error "input file \"$dmi\" does not appear to be a dynmat.x input file" 1
    }
    
    eval $output
    variable input_flow_list
    ::pwtk::input::namelists_ityp2atmSymb_ $input_flow_list
}