"""Run parallel shallow water domain. run using command like: mpirun -np m python run_parallel_sw_merimbula.py where m is the number of processors to be used. Will produce sww files with names domain_Pn_m.sww where m is number of processors and n in [0, m-1] refers to specific processor that owned this part of the partitioned mesh. """ #------------------------------------------------------------------------------ # Import necessary modules #------------------------------------------------------------------------------ import os import sys import time import numpy as num #------------------------ # ANUGA Modules #------------------------ from anuga import Domain from anuga import Reflective_boundary from anuga import Dirichlet_boundary from anuga import Time_boundary from anuga import Transmissive_boundary from anuga import rectangular_cross from anuga import create_domain_from_file from anuga_parallel import distribute, myid, numprocs, finalize, barrier #-------------------------------------------------------------------------- # Setup parameters #-------------------------------------------------------------------------- #mesh_filename = "merimbula_10785_1.tsh" ; x0 = 756000.0 ; x1 = 756500.0 #mesh_filename = "merimbula_43200.tsh" ; x0 = 756000.0 ; x1 = 756500.0 mesh_filename = "test-100.tsh" ; x0 = 0.25 ; x1 = 0.5 yieldstep = 20 finaltime = 500 verbose = True #-------------------------------------------------------------------------- # Setup procedures #-------------------------------------------------------------------------- class Set_Stage: """Set an initial condition with constant water height, for x0self.x0)&(x