Changeset 4828 for palm/trunk/SOURCE/pmc_general_mod.f90
- Timestamp:
- Jan 5, 2021 11:21:41 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/pmc_general_mod.f90
r4649 r4828 15 15 ! <http://www.gnu.org/licenses/>. 16 16 ! 17 ! Copyright 1997-202 0Leibniz Universitaet Hannover17 ! Copyright 1997-2021 Leibniz Universitaet Hannover 18 18 !--------------------------------------------------------------------------------------------------! 19 19 ! … … 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Interface pmc_sort removed. Subroutine description added. 29 ! 30 ! 4649 2020-08-25 12:11:17Z raasch 28 31 ! File re-formatted to follow the PALM coding standard 29 32 ! … … 143 146 END INTERFACE pmc_g_setname 144 147 145 INTERFACE pmc_sort 146 MODULE PROCEDURE sort_2d_i 147 END INTERFACE pmc_sort 148 149 PUBLIC pmc_g_setname, pmc_sort 148 PUBLIC pmc_g_setname 150 149 151 150 CONTAINS 152 151 153 !-------------------------------------------------------------------------------------------------- !152 !---------------------------------------------------------------------------------------------------! 154 153 ! Description: 155 154 ! ------------ 156 !> @Todo: Missing subroutine description.157 !-------------------------------------------------------------------------------------------------- !155 !> Add array to list of arraydef structure. No the arra "name" is schedules for parent child transfer 156 !---------------------------------------------------------------------------------------------------! 158 157 SUBROUTINE pmc_g_setname( mychild, couple_index, aname ) 159 158 … … 182 181 END SUBROUTINE pmc_g_setname 183 182 184 185 !--------------------------------------------------------------------------------------------------!186 ! Description:187 ! ------------188 !> @Todo: Missing subroutine description.189 !--------------------------------------------------------------------------------------------------!190 SUBROUTINE sort_2d_i( array, sort_ind )191 192 IMPLICIT NONE193 194 INTEGER(iwp), INTENT(IN) :: sort_ind195 INTEGER(iwp), DIMENSION(:,:), INTENT(INOUT) :: array196 197 INTEGER(iwp) :: i !<198 INTEGER(iwp) :: j !<199 INTEGER(iwp) :: n !<200 201 INTEGER(iwp), DIMENSION(SIZE(array,1)) :: tmp !<202 203 n = SIZE( array, 2 )204 DO j = 1, n-1205 DO i = j+1, n206 IF ( array(sort_ind,i) < array(sort_ind,j) ) THEN207 tmp = array(:,i)208 array(:,i) = array(:,j)209 array(:,j) = tmp210 ENDIF211 ENDDO212 ENDDO213 214 END SUBROUTINE sort_2d_i215 216 183 #endif 217 184 END MODULE pmc_general
Note: See TracChangeset
for help on using the changeset viewer.