/[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 3346 by caltinay, Fri Nov 12 01:19:02 2010 UTC revision 3409 by ahallam, Thu Dec 9 07:01:23 2010 UTC
# Line 80  q=whereZero(x[1]-my)+whereZero(x[1])+whe Line 80  q=whereZero(x[1]-my)+whereZero(x[1])+whe
80  ###############################################ESCRIPT PDE CONSTRUCTION  ###############################################ESCRIPT PDE CONSTRUCTION
81    
82  mypde=LinearPDE(domain)  mypde=LinearPDE(domain)
83  mypde.setValue(A=kro,Y=4.*3.1415*G*rho,q=q,r=0)  mypde.setValue(A=kro,Y=4.*3.1415*G*rho)
84    mypde.setValue(q=q,r=0)
85  mypde.setSymmetryOn()  mypde.setSymmetryOn()
86  sol=mypde.getSolution()  sol=mypde.getSolution()
87    
88  g_field=grad(sol) #The graviational accelleration g.  g_field=grad(sol) #The gravitational acceleration g.
89  g_fieldz=g_field*[0,1] #The vertical component of the g field.  g_fieldz=g_field*[0,1] #The vertical component of the g field.
90  gz=length(g_fieldz) #The magnitude of the vertical component.  gz=length(g_fieldz) #The magnitude of the vertical component.
91  # Save the output to file.  # Save the output to file.

Legend:
Removed from v.3346  
changed lines
  Added in v.3409

  ViewVC Help
Powered by ViewVC 1.1.26