Ignore:
Timestamp:
Mar 9, 2014, 9:11:36 PM (11 years ago)
Author:
steve
Message:

changed the order of calls in anuga.init.py to hopefully call the correct Boyd_box_operator in parallel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/__init__.py

    r9029 r9059  
    3131from anuga.__metadata__ import __version__, __date__, __author__
    3232
     33#--------------------------------
     34# Important basic classes
     35#--------------------------------
    3336from anuga.shallow_water.shallow_water_domain import Domain
    3437from anuga.abstract_2d_finite_volumes.quantity import Quantity
    3538from anuga.abstract_2d_finite_volumes.region import Region
    36 
     39from anuga.operators.base_operator import Operator
     40from anuga.structures.structure_operator import Structure_operator
    3741
    3842from anuga.abstract_2d_finite_volumes.util import file_function, \
     
    6367from anuga.geometry.polygon import read_polygon
    6468from anuga.caching import cache
     69from os.path import join
     70from anuga.config import indent
     71
     72
     73
     74#----------------------------
     75# Parallel api (needs operators)
     76#----------------------------
     77from anuga_parallel.parallel_api import distribute
     78from anuga_parallel.parallel_api import myid, numprocs, get_processor_name
     79from anuga_parallel.parallel_api import send, receive
     80from anuga_parallel.parallel_api import pypar_available, barrier, finalize
     81
    6582
    6683#-----------------------------
     
    135152from anuga.shallow_water.sww_interrogate import get_flow_through_cross_section
    136153   
    137 
    138154#---------------------------
    139155# Operators
    140156#---------------------------
    141 from anuga.operators.base_operator import Operator
    142157from anuga.operators.kinematic_viscosity_operator import Kinematic_viscosity_operator
    143158
     
    145160from anuga.operators.set_friction_operators import Depth_friction_operator
    146161
     162
    147163#---------------------------
    148164# Structure Operators
    149165#---------------------------
    150 from anuga.structures.structure_operator import Structure_operator
    151 from anuga.structures.boyd_box_operator import Boyd_box_operator
    152 from anuga.structures.boyd_pipe_operator import Boyd_pipe_operator
    153 from anuga.structures.weir_orifice_trapezoid_operator import Weir_orifice_trapezoid_operator
    154 from anuga.structures.inlet_operator import Inlet_operator
     166
     167
     168if pypar_available:
     169    from anuga_parallel.parallel_operator_factory import Inlet_operator
     170    from anuga_parallel.parallel_operator_factory import Boyd_box_operator
     171    from anuga_parallel.parallel_operator_factory import Boyd_pipe_operator
     172    from anuga_parallel.parallel_operator_factory import Weir_orifice_trapezoid_operator
     173else:
     174    from anuga.structures.boyd_box_operator import Boyd_box_operator
     175    from anuga.structures.boyd_pipe_operator import Boyd_pipe_operator
     176    from anuga.structures.weir_orifice_trapezoid_operator import Weir_orifice_trapezoid_operator
     177    from anuga.structures.inlet_operator import Inlet_operator
     178
     179#----------------------------
     180# Parallel distribute
     181#----------------------------
     182
     183
     184#----------------------------
     185#
     186#Added by Petar Milevski 10/09/2013
     187#import time, os
     188
     189from anuga.utilities.model_tools import get_polygon_from_single_file
     190from anuga.utilities.model_tools import get_polygons_from_Mid_Mif
     191from anuga.utilities.model_tools import get_polygon_list_from_files
     192from anuga.utilities.model_tools import get_polygon_dictionary
     193from anuga.utilities.model_tools import get_polygon_value_list
     194from anuga.utilities.model_tools import read_polygon_dir
     195from anuga.utilities.model_tools import read_hole_dir_multi_files_with_single_poly
     196from anuga.utilities.model_tools import read_multi_poly_file
     197from anuga.utilities.model_tools import read_hole_dir_single_file_with_multi_poly
     198from anuga.utilities.model_tools import read_multi_poly_file_value
     199from anuga.utilities.model_tools import Create_culvert_bridge_Operator
     200
    155201
    156202#---------------------------
     
    374420
    375421
    376 #Added by Petar Milevski 10/09/2013
    377 import time, os
    378 from os.path import join
    379 from anuga.config import indent
    380 
    381 from anuga.utilities.model_tools import get_polygon_from_single_file
    382 from anuga.utilities.model_tools import get_polygons_from_Mid_Mif
    383 from anuga.utilities.model_tools import get_polygon_list_from_files
    384 from anuga.utilities.model_tools import get_polygon_dictionary
    385 from anuga.utilities.model_tools import get_polygon_value_list
    386 from anuga.utilities.model_tools import read_polygon_dir
    387 from anuga.utilities.model_tools import read_hole_dir_multi_files_with_single_poly
    388 from anuga.utilities.model_tools import read_multi_poly_file
    389 from anuga.utilities.model_tools import read_hole_dir_single_file_with_multi_poly
    390 from anuga.utilities.model_tools import read_multi_poly_file_value
    391 
    392 from anuga.utilities.model_tools import Create_culvert_bridge_Operator
    393 
    394 from anuga_parallel.parallel_api import distribute
    395 from anuga_parallel.parallel_api import myid, numprocs, get_processor_name
    396 from anuga_parallel.parallel_api import send, receive
    397 from anuga_parallel.parallel_api import pypar_available, barrier, finalize
    398 
    399 if pypar_available:
    400     #from anuga_parallel.parallel_meshes import parallel_rectangle
    401     #from anuga_parallel.parallel_shallow_water import Parallel_domain as Parallel_shallow_water_domain
    402     #from anuga_parallel.parallel_advection     import Parallel_domain as Parallel_advection_domain
    403     from anuga_parallel.parallel_operator_factory import Inlet_operator, Boyd_box_operator, Boyd_pipe_operator, Weir_orifice_trapezoid_operator
    404 
    405 
    406 from anuga.structures.weir_orifice_trapezoid_operator import Weir_orifice_trapezoid_operator
    407 
     422
     423
Note: See TracChangeset for help on using the changeset viewer.