2 # Generated python file of Graph GraphBugEditor
6 # Graph creation of GraphBugEditor
7 def DefGraphBugEditor() :
8 GraphBugEditor = Graph( 'GraphBugEditor' )
9 GraphBugEditor.SetName( 'GraphBugEditor' )
10 GraphBugEditor.SetAuthor( 'Nicolas Crouzet & JR' )
11 GraphBugEditor.SetComment( '' )
12 GraphBugEditor.Coords( 0 , 0 )
14 # Creation of Factory Nodes
16 # Creation of InLine Nodes
17 Pycompute_power_1 = []
18 Pycompute_power_1.append( 'def compute_power(nitermax,eosflux,espeigenval) : ' )
19 Pycompute_power_1.append( ' return 1 ' )
20 compute_power_1 = GraphBugEditor.INode( 'compute_power' , Pycompute_power_1 )
21 compute_power_1.SetName( 'compute_power_1' )
22 compute_power_1.SetAuthor( '' )
23 compute_power_1.SetComment( 'Compute Node' )
24 compute_power_1.Coords( 226 , 103 )
25 Icompute_power_1nitermax = compute_power_1.InPort( 'nitermax' , 'long' )
26 Icompute_power_1epsflux = compute_power_1.InPort( 'epsflux' , 'long' )
27 Icompute_power_1espeigenval = compute_power_1.InPort( 'espeigenval' , 'long' )
28 Icompute_power_1Gate = compute_power_1.GetInPort( 'Gate' )
29 Ocompute_power_1return = compute_power_1.OutPort( 'return' , 'long' )
30 Ocompute_power_1Gate = compute_power_1.GetOutPort( 'Gate' )
32 # Creation of Loop Nodes
34 PyLoop.append( 'def Loop(it,itMax): ' )
35 PyLoop.append( ' return it,itMax ' )
37 PyMoreLoop.append( 'def More(it,itMax): ' )
38 PyMoreLoop.append( ' if it<=itMax : ' )
39 PyMoreLoop.append( ' DoLoop=1 ' )
40 PyMoreLoop.append( ' else: ' )
41 PyMoreLoop.append( ' DoLoop=0 ' )
42 PyMoreLoop.append( ' return DoLoop,it,itMax ' )
44 PyNextLoop.append( 'def Next(it,itMax): ' )
45 PyNextLoop.append( ' it+=1 ' )
46 PyNextLoop.append( ' return it,itMax ' )
47 Loop,EndLoop = GraphBugEditor.LNode( 'Loop' , PyLoop , 'More' , PyMoreLoop , 'Next' , PyNextLoop )
48 EndLoop.SetName( 'EndLoop' )
49 EndLoop.SetAuthor( '' )
50 EndLoop.SetComment( 'Compute Node' )
51 EndLoop.Coords( 426 , 161 )
53 EndLoop.SetPyFunction( 'EndLoop' , PyEndLoop )
54 ILoopDoLoop = Loop.GetInPort( 'DoLoop' )
55 ILoopit = Loop.InPort( 'it' , 'int' )
56 ILoopitMax = Loop.InPort( 'itMax' , 'int' )
57 ILoopGate = Loop.GetInPort( 'Gate' )
58 OLoopDoLoop = Loop.GetOutPort( 'DoLoop' )
59 OLoopit = Loop.GetOutPort( 'it' )
60 OLoopitMax = Loop.GetOutPort( 'itMax' )
61 IEndLoopDoLoop = EndLoop.GetInPort( 'DoLoop' )
62 IEndLoopit = EndLoop.GetInPort( 'it' )
63 IEndLoopitMax = EndLoop.GetInPort( 'itMax' )
64 IEndLoopGate = EndLoop.GetInPort( 'Gate' )
65 OEndLoopDoLoop = EndLoop.GetOutPort( 'DoLoop' )
66 OEndLoopit = EndLoop.GetOutPort( 'it' )
67 OEndLoopitMax = EndLoop.GetOutPort( 'itMax' )
68 OEndLoopGate = EndLoop.GetOutPort( 'Gate' )
69 Loop.SetName( 'Loop' )
71 Loop.SetComment( 'Compute Node' )
72 Loop.Coords( 21 , 161 )
75 LLoopitEndLoopit = GraphBugEditor.Link( OLoopit , IEndLoopit )
77 LLoopitMaxEndLoopitMax = GraphBugEditor.Link( OLoopitMax , IEndLoopitMax )
79 LLoopGatecompute_power_1Gate = GraphBugEditor.Link( OLoopGate , Icompute_power_1Gate )
85 # Input Ports of the graph
86 #Icompute_power_1nitermax = compute_power_1.GetInPort( 'nitermax' )
87 #Icompute_power_1epsflux = compute_power_1.GetInPort( 'epsflux' )
88 #Icompute_power_1espeigenval = compute_power_1.GetInPort( 'espeigenval' )
90 # Output Ports of the graph
91 #OEndLoopit = EndLoop.GetOutPort( 'it' )
92 #OEndLoopitMax = EndLoop.GetOutPort( 'itMax' )
93 #Ocompute_power_1return = compute_power_1.GetOutPort( 'return' )
97 GraphBugEditor = DefGraphBugEditor()