- Timestamp:
- Nov 11, 2010, 11:55:52 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/shallow_water/test_forcing.py
r7844 r8068 591 591 domain.forcing_terms.append(R) 592 592 593 # This will test that time used in the forcing function takes 594 # startime into account. 595 domain.starttime = 5.0 596 597 domain.time = 7. 593 # This will test that time is set to starttime in set_starttime 594 domain.set_starttime(5.0) 598 595 599 596 domain.compute_forcing_terms() … … 602 599 (3*domain.get_time() + 7)/1000) 603 600 assert num.allclose(domain.quantities['stage'].explicit_update[1], 604 (3*(domain.time + domain.starttime) + 7)/1000) 605 606 # Using internal time her should fail 607 assert not num.allclose(domain.quantities['stage'].explicit_update[1], 608 (3*domain.time + 7)/1000) 601 (3*domain.get_starttime() + 7)/1000) 609 602 610 603 assert num.allclose(domain.quantities['stage'].explicit_update[0], 0) … … 657 650 domain.forcing_terms.append(R) 658 651 659 # This will test that time used in the forcing function takes 660 # startime into account. 661 domain.starttime = 5.0 662 663 domain.time = 7. 652 # This will test that time is set to starttime in set_starttime 653 domain.set_starttime(5.0) 664 654 665 655 domain.compute_forcing_terms() … … 668 658 (3*domain.get_time() + 7)/1000) 669 659 assert num.allclose(domain.quantities['stage'].explicit_update[1], 670 (3*(domain.time + domain.starttime) + 7)/1000) 671 672 # Using internal time her should fail 673 assert not num.allclose(domain.quantities['stage'].explicit_update[1], 674 (3*domain.time + 7)/1000) 660 (3*domain.get_starttime() + 7)/1000) 675 661 676 662 assert num.allclose(domain.quantities['stage'].explicit_update[0], 0)
Note: See TracChangeset
for help on using the changeset viewer.