Ignore:
Timestamp:
Aug 15, 2018 9:23:10 AM (6 years ago)
Author:
sward
Message:

Added MAS end time, used time_since_reference_point, corrected tolerance_dp in nav_mesh

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/UTIL/nav_mesh/nav_mesh.f90

    r3168 r3198  
    2525! -----------------!
    2626! $Id$
     27! Reduced tolerance_dp to 3 entries, fixed its initialization
     28!
     29! 3168 2018-07-25 06:40:29Z sward
    2730! Updated NetCDF ororgraphy and building input
    2831!
     
    9598    REAL(wp)    ::  start            !< variable for CPU time measurement
    9699
    97     REAL(wp), DIMENSION(0:4) ::  tolerance_dp  !< tolerance in Douglas-Poicker algorithm
     100    REAL(wp), DIMENSION(0:2) ::  tolerance_dp = 999999.0_wp  !< tolerance in Douglas-Peucker algorithm
    98101
    99102    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  obstacle_height  !< height of obstacles
     
    13381341!
    13391342!--    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
    13451351!
    13461352!--    Allocate arrays
     
    27842790!--    of vertices would fall below 4 due to this procedure, the tolerance
    27852791!--    for the algorithm is reduced and it is run again.
    2786        DO i_sc = 0, 4
     2792       DO i_sc = 0, 2
    27872793          CALL simplify_polygon(1,nov+1,tolerance_dp(i_sc))
    27882794          i_cn = 0
Note: See TracChangeset for help on using the changeset viewer.