Changeset 9277


Ignore:
Timestamp:
Aug 1, 2014, 3:27:28 PM (11 years ago)
Author:
davies
Message:

Editing some breakLine functionality

Location:
trunk/anuga_core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/utilities/spatialInputUtil.py

    r9252 r9277  
    3232    readListOfBreakLines -- takes a list of shapefile names, each containing a single line geometry, and reads
    3333                            it in as a dictionary of breaklines.
     34   
     35    readListOfRiverWalls -- takes a list of csv names, each containing a xyz polylines defining riverwalls, with
     36                            an optional first line defining the non-default riverwall par, and returns a dictionary
     37                            of the riverwalls and the riverwall_Par
    3438
    3539    polygon_from_matching_breaklines -- given a pattern (string) matching exactly 2 breaklines in a directory,
     
    921925            Take a list with the names of riverwall input files [should be comma-separated x,y,elevation files]
    922926
    923             The input file can optionally have a first line defining some hydraulic parameters. A valid example
     927            The input file can OPTIONALLY have a first line defining some hydraulic parameters. A valid example
    924928            is
    925929
     
    961965       
    962966        return allRiverWalls, allRiverWallPar
     967
     968    ############################################################################
     969
     970    def combine_breakLines_and_riverWalls_for_mesh(breakLines, riverWalls):
     971        """
     972        Combine breaklines and riverwalls for input in mesh generation, ensuring both have 2 coordinates only
     973        """
     974        mesh_breakLines=riverWalls.values()+breakLines.values()
     975        for i in range(len(mesh_breakLines)):
     976            mesh_breakLines[i] = [mesh_breakLines[i][j][0:2] for j in range(len(mesh_breakLines[i]))]
     977        return mesh_breakLines
    963978   
    964979    ############################################################################
     
    10111026        polyOut=breakLines[bk[matchers[0]]] +  breakLines[bk[matchers[1]]]
    10121027        #polyOut=polyOut+[polyOut[0]]
     1028
     1029        # If the breakLines values have > 2 entries (i.e. like for riverwalls), remove the third
     1030        if(len(polyOut[0])>2):
     1031            polyOut=[polyOut[i][0:2] for i in range(len(polyOut))]
     1032
    10131033        return polyOut
    10141034    ###################
  • trunk/anuga_core/validation_tests/case_studies/towradgi/project.py

    r9262 r9277  
    55partition_dir = 'PARTITIONS'
    66checkpoint_dir = 'CHECKPOINTS'
    7 checkpoint_time = 30
     7checkpoint_time = 30*60 # 30 minutes
    88checkpoint = True
    99
Note: See TracChangeset for help on using the changeset viewer.