~njansson/dolfin/hpc

« back to all changes in this revision

Viewing changes to demo/pde/elasticity/python/demo.py

  • Committer: Garth N. Wells
  • Date: 2008-03-29 09:34:25 UTC
  • Revision ID: gnw20@cam.ac.uk-20080329093425-3ea2vhjvccq56zvi
Add some basic build & install instructions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
109
109
pde = LinearPDE(a, L, mesh, bcs)
110
110
sol = pde.solve()
111
111
 
 
112
# Plot solution
 
113
plot(sol, mode="displacement")
 
114
interactive()
 
115
 
112
116
# Save solution to VTK format
113
117
vtk_file = File("elasticity.pvd")
114
118
vtk_file << sol
117
121
xml_file = File("elasticity.xml")
118
122
xml_file << sol
119
123
 
120
 
 
121
 
# Plot solution
122
 
plot(sol, mode="displacement")
123
 
interactive()