#!/usr/bin/env/python ######################################################### # # Shows problem of conservation of mass. Due to material being # removed if too shallow. Can lead to problems if timestep # set very small. # # # # Authors: Linda Stals, Steve Roberts and Matthew Hardy, # June 2005 # # # ######################################################### ############################################## # Set a small yieldstep (say 0.005) to see # lose of conservation # Set it to a larger value (say 0.1) and have # conservation "restored" ############################################## yieldstep = 0.005 #yieldstep = 0.08 #yieldstep = 0.05 finaltime = 100.0 import sys import time from Numeric import array, zeros, Float #from shallow_water import Domain from anuga.shallow_water import Domain # mesh partition routines from anuga.abstract_2d_finite_volumes.pmesh2domain\ import pmesh_to_domain_instance # read in the processor information #------- # Domain rect = zeros( 4, Float) # Buffer for results class Set_Stage: """Set an initial condition with constant water height, for x0self.x0)&(x