update_s_visc_PML_SH.c 21.1 KB
Newer Older
1
/*-----------------------------------------------------------------------------------------
2
 * Copyright (C) 2016  For the list of authors, see file AUTHORS.
3
 *
Florian Wittkamp's avatar
Florian Wittkamp committed
4
 * This file is part of IFOS.
5
 *
Florian Wittkamp's avatar
Florian Wittkamp committed
6
 * IFOS is free software: you can redistribute it and/or modify
7 8 9
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 2.0 of the License only.
 *
Florian Wittkamp's avatar
Florian Wittkamp committed
10
 * IFOS is distributed in the hope that it will be useful,
11 12 13 14 15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
Florian Wittkamp's avatar
Florian Wittkamp committed
16
 * along with IFOS. See file COPYING and/or <http://www.gnu.org/licenses/gpl-2.0.html>.
17 18 19 20 21 22 23 24 25 26 27 28
 -----------------------------------------------------------------------------------------*/

/*------------------------------------------------------------------------
 *   updating stress components at gridpoints [nx1...nx2][ny1...ny2]
 *   by a staggered grid finite difference scheme of arbitrary (FDORDER) order accuracy in space
 *   and second order accuracy in time
 *
 *
 *  ----------------------------------------------------------------------*/

#include "fd.h"

29
void update_s_visc_PML_SH(int nx1, int nx2, int ny1, int ny2, float **  vz, float **   sxz, float **   syz, float ***t, float ***o, float *bip, float *bjm, float *cip, float *cjm, float ***d, float ***dip, float **fipjp, float **f, float *hc,  int infoout,float * K_x, float * a_x, float * b_x, float * K_x_half, float * a_x_half, float * b_x_half,float * K_y, float * a_y, float * b_y, float * K_y_half, float * a_y_half, float * b_y_half,float ** psi_vzx, float ** psi_vzy){
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
    
    int i,j, m, fdoh, h, h1, l;
    
    float vzx, vzy;
    
    float  dhi, dthalbe;
    extern float DT, DH;
    extern int MYID, FDORDER, FW, L;
    extern int FREE_SURF, BOUNDARY;
    extern int NPROCX, NPROCY, POS[3];
    extern FILE *FP;
    double time1, time2;
    
    float sumo=0.0, sumt=0.0;
    
    dhi=1.0/DH;
    fdoh = FDORDER/2;
    dthalbe = DT/2.0;
    
    
    if (infoout && (MYID==0)){
        time1=MPI_Wtime();
        fprintf(FP,"\n **Message from update_s_SH (printed by PE %d):\n",MYID);
        fprintf(FP," Updating stress components ...");
    }
    
    
    switch (FDORDER){
            
        case 2:
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
            for (j=ny1;j<=ny2;j++){
                for (i=nx1;i<=nx2;i++){
                    vzx = (  hc[1]*(vz[j][i+1]-vz[j][i]))*dhi;
                    
                    vzy = (  hc[1]*(vz[j][i]-vz[j-1][i]))*dhi;
                    
                    
                    /* left boundary */
                    if((!BOUNDARY) && (POS[1]==0) && (i<=FW)){
                        psi_vzx[j][i] = b_x_half[i] * psi_vzx[j][i] + a_x_half[i] * vzx;
                        vzx = vzx / K_x_half[i] + psi_vzx[j][i];
                    }
                    
                    /* right boundary */
                    if((!BOUNDARY) && (POS[1]==NPROCX-1) && (i>=nx2-FW+1)){
                        h1 = (i-nx2+2*FW);
                        h = i;
                        psi_vzx[j][h1] = b_x_half[h1] * psi_vzx[j][h1] + a_x_half[h1] * vzx;
                        vzx = vzx / K_x_half[h1] + psi_vzx[j][h1];
                    }
                    
                    /* top boundary */
                    if((POS[2]==0) && (!(FREE_SURF)) && (j<=FW)){
                        psi_vzy[j][i] = b_y[j] * psi_vzy[j][i] + a_y[j] * vzy;
                        vzy = vzy / K_y[j] + psi_vzy[j][i];
                    }
                    
                    /* bottom boundary */
                    if((POS[2]==NPROCY-1) && (j>=ny2-FW+1)){
                        h1 = (j-ny2+2*FW);
                        h = j;
                        psi_vzy[h1][i] = b_y[h1] * psi_vzy[h1][i] + a_y[h1] * vzy;
                        vzy = vzy / K_y[h1] + psi_vzy[h1][i];
                    }
                    
                    /* computing sums of the old memory variables */
                    sumt=sumo=0.0;
                    for (l=1;l<=L;l++){
                        sumo+=o[j][i][l];
                        sumt+=t[j][i][l];
                    }
                    
                    /* updating components of the stress tensor, partially */
                    sxz[j][i]+=(fipjp[j][i]*vzx)+(dthalbe*sumo);
                    syz[j][i]+=(f[j][i]*vzy)+(dthalbe*sumt);
                    
                    
                    /* now updating the memory-variables and sum them up*/
                    sumt=sumo=0.0;
                    for (l=1;l<=L;l++){
                        o[j][i][l]=bip[l]*(o[j][i][l]*cip[l]-(dip[j][i][l]*vzx));
                        t[j][i][l]=bjm[l]*(t[j][i][l]*cjm[l]-(d[j][i][l]*vzy));
                        sumt+=t[j][i][l];
                        sumo+=o[j][i][l];
                    }
                    
                    /* and now the components of the stress tensor are
                     completely updated */
                    sxz[j][i]+=(dthalbe*sumo);
                    syz[j][i]+=(dthalbe*sumt);
                }
            }
            
123 124 125 126 127
            break;
            
        case 4:
            for (j=ny1;j<=ny2;j++){
                for (i=nx1;i<=nx2;i++){
128
                    
129 130 131
                    vzx = (  hc[1]*(vz[j][i+1]-vz[j][i])
                           + hc[2]*(vz[j][i+2]-vz[j][i-1]))*dhi;
                    
132 133
                    vzy = (  hc[1]*(vz[j][i]-vz[j-1][i])
                           + hc[2]*(vz[j+1][i]-vz[j-2][i]))*dhi;
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171
                    
                    
                    /* left boundary */
                    if((!BOUNDARY) && (POS[1]==0) && (i<=FW)){
                        psi_vzx[j][i] = b_x_half[i] * psi_vzx[j][i] + a_x_half[i] * vzx;
                        vzx = vzx / K_x_half[i] + psi_vzx[j][i];
                    }
                    
                    /* right boundary */
                    if((!BOUNDARY) && (POS[1]==NPROCX-1) && (i>=nx2-FW+1)){
                        h1 = (i-nx2+2*FW);
                        h = i;
                        psi_vzx[j][h1] = b_x_half[h1] * psi_vzx[j][h1] + a_x_half[h1] * vzx;
                        vzx = vzx / K_x_half[h1] + psi_vzx[j][h1];
                    }
                    
                    /* top boundary */
                    if((POS[2]==0) && (!(FREE_SURF)) && (j<=FW)){
                        psi_vzy[j][i] = b_y[j] * psi_vzy[j][i] + a_y[j] * vzy;
                        vzy = vzy / K_y[j] + psi_vzy[j][i];
                    }
                    
                    /* bottom boundary */
                    if((POS[2]==NPROCY-1) && (j>=ny2-FW+1)){
                        h1 = (j-ny2+2*FW);
                        h = j;
                        psi_vzy[h1][i] = b_y[h1] * psi_vzy[h1][i] + a_y[h1] * vzy;
                        vzy = vzy / K_y[h1] + psi_vzy[h1][i];
                    }
                    
                    /* computing sums of the old memory variables */
                    sumt=sumo=0.0;
                    for (l=1;l<=L;l++){
                        sumo+=o[j][i][l];
                        sumt+=t[j][i][l];
                    }
                    
                    /* updating components of the stress tensor, partially */
172 173
                    sxz[j][i]+=(fipjp[j][i]*vzx)+(dthalbe*sumo);
                    syz[j][i]+=(f[j][i]*vzy)+(dthalbe*sumt);
174 175 176 177 178
                    
                    
                    /* now updating the memory-variables and sum them up*/
                    sumt=sumo=0.0;
                    for (l=1;l<=L;l++){
179 180
                        o[j][i][l]=bip[l]*(o[j][i][l]*cip[l]-(dip[j][i][l]*vzx));
                        t[j][i][l]=bjm[l]*(t[j][i][l]*cjm[l]-(d[j][i][l]*vzy));
181 182 183 184 185 186 187 188 189 190 191 192 193
                        sumt+=t[j][i][l];
                        sumo+=o[j][i][l];
                    }
                    
                    /* and now the components of the stress tensor are
                     completely updated */
                    sxz[j][i]+=(dthalbe*sumo);
                    syz[j][i]+=(dthalbe*sumt);
                }
            }
            break;
            
        case 6:
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259
            for (j=ny1;j<=ny2;j++){
                for (i=nx1;i<=nx2;i++){
                    vzx = (  hc[1]*(vz[j][i+1]-vz[j][i])
                           + hc[2]*(vz[j][i+2]-vz[j][i-1])
                           + hc[3]*(vz[j][i+3]-vz[j][i-2]))*dhi;
                    
                    vzy = (  hc[1]*(vz[j][i]-vz[j-1][i])
                           + hc[2]*(vz[j+1][i]-vz[j-2][i])
                           + hc[3]*(vz[j+2][i]-vz[j-3][i]))*dhi;
                    
                    
                    /* left boundary */
                    if((!BOUNDARY) && (POS[1]==0) && (i<=FW)){
                        psi_vzx[j][i] = b_x_half[i] * psi_vzx[j][i] + a_x_half[i] * vzx;
                        vzx = vzx / K_x_half[i] + psi_vzx[j][i];
                    }
                    
                    /* right boundary */
                    if((!BOUNDARY) && (POS[1]==NPROCX-1) && (i>=nx2-FW+1)){
                        h1 = (i-nx2+2*FW);
                        h = i;
                        psi_vzx[j][h1] = b_x_half[h1] * psi_vzx[j][h1] + a_x_half[h1] * vzx;
                        vzx = vzx / K_x_half[h1] + psi_vzx[j][h1];
                    }
                    
                    /* top boundary */
                    if((POS[2]==0) && (!(FREE_SURF)) && (j<=FW)){
                        psi_vzy[j][i] = b_y[j] * psi_vzy[j][i] + a_y[j] * vzy;
                        vzy = vzy / K_y[j] + psi_vzy[j][i];
                    }
                    
                    /* bottom boundary */
                    if((POS[2]==NPROCY-1) && (j>=ny2-FW+1)){
                        h1 = (j-ny2+2*FW);
                        h = j;
                        psi_vzy[h1][i] = b_y[h1] * psi_vzy[h1][i] + a_y[h1] * vzy;
                        vzy = vzy / K_y[h1] + psi_vzy[h1][i];
                    }
                    
                    /* computing sums of the old memory variables */
                    sumt=sumo=0.0;
                    for (l=1;l<=L;l++){
                        sumo+=o[j][i][l];
                        sumt+=t[j][i][l];
                    }
                    
                    /* updating components of the stress tensor, partially */
                    sxz[j][i]+=(fipjp[j][i]*vzx)+(dthalbe*sumo);
                    syz[j][i]+=(f[j][i]*vzy)+(dthalbe*sumt);
                    
                    
                    /* now updating the memory-variables and sum them up*/
                    sumt=sumo=0.0;
                    for (l=1;l<=L;l++){
                        o[j][i][l]=bip[l]*(o[j][i][l]*cip[l]-(dip[j][i][l]*vzx));
                        t[j][i][l]=bjm[l]*(t[j][i][l]*cjm[l]-(d[j][i][l]*vzy));
                        sumt+=t[j][i][l];
                        sumo+=o[j][i][l];
                    }
                    
                    /* and now the components of the stress tensor are
                     completely updated */
                    sxz[j][i]+=(dthalbe*sumo);
                    syz[j][i]+=(dthalbe*sumt);
                }
            }
260 261 262
            break;
            
        case 8:
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403
            for (j=ny1;j<=ny2;j++){
                for (i=nx1;i<=nx2;i++){
                    vzx = (  hc[1]*(vz[j][i+1]-vz[j][i])
                           + hc[2]*(vz[j][i+2]-vz[j][i-1])
                           + hc[3]*(vz[j][i+3]-vz[j][i-2])
                           + hc[4]*(vz[j][i+4]-vz[j][i-3]))*dhi;
                    
                    vzy = (  hc[1]*(vz[j][i]-vz[j-1][i])
                           + hc[2]*(vz[j+1][i]-vz[j-2][i])
                           + hc[3]*(vz[j+2][i]-vz[j-3][i])
                           + hc[4]*(vz[j+3][i]-vz[j-4][i]))*dhi;
                    
                    
                    /* left boundary */
                    if((!BOUNDARY) && (POS[1]==0) && (i<=FW)){
                        psi_vzx[j][i] = b_x_half[i] * psi_vzx[j][i] + a_x_half[i] * vzx;
                        vzx = vzx / K_x_half[i] + psi_vzx[j][i];
                    }
                    
                    /* right boundary */
                    if((!BOUNDARY) && (POS[1]==NPROCX-1) && (i>=nx2-FW+1)){
                        h1 = (i-nx2+2*FW);
                        h = i;
                        psi_vzx[j][h1] = b_x_half[h1] * psi_vzx[j][h1] + a_x_half[h1] * vzx;
                        vzx = vzx / K_x_half[h1] + psi_vzx[j][h1];
                    }
                    
                    /* top boundary */
                    if((POS[2]==0) && (!(FREE_SURF)) && (j<=FW)){
                        psi_vzy[j][i] = b_y[j] * psi_vzy[j][i] + a_y[j] * vzy;
                        vzy = vzy / K_y[j] + psi_vzy[j][i];
                    }
                    
                    /* bottom boundary */
                    if((POS[2]==NPROCY-1) && (j>=ny2-FW+1)){
                        h1 = (j-ny2+2*FW);
                        h = j;
                        psi_vzy[h1][i] = b_y[h1] * psi_vzy[h1][i] + a_y[h1] * vzy;
                        vzy = vzy / K_y[h1] + psi_vzy[h1][i];
                    }
                    
                    /* computing sums of the old memory variables */
                    sumt=sumo=0.0;
                    for (l=1;l<=L;l++){
                        sumo+=o[j][i][l];
                        sumt+=t[j][i][l];
                    }
                    
                    /* updating components of the stress tensor, partially */
                    sxz[j][i]+=(fipjp[j][i]*vzx)+(dthalbe*sumo);
                    syz[j][i]+=(f[j][i]*vzy)+(dthalbe*sumt);
                    
                    
                    /* now updating the memory-variables and sum them up*/
                    sumt=sumo=0.0;
                    for (l=1;l<=L;l++){
                        o[j][i][l]=bip[l]*(o[j][i][l]*cip[l]-(dip[j][i][l]*vzx));
                        t[j][i][l]=bjm[l]*(t[j][i][l]*cjm[l]-(d[j][i][l]*vzy));
                        sumt+=t[j][i][l];
                        sumo+=o[j][i][l];
                    }
                    
                    /* and now the components of the stress tensor are
                     completely updated */
                    sxz[j][i]+=(dthalbe*sumo);
                    syz[j][i]+=(dthalbe*sumt);
                }
            }
            break;
            
        case 10:
            for (j=ny1;j<=ny2;j++){
                for (i=nx1;i<=nx2;i++){
                    vzx = (  hc[1]*(vz[j][i+1]-vz[j][i])
                           + hc[2]*(vz[j][i+2]-vz[j][i-1])
                           + hc[3]*(vz[j][i+3]-vz[j][i-2])
                           + hc[4]*(vz[j][i+4]-vz[j][i-3])
                           + hc[5]*(vz[j][i+5]-vz[j][i-4]))*dhi;
                    
                    vzy = (  hc[1]*(vz[j][i]-vz[j-1][i])
                           + hc[2]*(vz[j+1][i]-vz[j-2][i])
                           + hc[3]*(vz[j+2][i]-vz[j-3][i])
                           + hc[4]*(vz[j+3][i]-vz[j-4][i])
                           + hc[5]*(vz[j+4][i]-vz[j-5][i]))*dhi;
                    
                    
                    /* left boundary */
                    if((!BOUNDARY) && (POS[1]==0) && (i<=FW)){
                        psi_vzx[j][i] = b_x_half[i] * psi_vzx[j][i] + a_x_half[i] * vzx;
                        vzx = vzx / K_x_half[i] + psi_vzx[j][i];
                    }
                    
                    /* right boundary */
                    if((!BOUNDARY) && (POS[1]==NPROCX-1) && (i>=nx2-FW+1)){
                        h1 = (i-nx2+2*FW);
                        h = i;
                        psi_vzx[j][h1] = b_x_half[h1] * psi_vzx[j][h1] + a_x_half[h1] * vzx;
                        vzx = vzx / K_x_half[h1] + psi_vzx[j][h1];
                    }
                    
                    /* top boundary */
                    if((POS[2]==0) && (!(FREE_SURF)) && (j<=FW)){
                        psi_vzy[j][i] = b_y[j] * psi_vzy[j][i] + a_y[j] * vzy;
                        vzy = vzy / K_y[j] + psi_vzy[j][i];
                    }
                    
                    /* bottom boundary */
                    if((POS[2]==NPROCY-1) && (j>=ny2-FW+1)){
                        h1 = (j-ny2+2*FW);
                        h = j;
                        psi_vzy[h1][i] = b_y[h1] * psi_vzy[h1][i] + a_y[h1] * vzy;
                        vzy = vzy / K_y[h1] + psi_vzy[h1][i];
                    }
                    
                    /* computing sums of the old memory variables */
                    sumt=sumo=0.0;
                    for (l=1;l<=L;l++){
                        sumo+=o[j][i][l];
                        sumt+=t[j][i][l];
                    }
                    
                    /* updating components of the stress tensor, partially */
                    sxz[j][i]+=(fipjp[j][i]*vzx)+(dthalbe*sumo);
                    syz[j][i]+=(f[j][i]*vzy)+(dthalbe*sumt);
                    
                    
                    /* now updating the memory-variables and sum them up*/
                    sumt=sumo=0.0;
                    for (l=1;l<=L;l++){
                        o[j][i][l]=bip[l]*(o[j][i][l]*cip[l]-(dip[j][i][l]*vzx));
                        t[j][i][l]=bjm[l]*(t[j][i][l]*cjm[l]-(d[j][i][l]*vzy));
                        sumt+=t[j][i][l];
                        sumo+=o[j][i][l];
                    }
                    
                    /* and now the components of the stress tensor are
                     completely updated */
                    sxz[j][i]+=(dthalbe*sumo);
                    syz[j][i]+=(dthalbe*sumt);
                }
            }
404 405
            break;
            
406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478
        case 12:
            for (j=ny1;j<=ny2;j++){
                for (i=nx1;i<=nx2;i++){
                    vzx = (  hc[1]*(vz[j][i+1]-vz[j][i])
                           + hc[2]*(vz[j][i+2]-vz[j][i-1])
                           + hc[3]*(vz[j][i+3]-vz[j][i-2])
                           + hc[4]*(vz[j][i+4]-vz[j][i-3])
                           + hc[5]*(vz[j][i+5]-vz[j][i-4])
                           + hc[6]*(vz[j][i+6]-vz[j][i-5]))*dhi;
                    
                    vzy = (  hc[1]*(vz[j][i]-vz[j-1][i])
                           + hc[2]*(vz[j+1][i]-vz[j-2][i])
                           + hc[3]*(vz[j+2][i]-vz[j-3][i])
                           + hc[4]*(vz[j+3][i]-vz[j-4][i])
                           + hc[5]*(vz[j+4][i]-vz[j-5][i])
                           + hc[6]*(vz[j+5][i]-vz[j-6][i]))*dhi;
                    
                    /* left boundary */
                    if((!BOUNDARY) && (POS[1]==0) && (i<=FW)){
                        psi_vzx[j][i] = b_x_half[i] * psi_vzx[j][i] + a_x_half[i] * vzx;
                        vzx = vzx / K_x_half[i] + psi_vzx[j][i];
                    }
                    
                    /* right boundary */
                    if((!BOUNDARY) && (POS[1]==NPROCX-1) && (i>=nx2-FW+1)){
                        h1 = (i-nx2+2*FW);
                        h = i;
                        psi_vzx[j][h1] = b_x_half[h1] * psi_vzx[j][h1] + a_x_half[h1] * vzx;
                        vzx = vzx / K_x_half[h1] + psi_vzx[j][h1];
                    }
                    
                    /* top boundary */
                    if((POS[2]==0) && (!(FREE_SURF)) && (j<=FW)){
                        psi_vzy[j][i] = b_y[j] * psi_vzy[j][i] + a_y[j] * vzy;
                        vzy = vzy / K_y[j] + psi_vzy[j][i];
                    }
                    
                    /* bottom boundary */
                    if((POS[2]==NPROCY-1) && (j>=ny2-FW+1)){
                        h1 = (j-ny2+2*FW);
                        h = j;
                        psi_vzy[h1][i] = b_y[h1] * psi_vzy[h1][i] + a_y[h1] * vzy;
                        vzy = vzy / K_y[h1] + psi_vzy[h1][i];
                    }
                    
                    /* computing sums of the old memory variables */
                    sumt=sumo=0.0;
                    for (l=1;l<=L;l++){
                        sumo+=o[j][i][l];
                        sumt+=t[j][i][l];
                    }
                    
                    /* updating components of the stress tensor, partially */
                    sxz[j][i]+=(fipjp[j][i]*vzx)+(dthalbe*sumo);
                    syz[j][i]+=(f[j][i]*vzy)+(dthalbe*sumt);
                    
                    
                    /* now updating the memory-variables and sum them up*/
                    sumt=sumo=0.0;
                    for (l=1;l<=L;l++){
                        o[j][i][l]=bip[l]*(o[j][i][l]*cip[l]-(dip[j][i][l]*vzx));
                        t[j][i][l]=bjm[l]*(t[j][i][l]*cjm[l]-(d[j][i][l]*vzy));
                        sumt+=t[j][i][l];
                        sumo+=o[j][i][l];
                    }
                    
                    /* and now the components of the stress tensor are
                     completely updated */
                    sxz[j][i]+=(dthalbe*sumo);
                    syz[j][i]+=(dthalbe*sumt);
                }
            }
            break;
479
        default:
480
            declare_error("\n FDORDER not supported");
481 482 483 484 485 486 487 488 489 490
            break;
            
    } /* end of switch(FDORDER) */
    
    
    if (infoout && (MYID==0)){
        time2=MPI_Wtime();
        fprintf(FP," finished (real time: %4.2f s).\n",time2-time1);
    }
}