Exemple #1
0
def create_default_avl(*args, **kwargs):
    avl = AVL(cwd=runs_dir)
    avl.load_case_from_file(join(runs_dir, 'vanilla.avl'))
    from pyavl.runutils import RunConfig
    rc = RunConfig(runcase=RunCase.get_case_from_avl(avl.avl))
    runoutput = rc.run(progressbar=False)
    avl.run_cases[0].runoutput = runoutput
    return avl
Exemple #2
0
 def run_config(self, info):
     print 'running...'
     runcase = info.object.avl.run_cases[0]
     runcaseconfig = RunConfig(runcase=runcase)
     out = runcaseconfig.configure_traits(kind='livemodal')
     if not out:
         return
     output = runcaseconfig.run()
     runcase.runoutput.variable_names = output.variable_names
     runcase.runoutput.variable_values = output.variable_values
     runcase.runoutput.eigenmodes = output.eigenmodes
     runcase.runoutput.eigenmatrix = output.eigenmatrix
Exemple #3
0
 def run_config(self, info):
     print 'running...'
     runcase = info.object.avl.run_cases[0]
     runcaseconfig = RunConfig(runcase=runcase)
     out = runcaseconfig.configure_traits(kind='livemodal')
     if not out:
         return
     output = runcaseconfig.run()
     runcase.runoutput.variable_names = output.variable_names
     runcase.runoutput.variable_values = output.variable_values
     runcase.runoutput.eigenmodes = output.eigenmodes
     runcase.runoutput.eigenmatrix = output.eigenmatrix
Exemple #4
0
                                              editable=False),
                         show_label=False),
                    Item('object.matrix.matrix',
                         editor=TabularEditor(adapter=EigenMatrixAdapter(),
                                              operations=[],
                                              editable=False),
                         show_label=False)),
                resizable=True)


if __name__ == '__main__':
    from pyavl.avl import AVL
    from pyavl.runutils import RunConfig
    from pyavl import runs_dir, join
    avl = AVL(cwd=runs_dir)
    filename = join(runs_dir, 'allegro.avl')
    avl.load_case_from_file(filename)
    rv = RunConfig(runcase=RunCase.get_case_from_avl(avl.avl))
    print rv.configure_traits(kind='livemodal')
    print 'rv configured'
    output = rv.run()
    print output
    print 'rv ran'
    opv = OutputPlotViewer(runoutput=output)
    opv.configure_traits()

    ovv = OutputVariablesViewer(runoutput=output)
    ovv.configure_traits()

    osv = OutputSystemViewer(runoutput=output)
    osv.configure_traits()
Exemple #5
0
    view = View(Item('run_number', editor=RangeEditor(mode='spinner')),
                Group(Item('modes_array',
                     editor=TabularEditor(adapter=ModesAdapter(), operations=[], editable=False),
                     show_label=False),
                Item('object.matrix.matrix',
                     editor=TabularEditor(adapter=EigenMatrixAdapter(), operations=[], editable=False),
                     show_label=False)),
                resizable=True
                )

if __name__ == '__main__':
    from pyavl.avl import AVL
    from pyavl.runutils import RunConfig
    from pyavl import runs_dir, join
    avl = AVL(cwd=runs_dir)
    filename = join(runs_dir, 'allegro.avl')
    avl.load_case_from_file(filename)
    rv = RunConfig(runcase=RunCase.get_case_from_avl(avl.avl))
    print rv.configure_traits(kind='livemodal')
    print 'rv configured'
    output = rv.run()
    print output
    print 'rv ran'
    opv = OutputPlotViewer(runoutput=output)
    opv.configure_traits()
    
    ovv = OutputVariablesViewer(runoutput=output)
    ovv.configure_traits()
    
    osv = OutputSystemViewer(runoutput=output)
    osv.configure_traits()