/[escript]/trunk/doc/examples/cookbook/example10a.py
ViewVC logotype

Diff of /trunk/doc/examples/cookbook/example10a.py

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

revision 3148 by jfenwick, Fri Sep 3 02:09:47 2010 UTC revision 3195 by ahallam, Wed Sep 22 00:28:04 2010 UTC
# Line 25  Author: Antony Hallam antony.hallam@uqco Line 25  Author: Antony Hallam antony.hallam@uqco
25    
26  ############################################################FILE HEADER  ############################################################FILE HEADER
27  # example10a.py  # example10a.py
28  # Model of gravitational Potential.  # Model of gravitational Potential for a gravity POLE.
29    
30  #######################################################EXTERNAL MODULES  #######################################################EXTERNAL MODULES
31  # To solve the problem it is necessary to import the modules we require.  # To solve the problem it is necessary to import the modules we require.
# Line 84  mypde.setSymmetryOn() Line 84  mypde.setSymmetryOn()
84  sol=mypde.getSolution()  sol=mypde.getSolution()
85    
86  g_field=grad(sol) #The graviational accelleration g.  g_field=grad(sol) #The graviational accelleration g.
87  g_fieldz=g_field*[0,1] #  g_fieldz=g_field*[0,1] #The vertical component of the g field.
88  gz=length(g_fieldz)  gz=length(g_fieldz) #The magnitude of the vertical component.
89  # Save the output to file.  # Save the output to file.
90  saveVTK(os.path.join(save_path,"ex10a.vtu"),\  saveVTK(os.path.join(save_path,"ex10a.vtu"),\
91          grav_pot=sol,g_field=g_field,g_fieldz=g_fieldz,gz=gz)          grav_pot=sol,g_field=g_field,g_fieldz=g_fieldz,gz=gz)

Legend:
Removed from v.3148  
changed lines
  Added in v.3195

  ViewVC Help
Powered by ViewVC 1.1.26