Skip to content

Commit 0494d05

Browse files
author
Dilawar Singh
committedMay 11, 2016
Changed few things.
1 parent 8d9bc1b commit 0494d05

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed
 

‎unsorted/test_gsolve.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import moose
2+
import sys
3+
24
compt = moose.CubeMesh('/compt')
35
compt.volume = 1e-20
46

@@ -20,8 +22,9 @@
2022
# This does not.
2123
#func = moose.Function('/func')
2224

23-
func.expr = '100*(1 + sin(0.1*t))'
25+
func.expr = '100*(1 + sin(0.1*t) + cos(x0) )'
2426
func.mode = 1
27+
moose.connect( a, 'nOut', func.x[0], 'input' )
2528
moose.connect(func, 'valueOut', a, 'setN')
2629

2730
reac = moose.Reac('/compt/reac')
@@ -43,6 +46,8 @@
4346

4447
# plots
4548
import pylab
46-
pylab.plot(atab.vector)
47-
pylab.plot(btab.vector)
49+
pylab.plot(atab.vector, label = 'a')
50+
pylab.plot(btab.vector, label = 'b' )
51+
pylab.legend( framealpha=0.4)
52+
pylab.savefig( '%s.png' % sys.argv[0] )
4853
pylab.show()

0 commit comments

Comments
 (0)
Please sign in to comment.