Line | |
---|
1 | """Script for fitting data points to mesh |
---|
2 | """ |
---|
3 | |
---|
4 | from pyvolution.pmesh2domain import pmesh_to_domain_instance |
---|
5 | from caching import cache |
---|
6 | from pyvolution.shallow_water import Domain, Reflective_boundary |
---|
7 | |
---|
8 | |
---|
9 | meshname = 'swan_mesh.msh' |
---|
10 | |
---|
11 | domain = cache(pmesh_to_domain_instance, (meshname, Domain), |
---|
12 | dependencies = [meshname], |
---|
13 | verbose = True) |
---|
14 | |
---|
15 | |
---|
16 | domain.set_quantity('elevation', |
---|
17 | filename = 'cross_sections.pts', |
---|
18 | use_cache = True, |
---|
19 | verbose = True) |
---|
20 | |
---|
21 | print domain.get_boundary_tags() |
---|
22 | Br = Reflective_boundary(domain) |
---|
23 | domain.set_boundary( {'exterior': Br} ) |
---|
24 | |
---|
25 | |
---|
26 | domain.set_name('swan_river') |
---|
27 | domain.set_datadir('.') |
---|
28 | domain.store = True |
---|
29 | |
---|
30 | for t in domain.evolve(yieldstep = 1, finaltime = 1): |
---|
31 | domain.write_time() |
---|
Note: See
TracBrowser
for help on using the repository browser.