Changeset 3198 for palm/trunk/UTIL
 Timestamp:
 Aug 15, 2018 9:23:10 AM (6 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

palm/trunk/UTIL/nav_mesh/nav_mesh.f90
r3168 r3198 25 25 ! ! 26 26 ! $Id$ 27 ! Reduced tolerance_dp to 3 entries, fixed its initialization 28 ! 29 ! 3168 20180725 06:40:29Z sward 27 30 ! Updated NetCDF ororgraphy and building input 28 31 ! … … 95 98 REAL(wp) :: start !< variable for CPU time measurement 96 99 97 REAL(wp), DIMENSION(0: 4) :: tolerance_dp !< tolerance in DouglasPoicker algorithm100 REAL(wp), DIMENSION(0:2) :: tolerance_dp = 999999.0_wp !< tolerance in DouglasPeucker algorithm 98 101 99 102 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: obstacle_height !< height of obstacles … … 1338 1341 ! 1339 1342 ! If tolerance_dp was not set, put in default values 1340 IF ( tolerance_dp(0) == 999999.0_wp ) tolerance_dp(0) = SQRT(dx*dy)*2.99 1341 IF ( tolerance_dp(1) == 999999.0_wp ) tolerance_dp(1) = SQRT(dx*dy)*1.99 1342 IF ( tolerance_dp(2) == 999999.0_wp ) tolerance_dp(2) = SQRT(dx*dy)*1.41 1343 IF ( tolerance_dp(3) == 999999.0_wp ) tolerance_dp(3) = SQRT(dx*dy)*.7 1344 IF ( tolerance_dp(4) == 999999.0_wp ) tolerance_dp(4) = SQRT(dx*dy)*.35 1343 DO i = 0, 2 1344 IF ( tolerance_dp(i) == 999999.0_wp ) THEN 1345 tolerance_dp(i) = SQRT(dx*dy)*1.41/(2**i) 1346 ELSE 1347 tolerance_dp(i) = tolerance_dp(i)*SQRT(dx*dy) 1348 ENDIF 1349 ENDDO 1350 1345 1351 ! 1346 1352 ! Allocate arrays … … 2784 2790 ! of vertices would fall below 4 due to this procedure, the tolerance 2785 2791 ! for the algorithm is reduced and it is run again. 2786 DO i_sc = 0, 42792 DO i_sc = 0, 2 2787 2793 CALL simplify_polygon(1,nov+1,tolerance_dp(i_sc)) 2788 2794 i_cn = 0
Note: See TracChangeset
for help on using the changeset viewer.