#!/usr/bin/env python ######################################################### # # Main file for parallel mesh testing. Runs an advection # flow simulation using a rectangular mesh # # This is a modification of the run_parallel_advection.py # file # # # *) The (new) files that have been added to manage the # grid partitioning are # +) pmesh_divide_metis.py: subdivide a pmesh # +) build_submesh.py: build the submeshes on the host # processor. # +) build_local.py: build the GA mesh datastructure # on each processor. # +) build_commun.py: handle the communication between # the host and processors # # Authors: Linda Stals, Steve Roberts and Matthew Hardy, # June 2005 # # # ######################################################### import pypar # The Python-MPI interface import time from sys import path print path # Numeric arrays from Numeric import array, zeros, Float from print_stats import print_test_stats, build_full_flag from anuga.abstract_2d_finite_volumes.pmesh2domain\ import pmesh_to_domain_instance from anuga.advection.advection import Domain as Advection_Domain from parallel_advection import Parallel_Domain from anuga.abstract_2d_finite_volumes.generic_boundary_conditions\ import Transmissive_boundary # mesh partition routines from pmesh_divide import pmesh_divide_metis from build_submesh import build_submesh from build_local import build_local_mesh from build_commun import send_submesh, rec_submesh, extract_hostmesh class Set_Stage: """Set an initial condition with constant water height, for xself.x0)&(x