Ignore:
Timestamp:
Jun 10, 2016 12:06:59 PM (5 years ago)
Author:
suehring
Message:

Rename multigrid into multigrid_noopt and multigrid_fast into multigrid, subroutines poismg is renamed into poismg_noopt and poismg_fast_mod into poismg_mod

File:
1 moved

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/poismg_mod.f90

    r1930 r1931  
    1 !> @file poismg_fast_mod.f90
     1!> @file poismg.f90
    22!--------------------------------------------------------------------------------!
    33! This file is part of PALM.
     
    1919! Current revisions:
    2020! -----------------
    21 !
     21! Rename subroutines and cpu-measure log points to indicate default version
    2222!
    2323! Former revisions:
     
    9292    REAL(wp), DIMENSION(:,:), SAVE, ALLOCATABLE ::  f1_mg_b, f2_mg_b, f3_mg_b  !< blocked version of f1_mg ...
    9393
    94     INTERFACE poismg_fast
    95        MODULE PROCEDURE poismg_fast
    96     END INTERFACE poismg_fast
     94    INTERFACE poismg
     95       MODULE PROCEDURE poismg
     96    END INTERFACE poismg
    9797
    9898    INTERFACE sort_k_to_even_odd_blocks
     
    102102    END INTERFACE sort_k_to_even_odd_blocks
    103103
    104     PUBLIC poismg_fast
     104    PUBLIC poismg
    105105
    106106 CONTAINS
     
    112112!> V- or W-Cycle scheme.
    113113!------------------------------------------------------------------------------!
    114     SUBROUTINE poismg_fast( r )
     114    SUBROUTINE poismg( r )
    115115
    116116       USE arrays_3d,                                                          &
     
    140140
    141141
    142        CALL cpu_log( log_point_s(29), 'poismg_fast', 'start' )
     142       CALL cpu_log( log_point_s(29), 'poismg', 'start' )
    143143!
    144144!--    Initialize arrays and variables used in this subroutine
     
    198198                  mgcycles < maximum_mgcycles )
    199199 
    200           CALL next_mg_level_fast( d, p_loc, p3, r)
     200          CALL next_mg_level( d, p_loc, p3, r)
    201201
    202202!
     
    204204!--       cycles to be performed
    205205          IF ( maximum_mgcycles == 0 )  THEN
    206              CALL resid_fast( d, p_loc, r )
     206             CALL resid( d, p_loc, r )
    207207             maxerror = SUM( r(nzb+1:nzt,nys:nyn,nxl:nxr)**2 )
    208208
     
    224224          IF ( mgcycles > 1000  .AND.  mg_cycles == -1 )  THEN
    225225             message_string = 'no sufficient convergence within 1000 cycles'
    226              CALL message( 'poismg_fast', 'PA0283', 1, 2, 0, 6, 0 )
     226             CALL message( 'poismg', 'PA0283', 1, 2, 0, 6, 0 )
    227227          ENDIF
    228228
     
    238238       grid_level = 0
    239239
    240        CALL cpu_log( log_point_s(29), 'poismg_fast', 'stop' )
    241 
    242     END SUBROUTINE poismg_fast
     240       CALL cpu_log( log_point_s(29), 'poismg', 'stop' )
     241
     242    END SUBROUTINE poismg
    243243
    244244
     
    248248!> Computes the residual of the perturbation pressure.
    249249!------------------------------------------------------------------------------!
    250     SUBROUTINE resid_fast( f_mg, p_mg, r )
     250    SUBROUTINE resid( f_mg, p_mg, r )
    251251
    252252
     
    366366       CALL cpu_log( log_point_s(53), 'resid', 'stop' )
    367367
    368     END SUBROUTINE resid_fast
     368    END SUBROUTINE resid
    369369
    370370
     
    375375!> scheme
    376376!------------------------------------------------------------------------------!
    377     SUBROUTINE restrict_fast( f_mg, r )
     377    SUBROUTINE restrict( f_mg, r )
    378378
    379379
     
    503503       CALL sort_k_to_even_odd_blocks( f_mg , l)
    504504
    505     END SUBROUTINE restrict_fast
     505    END SUBROUTINE restrict
    506506
    507507
     
    512512!> to the next finer grid.
    513513!------------------------------------------------------------------------------!
    514     SUBROUTINE prolong_fast( p, temp )
     514    SUBROUTINE prolong( p, temp )
    515515
    516516
     
    670670       CALL cpu_log( log_point_s(55), 'prolong', 'stop' )
    671671
    672     END SUBROUTINE prolong_fast
     672    END SUBROUTINE prolong
    673673
    674674
     
    679679!> 3D-Red-Black decomposition (GS-RB) is used.
    680680!------------------------------------------------------------------------------!
    681     SUBROUTINE redblack_fast( f_mg, p_mg )
     681    SUBROUTINE redblack( f_mg, p_mg )
    682682
    683683
     
    981981       ENDDO
    982982
    983     END SUBROUTINE redblack_fast
     983    END SUBROUTINE redblack
    984984
    985985
     
    12361236!> Gather subdomain data from all PEs.
    12371237!------------------------------------------------------------------------------!
    1238     SUBROUTINE mg_gather_fast( f2, f2_sub )
     1238    SUBROUTINE mg_gather( f2, f2_sub )
    12391239
    12401240       USE control_parameters,                                                 &
     
    13071307#endif
    13081308   
    1309     END SUBROUTINE mg_gather_fast
     1309    END SUBROUTINE mg_gather
    13101310
    13111311
     
    13171317!>       non-blocking communication
    13181318!------------------------------------------------------------------------------!
    1319     SUBROUTINE mg_scatter_fast( p2, p2_sub )
     1319    SUBROUTINE mg_scatter( p2, p2_sub )
    13201320
    13211321       USE control_parameters,                                                 &
     
    13531353#endif
    13541354   
    1355     END SUBROUTINE mg_scatter_fast
     1355    END SUBROUTINE mg_scatter
    13561356
    13571357
     
    13661366!> but leads to an increase in computing time.
    13671367!------------------------------------------------------------------------------!
    1368     RECURSIVE SUBROUTINE next_mg_level_fast( f_mg, p_mg, p3, r )
     1368    RECURSIVE SUBROUTINE next_mg_level( f_mg, p_mg, p3, r )
    13691369
    13701370       USE control_parameters,                                                 &
     
    14251425          ind_even_odd = even_odd_level(grid_level)
    14261426
    1427           CALL redblack_fast( f_mg, p_mg )
     1427          CALL redblack( f_mg, p_mg )
    14281428
    14291429          ngsrb = ngsrb / 2
     
    14381438          ind_even_odd = even_odd_level(grid_level)
    14391439
    1440           CALL redblack_fast( f_mg, p_mg )
     1440          CALL redblack( f_mg, p_mg )
    14411441
    14421442!
    14431443!--       Determination of the actual residual
    1444           CALL resid_fast( f_mg, p_mg, r )
     1444          CALL resid( f_mg, p_mg, r )
    14451445
    14461446!--       Restriction of the residual (finer grid values!) to the next coarser
     
    14851485                              nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) )
    14861486
    1487              CALL restrict_fast( f2_sub, r )
     1487             CALL restrict( f2_sub, r )
    14881488
    14891489!
     
    15011501!
    15021502!--          Gather all arrays from the subdomains on PE0
    1503              CALL mg_gather_fast( f2, f2_sub )
     1503             CALL mg_gather( f2, f2_sub )
    15041504
    15051505!
     
    15461546          ELSE
    15471547
    1548              CALL restrict_fast( f2, r )
     1548             CALL restrict( f2, r )
    15491549
    15501550             ind_even_odd = even_odd_level(grid_level)  ! must be after restrict
     
    15561556!
    15571557!--       Repeat the same procedure till the coarsest grid is reached
    1558           CALL next_mg_level_fast( f2, p2, p3, r )
     1558          CALL next_mg_level( f2, p2, p3, r )
    15591559
    15601560       ENDIF
     
    15771577                       mg_loc_ind(1,myid)-1:mg_loc_ind(2,myid)+1) )
    15781578
    1579              CALL mg_scatter_fast( p2, p2_sub )
     1579             CALL mg_scatter( p2, p2_sub )
    15801580
    15811581!
     
    16471647             ENDIF
    16481648
    1649              CALL prolong_fast( p2_sub, p3 )
     1649             CALL prolong( p2_sub, p3 )
    16501650
    16511651!
     
    16621662          ELSE
    16631663
    1664              CALL prolong_fast( p2, p3 )
     1664             CALL prolong( p2, p3 )
    16651665
    16661666          ENDIF
     
    16791679!
    16801680!--       Relaxation of the new solution
    1681           CALL redblack_fast( f_mg, p_mg )
     1681          CALL redblack( f_mg, p_mg )
    16821682
    16831683       ENDIF
     
    16981698
    16991699!
    1700 !--    Reset counter for the next call of poismg_fast
     1700!--    Reset counter for the next call of poismg
    17011701       grid_level_count(grid_level) = 0
    17021702
     
    17161716    20 CONTINUE
    17171717
    1718     END SUBROUTINE next_mg_level_fast
     1718    END SUBROUTINE next_mg_level
    17191719
    17201720
Note: See TracChangeset for help on using the changeset viewer.