Changeset 3178
- Timestamp:
- Jun 19, 2006, 12:28:45 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
development/dam_2006/run_dam.py
r3145 r3178 12 12 13 13 14 #-------------------------------------------------------------------------------# Import necessary modules 15 #------------------------------------------------------------------------------- 14 #---------------------------------------------------------------------------- 15 # Import necessary modules 16 #---------------------------------------------------------------------------- 16 17 17 18 # Standard modules … … 32 33 33 34 34 #----------------------------------------------------------------------------- --35 #----------------------------------------------------------------------------- 35 36 # Setup archiving of simulations 36 #----------------------------------------------------------------------------- --37 #----------------------------------------------------------------------------- 37 38 38 39 copy (project.codedirname, project.outputtimedir + 'project.py') 39 40 copy (project.codedir + 'run_dam.py', project.outputtimedir + 'run_dam.py') 40 copy (project.codedir + 'create_mesh.py', project.outputtimedir + 'create_mesh.py') 41 copy (project.codedir + 'create_mesh.py', 42 project.outputtimedir + 'create_mesh.py') 41 43 print'output dir', project.outputtimedir 42 44 … … 45 47 screen_error_name = project.outputtimedir + "screen_error.txt" 46 48 47 #----------------------------------------------------------------------------- --49 #----------------------------------------------------------------------------- 48 50 # Create the triangular mesh 49 #----------------------------------------------------------------------------- --51 #----------------------------------------------------------------------------- 50 52 51 53 create_mesh.generate() # this creates the mesh 52 54 53 #----------------------------------------------------------------------------- --55 #----------------------------------------------------------------------------- 54 56 # Setup computational domain 55 #----------------------------------------------------------------------------- --57 #----------------------------------------------------------------------------- 56 58 domain = Domain(project.mesh_filename, use_cache = False, verbose = True) 57 59 … … 65 67 domain.set_quantities_to_be_stored(['stage', 'xmomentum', 'ymomentum']) 66 68 67 #----------------------------------------------------------------------------- --69 #----------------------------------------------------------------------------- 68 70 # Setup initial conditions 69 #----------------------------------------------------------------------------- --71 #----------------------------------------------------------------------------- 70 72 71 73 tide = 0.0 … … 88 90 domain.set_boundary( {'wall': Br, 'wave': Br} ) 89 91 90 #----------------------------------------------------------------------------- --92 #----------------------------------------------------------------------------- 91 93 # Evolve system through time 92 #----------------------------------------------------------------------------- --94 #----------------------------------------------------------------------------- 93 95 import time 94 96 t0 = time.time()
Note: See TracChangeset
for help on using the changeset viewer.