# Diff of /trunk/doc/examples/cookbook/wavesolver2d001.py

revision 2666 by jfenwick, Mon Sep 7 00:06:15 2009 UTC revision 2667 by jfenwick, Thu Sep 17 01:49:11 2009 UTC
# Line 1  Line 1
1
2  ########################################################  ########################################################
3  #  #
4  # Copyright (c) 2003-2009 by University of Queensland  # Copyright (c) 2009 by University of Queensland
5  # Earth Systems Science Computational Center (ESSCC)  # Earth Systems Science Computational Center (ESSCC)
6  # http://www.uq.edu.au/esscc  # http://www.uq.edu.au/esscc
7  #  #
# Line 11  Line 11
11  #  #
12  ########################################################  ########################################################
13
14  __copyright__="""Copyright (c) 2003-2009 by University of Queensland  __copyright__="""Copyright (c) 2009 by University of Queensland
15  Earth Systems Science Computational Center (ESSCC)  Earth Systems Science Computational Center (ESSCC)
16  http://www.uq.edu.au/esscc  http://www.uq.edu.au/esscc
17  Primary Business: Queensland, Australia"""  Primary Business: Queensland, Australia"""
# Line 47  tend=0.5    #end time Line 47  tend=0.5    #end time
47  h=(1./5.)*sqrt(rho/(lam+2*mu))*(mx/ndx)  h=(1./5.)*sqrt(rho/(lam+2*mu))*(mx/ndx)
48  #Check to make sure number of time steps is not too large.  #Check to make sure number of time steps is not too large.
49  print "Time step size= ",h, "Expected number of outputs= ",tend/h  print "Time step size= ",h, "Expected number of outputs= ",tend/h
50  proceeder = raw_input("Is this ok?(y/n)")
51    #uncomment the following lines to give the user a chance to stop
52    #proceeder = raw_input("Is this ok?(y/n)")
53  #Exit if user thinks too many outputs.  #Exit if user thinks too many outputs.
54  if proceeder == "n":  #if proceeder == "n":
55     sys.exit()  #   sys.exit()
56
57  U0=0.01 # amplitude of point source  U0=0.01 # amplitude of point source
58  #  spherical source at middle of bottom face  #  spherical source at middle of bottom face

Legend:
 Removed from v.2666 changed lines Added in v.2667

 ViewVC Help Powered by ViewVC 1.1.26