00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 subroutine psmile_print_method_info (method_id)
00012
00013
00014
00015 use PRISM_constants
00016
00017 use PSMILe, dummy_interface => PSMILe_Print_method_info
00018
00019 implicit none
00020
00021
00022
00023 integer,Intent(In) :: method_id
00024
00025
00026
00027
00028
00029 character(len=22), save :: name_status (PSMILe_Status_free:
00030 PSMILe_Status_commited)
00031
00032
00033
00034 character(len=24), save :: name_method (PSMILe_PointMethod:
00035 PSMILe_SubgridMethod)
00036
00037 Type (Coords_Block), Pointer :: coords_pointer
00038 Type (Subgrid_Block), Pointer :: subgrid_pointer
00039
00040 data name_status /'PSMILe_Status_free', 'PSMILe_status_defined', &
00041 'PSMILe_Status_commited'/
00042
00043
00044 data name_method /'PSMILe_PointMethod', 'PSMILe_VectorPointMethod', &
00045 'PSMILe_SubgridMethod'/
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064 Character(len=len_cvs_string), save :: mycvs =
00065 '$Id: psmile_print_method_info.F90 2687 2010-10-28 15:15:52Z coquart $'
00066
00067
00068
00069 write (*, 9000) trim(ch_id), method_id
00070
00071
00072
00073 if (method_id > Number_of_Methods_allocated .or. &
00074 method_id < 1) then
00075
00076 write (*, 9010) 'Is an invalid method id'
00077
00078 call psmile_flushstd ()
00079 return
00080 endif
00081
00082 if (Methods(method_id)%status == PSMILe_status_free) then
00083 write (*, 9010) 'Is currently free'
00084
00085 call psmile_flushstd ()
00086 return
00087 endif
00088
00089 if (Methods(method_id)%status >= PSMILe_Status_free .and. &
00090 Methods(method_id)%status <= PSMILe_status_commited) then
00091 write (*, 9020) 'status ', Methods(method_id)%status, &
00092 name_status (Methods(method_id)%status)
00093 else
00094 write (*, 9020) 'status ', Methods(method_id)%status
00095 endif
00096
00097
00098
00099 write (*, 9020) 'grid_id ', Methods(method_id)%grid_id
00100 write (*, 9020) 'method type ', Methods(method_id)%method_type, &
00101 name_method(Methods(method_id)%method_type)
00102 write (*, 9020) 'size ', Methods(method_id)%size
00103 write (*, 9020) 'previous method in grid', Methods(method_id)%previous_method_in_grid
00104 write (*, 9020) 'next method in grid ', Methods(method_id)%next_method_in_grid
00105
00106 if (Methods(method_id)%used_for_coupling) then
00107 write (*, 9030) 'used_for_coupling ', 'true'
00108 else
00109 write (*, 9030) 'used_for_coupling ', 'false'
00110 endif
00111
00112
00113
00114
00115
00116
00117
00118 if ( Associated(Methods(method_id)%coords_pointer) ) then
00119
00120 Nullify ( coords_pointer )
00121 coords_pointer => Methods(method_id)%coords_pointer
00122
00123 if (Associated(coords_pointer%coords_real(1)%vector)) then
00124 write (*, 9030) 'coords_real(1)%vector pointer', 'is associated'
00125 else
00126 write (*, 9030) 'coords_real(1)%vector pointer', 'is not associated'
00127 endif
00128
00129 if (Associated(coords_pointer%coords_real(2)%vector)) then
00130 write (*, 9030) 'coords_real(2)%vector pointer', 'is associated'
00131 else
00132 write (*, 9030) 'coords_real(2)%vector pointer', 'is not associated'
00133 endif
00134
00135 if (Associated(coords_pointer%coords_real(3)%vector)) then
00136 write (*, 9030) 'coords_real(3)%vector pointer', 'is associated'
00137 else
00138 write (*, 9030) 'coords_real(3)%vector pointer', 'is not associated'
00139 endif
00140
00141 if (Associated(coords_pointer%coords_dble(1)%vector)) then
00142 write (*, 9030) 'coords_dble(1)%vector pointer', 'is associated'
00143 else
00144 write (*, 9030) 'coords_dble(1)%vector pointer', 'is not associated'
00145 endif
00146
00147 if (Associated(coords_pointer%coords_dble(2)%vector)) then
00148 write (*, 9030) 'coords_dble(2)%vector pointer', 'is associated'
00149 else
00150 write (*, 9030) 'coords_dble(2)%vector pointer', 'is not associated'
00151 endif
00152
00153 if (Associated(coords_pointer%coords_dble(3)%vector)) then
00154 write (*, 9030) 'coords_dble(3)%vector pointer', 'is associated'
00155 else
00156 write (*, 9030) 'coords_dble(3)%vector pointer', 'is not associated'
00157 endif
00158
00159 else
00160
00161 write (*, 9030) 'No coordinate pointer ', 'is associated'
00162
00163 endif
00164
00165
00166
00167 if ( Associated(Methods(method_id)%vector_pointer) ) then
00168
00169 write (*, 9030) ' vector pointer ', 'is associated'
00170
00171 else
00172
00173 write (*, 9030) 'No vector pointer ', 'is associated'
00174
00175 endif
00176
00177
00178
00179 if ( Associated(Methods(method_id)%subgrid_pointer) ) then
00180
00181 Nullify ( subgrid_pointer )
00182 subgrid_pointer => Methods(method_id)%subgrid_pointer
00183
00184 if (Associated(subgrid_pointer%subgrid_real)) then
00185 write (*, 9030) 'subgrid_real pointer', 'is associated'
00186 else
00187 write (*, 9030) 'subgrid_real pointer', 'is not associated'
00188 endif
00189
00190 if (Associated(subgrid_pointer%subgrid_double)) then
00191 write (*, 9030) 'subgrid_double pointer', 'is associated'
00192 else
00193 write (*, 9030) 'subgrid_double pointer', 'is not associated'
00194 endif
00195
00196 else
00197
00198 write (*, 9030) 'No subgrid pointer ', 'is associated'
00199
00200 endif
00201
00202
00203
00204
00205
00206
00207
00208 write (*, 9010)
00209
00210 call psmile_flushstd ()
00211
00212
00213
00214
00215
00216 9000 format (/1x, a, ': Info on method handle', i3, ':', &
00217 /1x, 40('-'))
00218 9010 format (1x, a)
00219 9020 format (1x, a30, ' = ', i7, : 1x, a)
00220 9030 format (1x, a30, 3x, a)
00221
00222 end subroutine PSMILe_Print_method_info