/[escript]/trunk/doc/examples/geotutorial/myfirstscript.py
ViewVC logotype

Diff of /trunk/doc/examples/geotutorial/myfirstscript.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3891 by caltinay, Fri Nov 12 01:19:02 2010 UTC revision 3892 by jfenwick, Tue Apr 10 08:57:23 2012 UTC
# Line 1  Line 1 
1    
2    from __future__ import print_function
3  ########################################################  ########################################################
4  #  #
5  # Copyright (c) 2003-2010 by University of Queensland  # Copyright (c) 2003-2010 by University of Queensland
# Line 29  T_bot=100 Line 31  T_bot=100
31  # generate n0 x n1 elements over [0,l0] x [0,l1]  # generate n0 x n1 elements over [0,l0] x [0,l1]
32  mydomain=Rectangle(l0=L0,l1=L1,n0=20,n1=20)  mydomain=Rectangle(l0=L0,l1=L1,n0=20,n1=20)
33  # print spatial dimension:  # print spatial dimension:
34  print "dimension = ",mydomain.getDim()  print("dimension = ",mydomain.getDim())
35  # get coordinates of points in domain:  # get coordinates of points in domain:
36  x=mydomain.getX()  x=mydomain.getX()
37  print x    print(x)
38  # set a function  # set a function
39  T_D=T_bot/L1*(L1-x[1])  T_D=T_bot/L1*(L1-x[1])
40  # save T_D for visualisation  # save T_D for visualisation

Legend:
Removed from v.3891  
changed lines
  Added in v.3892

  ViewVC Help
Powered by ViewVC 1.1.26