Changeset 3095


Ignore:
Timestamp:
Jun 6, 2006, 12:14:01 PM (19 years ago)
Author:
ole
Message:

Got parallel example RunParallelSwMerimbulaMetis? to run from an arbitrary location using packages relative to PYTHONPATH

Location:
inundation
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • inundation/parallel/documentation/code/RunParallelSwMerimbulaMetis.py

    r2909 r3095  
    2525#########################################################
    2626import sys
    27 import pypar    # The Python-MPI interface
     27import parallel.pypar as pypar   # The Python-MPI interface
    2828import time
    2929
    3030from os import sep
    31 sys.path.append('..'+sep+'pyvolution')
    32 sys.path.append('..'+sep+'parallel')
     31
     32# ADD directory ..../anuga/inundation to PYTHONPATH instead
     33#sys.path.append('..'+sep+'pyvolution')
     34#sys.path.append('..'+sep+'parallel')
    3335
    3436# Numeric arrays
     
    3840# pmesh
    3941
    40 from shallow_water import Domain
    41 from parallel_shallow_water import Parallel_Domain
    42 from pmesh2domain import pmesh_to_domain_instance
     42from pyvolution.shallow_water import Domain
     43from parallel.parallel_shallow_water import Parallel_Domain
     44from pyvolution.pmesh2domain import pmesh_to_domain_instance
    4345
    4446# Mesh partition routines
    4547
    46 from pmesh_divide import pmesh_divide_metis
    47 from build_submesh import build_submesh
    48 from build_local   import build_local_mesh
    49 from build_commun  import send_submesh, rec_submesh, extract_hostmesh
     48from parallel.pmesh_divide import pmesh_divide_metis
     49from parallel.build_submesh import build_submesh
     50from parallel.build_local   import build_local_mesh
     51from parallel.build_commun  import send_submesh, rec_submesh, extract_hostmesh
    5052
    5153###############################
     
    156158# Define the boundaries, including the ghost boundary
    157159
    158 from parallel_shallow_water import Transmissive_boundary, Reflective_boundary
     160from parallel.parallel_shallow_water import Transmissive_boundary, Reflective_boundary
    159161
    160162T = Transmissive_boundary(domain)
  • inundation/parallel/pmesh_divide.py

    r2850 r3095  
    8484#
    8585#########################################################
    86 path.append('..' + sep + 'pymetis')
    8786
    88 from metis import partMeshNodal
     87#path.append('..' + sep + 'pymetis')
     88from pymetis.metis import partMeshNodal
    8989
    9090def pmesh_divide_metis(domain, n_procs):
  • inundation/pyvolution/generic_boundary_conditions.py

    r2884 r3095  
    231231        self.F = file_function(filename, domain,
    232232                               interpolation_points=self.midpoint_coordinates,
    233                                verbose = verbose)
     233                               verbose=verbose)
    234234        self.domain = domain
    235235
Note: See TracChangeset for help on using the changeset viewer.