source: anuga_validation/okushiri_2005/test_caching_of_set_quantity.py @ 6196

Last change on this file since 6196 was 6196, checked in by ole, 15 years ago

Used refactoring from changeset:6191 to allow reuse of ANUGA mesh in fitting
by way of

File size: 1.5 KB
Line 
1"""Validation of the AnuGA implementation of the shallow water wave equation.
2
3This script sets up Okushiri Island benchmark as published at the
4
5THE THIRD INTERNATIONAL WORKSHOP ON LONG-WAVE RUNUP MODELS
6June 17-18 2004
7Wrigley Marine Science Center
8Catalina Island, California
9http://www.cee.cornell.edu/longwave/
10
11
12The validation data was downloaded and made available in this directory
13for convenience but the original data is available at
14http://www.cee.cornell.edu/longwave/index.cfm?page=benchmark&problem=2
15where a detailed description of the problem is also available.
16
17
18Run create_okushiri.py to process the boundary condition and build a the
19mesh before running this script.
20
21
22"""
23# NOTE: Cache should be cleared before running this script
24
25
26# Module imports
27from anuga.shallow_water import Domain
28import project
29
30
31#-------------------------
32# Create Domain from mesh
33#-------------------------
34domain = Domain(project.mesh_filename, use_cache=True, verbose=True)
35
36
37#-------------------------
38# Initial Conditions
39#-------------------------
40print 'Set elevation and cache'
41domain.set_quantity('elevation',
42                    filename=project.bathymetry_filename,
43                    alpha=0.02,                   
44                    verbose=True,
45                    use_cache=True)
46
47print 'Try to read in via cache'
48domain.set_quantity('elevation',
49                    filename=project.bathymetry_filename,
50                    alpha=0.02,                   
51                    verbose=True,
52                    use_cache=True)
Note: See TracBrowser for help on using the repository browser.