00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 subroutine psmile_get_face_ind_3d (search, extra_search, &
00012 send_info, len_cpl, &
00013 send_mask, nreq, srcloc_ind, n_send, &
00014 ierror)
00015
00016
00017
00018 use PRISM
00019
00020 use PSMILe, dummy_interface => PSMILe_Get_face_ind_3d
00021
00022 Implicit none
00023
00024
00025
00026 Type (Enddef_search), Intent (In) :: search
00027
00028
00029
00030 Type (Extra_search_info), Intent (In) :: extra_search
00031
00032
00033
00034
00035
00036 Type (Send_information), Intent (In) :: send_info
00037
00038
00039
00040 Integer, Intent (In) :: len_cpl (search%npart)
00041
00042
00043
00044 Integer, Intent (In) :: nreq
00045
00046
00047
00048
00049 Logical, Intent (In) :: send_mask (nreq)
00050
00051
00052
00053 Integer, Intent (In) :: n_send
00054
00055
00056
00057
00058
00059
00060 Integer, Intent (Out) :: srcloc_ind (ndim_3d, n_send)
00061
00062
00063
00064 Integer, Intent (Out) :: ierror
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074 Integer :: i, j, n
00075
00076
00077
00078 Integer :: ipart, nextra_prev
00079
00080 Integer, Pointer :: indices_req (:)
00081 Integer, Pointer :: len_req (:)
00082 Integer, Pointer :: srcloc (:)
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108 Character(len=len_cvs_string), save :: mycvs =
00109 '$Id: psmile_get_face_ind_3d.F90 2933 2011-01-31 16:42:27Z hanke $'
00110
00111
00112
00113
00114
00115 #ifdef VERBOSE
00116 print 9990, trim(ch_id)
00117
00118 call psmile_flushstd
00119 #endif /* VERBOSE */
00120
00121 ierror = 0
00122
00123 len_req => extra_search%len_req
00124
00125 #ifdef PRISM_ASSERTION
00126 if (SUM(len_req(:)) > nreq) then
00127 print *, 'nreq, sum(len_req)', nreq, SUM(len_req(:))
00128 call psmile_assert ( __FILE__, __LINE__, &
00129 'nreq is too small (inconsistent data)')
00130 endif
00131
00132 if (send_info%nvec /= 1) then
00133 print *, 'nvec', send_info%nvec
00134 call psmile_assert ( __FILE__, __LINE__, &
00135 'Routine is designed for irregular case (3d vector)')
00136 endif
00137 #endif
00138
00139
00140
00141
00142
00143
00144 n = 0
00145 nextra_prev = 0
00146
00147
00148
00149
00150
00151 srcloc => send_info%srclocs(1,1)%vector
00152
00153 do ipart = 1, search%npart
00154
00155 if (len_req (ipart) > 0) then
00156 indices_req => extra_search%indices_req(ipart)%vector
00157
00158 do j = 1, len_req (ipart)
00159 if (send_mask(nextra_prev+j)) then
00160
00161
00162
00163
00164
00165 n = n + 1
00166
00167 i = (indices_req(j) - 1) * ndim_3d
00168
00169 srcloc_ind (1, n) = srcloc (i+1)
00170 srcloc_ind (2, n) = srcloc (i+2)
00171 srcloc_ind (3, n) = srcloc (i+3)
00172 endif
00173 end do
00174
00175 nextra_prev = nextra_prev + len_req (ipart)
00176 endif
00177
00178 end do
00179
00180 #ifdef PRISM_ASSERTION
00181 if (n /= n_send) then
00182 print *, 'n, n_send', n, n_send
00183 call psmile_assert ( __FILE__, __LINE__, &
00184 'All indices were NOT generated for srcloc_ind')
00185 endif
00186 #endif
00187
00188
00189
00190 #ifdef VERBOSE
00191 print 9980, trim(ch_id), ierror
00192
00193 call psmile_flushstd
00194 #endif /* VERBOSE */
00195
00196
00197
00198 #ifdef VERBOSE
00199
00200 9990 format (1x, a, ': psmile_get_face_ind_3d:')
00201 9980 format (1x, a, ': psmile_get_face_ind_3d: eof ierror =', i3)
00202
00203 #endif /* VERBOSE */
00204
00205 #ifdef DEBUG
00206 #endif
00207
00208 end subroutine PSMILe_Get_face_ind_3d