Changeset 9277
- Timestamp:
- Aug 1, 2014, 3:27:28 PM (11 years ago)
- Location:
- trunk/anuga_core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/utilities/spatialInputUtil.py
r9252 r9277 32 32 readListOfBreakLines -- takes a list of shapefile names, each containing a single line geometry, and reads 33 33 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 34 38 35 39 polygon_from_matching_breaklines -- given a pattern (string) matching exactly 2 breaklines in a directory, … … 921 925 Take a list with the names of riverwall input files [should be comma-separated x,y,elevation files] 922 926 923 The input file can optionallyhave a first line defining some hydraulic parameters. A valid example927 The input file can OPTIONALLY have a first line defining some hydraulic parameters. A valid example 924 928 is 925 929 … … 961 965 962 966 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 963 978 964 979 ############################################################################ … … 1011 1026 polyOut=breakLines[bk[matchers[0]]] + breakLines[bk[matchers[1]]] 1012 1027 #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 1013 1033 return polyOut 1014 1034 ################### -
trunk/anuga_core/validation_tests/case_studies/towradgi/project.py
r9262 r9277 5 5 partition_dir = 'PARTITIONS' 6 6 checkpoint_dir = 'CHECKPOINTS' 7 checkpoint_time = 30 7 checkpoint_time = 30*60 # 30 minutes 8 8 checkpoint = True 9 9
Note: See TracChangeset
for help on using the changeset viewer.