00001 subroutine preprocessor
00002
00003
00004 use global
00005
00006
00007
00008 implicit none
00009
00010 integer i,j,k,t
00011
00012 integer,pointer :: IM(:,:,:,:)
00013
00014 integer,pointer :: Node(:,:,:)
00015
00016 integer,pointer :: mytotalNode
00017
00018 real(8) dx,dy
00019
00020
00021 integer startIndex,endIndex
00022
00023
00024
00025
00026
00027
00028 integer,pointer :: allBC
00029
00030 integer dummy
00031
00032 integer,pointer :: minI,minJ,maxI,maxJ
00033
00034 modelDof=>myModel%totalDof
00035
00036 modelDof=0
00037
00038
00039 modelNode=>myModel%totalNode
00040
00041 modelNode=0
00042
00043
00044
00045 do i=1,numberOfPhysics
00046
00047 currentPhysics=i
00048
00049 numberOfDomains=>myModel%physics(currentPhysics)%numberOfDomains
00050
00051 physicsDof=>myModel%physics(currentPhysics)%totalDof
00052
00053 do j=1,numberOfDomains
00054
00055 currentDomain=j
00056
00057 IM=>myModel%physics(currentPhysics)%domain(currentDomain)%dofMatrix
00058
00059 allBC=>myModel%physics(currentPhysics)%domain(currentDomain)%allBC
00060
00061 minI=>myModel%physics(currentPhysics)%domain(currentDomain)%minI
00062 maxI=>myModel%physics(currentPhysics)%domain(currentDomain)%maxI
00063 minJ=>myModel%physics(currentPhysics)%domain(currentDomain)%minJ
00064 maxJ=>myModel%physics(currentPhysics)%domain(currentDomain)%maxJ
00065
00066
00067
00068
00069
00070
00071 call generateIndexMatrix()
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086 call generateIndexVector()
00087
00088
00089 mytotalNode=>myModel%physics(currentPhysics)%domain(currentDomain)%totalNode
00090
00091
00092 allocate(myModel%physics(currentPhysics)%domain(currentDomain)%xCoor(mytotalNode))
00093 allocate(myModel%physics(currentPhysics)%domain(currentDomain)%yCoor(mytotalNode))
00094
00095
00096
00097
00098
00099 Lx=>myModel%physics(currentPhysics)%domain(currentDomain)%Lx
00100 Ly=>myModel%physics(currentPhysics)%domain(currentDomain)%Ly
00101
00102
00103 dx=Lx/(myModel%physics(currentPhysics)%domain(currentDomain)%nx-1.d0)
00104 dy=Ly/(myModel%physics(currentPhysics)%domain(currentDomain)%ny-1.d0)
00105
00106
00107
00108
00109 call generateCoordinates(dx,dy)
00110
00111
00112
00113
00114
00115 call addBC()
00116
00117
00118
00119
00120
00121
00122
00123
00124 FORALL(i = minI:maxI, j = minJ:maxJ, t=1:myModel%physics(currentPhysics)%dof, IM(i,j,t,absolute).ne.0) IM(i,j,t,flag)=1
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141 call set
00142
00143
00144
00145
00146
00147
00148 end do
00149
00150 startIndex=modelDof+1
00151
00152 endIndex=startIndex+physicsDof-1
00153
00154
00155
00156
00157
00158 end do
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179 allocate(myModel%x(modelDof),myModel%tempx(modelDof),myModel%xPTO(modelDof),myModel%xRTO(modelDof))
00180
00181 y=>myModel%x
00182
00183 y=0.d0
00184
00185 yPTO=>myModel%xPTO
00186
00187 yPTO=0.d0
00188
00189 yRTO=>myModel%xRTO
00190
00191 yRTO=0.d0
00192
00193
00194
00195 tempy=>myModel%tempx
00196
00197 tempy=0.d0
00198
00199 discreteY=>tempy
00200
00201
00202 dummy=0
00203
00204
00205 do i=1,numberOfPhysics
00206
00207 currentPhysics=i
00208
00209 physicsDof=>myModel%physics(currentPhysics)%totalDof
00210
00211 startIndex=dummy+1
00212
00213 endIndex=startIndex+physicsDof-1
00214
00215 dummy=physicsDof+dummy
00216
00217 myModel%physics(currentPhysics)%x=>discreteY(startIndex:endIndex)
00218
00219 myModel%physics(currentPhysics)%xPTO=>yPTO(startIndex:endIndex)
00220
00221 myModel%physics(currentPhysics)%xRTO=>yRTO(startIndex:endIndex)
00222
00223
00224 end do
00225
00226
00227
00228
00229
00230 do i=1,numberOfPhysics
00231
00232 currentPhysics=i
00233
00234 physicsDof=>myModel%physics(currentPhysics)%totalDof
00235
00236 numberOfDomains=>myModel%physics(currentPhysics)%numberOfDomains
00237
00238
00239 dummy=0
00240
00241 do j=1,numberOfDomains
00242
00243 currentDomain=j
00244
00245 startIndex=dummy+1
00246
00247 domainDof=>myModel%physics(currentPhysics)%domain(currentDomain)%totalDof
00248
00249 endIndex=startIndex+domainDof-1
00250
00251
00252 myModel%physics(currentPhysics)%domain(currentDomain)%x=>myModel%physics(currentPhysics)%x(startIndex:endIndex)
00253
00254 myModel%physics(currentPhysics)%domain(currentDomain)%xPTO=>myModel%physics(currentPhysics)%xPTO(startIndex:endIndex)
00255
00256 myModel%physics(currentPhysics)%domain(currentDomain)%xRTO=>myModel%physics(currentPhysics)%xRTO(startIndex:endIndex)
00257
00258 dummy=domainDof+dummy
00259
00260
00261 end do
00262
00263 end do
00264
00265 discreteY=>y
00266
00267
00268 deallocate(mymodel%pVec)
00269 nullify(pVEc)
00270
00271
00272
00273
00274
00275
00276
00277 end subroutine preprocessor