00001 subroutine addBC
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067 use global
00068
00069
00070 implicit none
00071
00072 integer,pointer :: IM(:,:,:,:)
00073 integer,pointer :: nx,ny
00074
00075 integer bcValue
00076
00077
00078
00079
00080
00081
00082
00083 IM=>myModel%physics(currentPhysics)%domain(currentDomain)%DofMatrix
00084
00085 nx=>myModel%physics(currentPhysics)%domain(currentDomain)%nx
00086 ny=>myModel%physics(currentPhysics)%domain(currentDomain)%ny
00087
00088
00089
00090 IM(:,:,:,boundary)=0
00091
00092
00093
00094
00095
00096
00097
00098 select case(currentPhysics)
00099
00100
00101 case(1)
00102
00103 select case(currentDomain)
00104
00105
00106 case(1)
00107
00108
00109 bcValue=1
00110 IM(:,:,:,boundary)=bcValue
00111
00112
00113 bcValue=2
00114 IM(1,1:ny,:,boundary)=bcValue
00115 IM(2:nx,1,:,boundary)=bcValue
00116 IM(2:nx,ny,:,boundary)=bcValue
00117
00118
00119 bcValue=3
00120 IM(nx,2:ny-1,:,boundary)=bcValue
00121
00122 case(2)
00123
00124
00125 bcValue=1
00126 IM(:,:,:,boundary)=bcValue
00127
00128
00129 bcValue=2
00130 IM(2:nx-1,1,:,boundary)=bcValue
00131 IM(2:nx-1,ny,:,boundary)=bcValue
00132
00133
00134 bcValue=3
00135 IM(1,:,:,boundary)=bcValue
00136
00137
00138 bcValue=4
00139 IM(nx,:,:,boundary)=bcValue
00140
00141
00142
00143
00144
00145 case default
00146
00147 print*,'no bc definition'
00148 print*,'demona stop in addBC'
00149 stop
00150
00151 end select
00152
00153
00154 case(2)
00155
00156
00157 select case(currentDomain)
00158
00159
00160 case(1)
00161
00162
00163 bcValue=1
00164 IM(:,:,:,boundary)=bcValue
00165
00166
00167 bcValue=2
00168 IM(1:nx,1,:,boundary)=bcValue
00169 IM(1:nx,ny,:,boundary)=bcValue
00170
00171
00172 bcValue=3
00173 IM(1,2:ny-1,:,boundary)=bcValue
00174
00175
00176 bcValue=4
00177 IM(nx,2:ny-1,:,boundary)=bcValue
00178
00179
00180 case default
00181
00182 print*,'no bc definition'
00183 print*,'demona stop in addBC'
00184 stop
00185
00186 end select
00187
00188
00189
00190 case(3)
00191
00192 select case(currentDomain)
00193
00194
00195 case(1)
00196
00197
00198 bcValue=1
00199 IM(:,:,:,boundary)=bcValue
00200
00201
00202 bcValue=2
00203 IM(2:nx-1,1,:,boundary)=bcValue
00204 IM(2:nx-1,ny,:,boundary)=bcValue
00205
00206
00207 bcValue=3
00208 IM(1,:,:,boundary)=bcValue
00209
00210
00211 bcValue=4
00212 IM(nx,:,:,boundary)=bcValue
00213
00214 case(2)
00215
00216
00217 bcValue=1
00218 IM(:,:,:,boundary)=bcValue
00219
00220
00221 bcValue=2
00222 IM(nx,1:ny,:,boundary)=bcValue
00223 IM(1:nx,1,:,boundary)=bcValue
00224 IM(1:nx,ny,:,boundary)=bcValue
00225
00226
00227 bcValue=3
00228 IM(1,2:ny-1,:,boundary)=bcValue
00229
00230
00231
00232 case default
00233
00234 print*,'no bc definition'
00235 print*,'demona stop in addBC'
00236 stop
00237
00238 end select
00239
00240
00241 end select
00242
00243
00244
00245
00246
00247
00248
00249
00250 end subroutine addBC