亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? time_3d.c

?? 這是一層析靜校正的源碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
/*----------------------------------------------------------------------------*//*  TIME_3D: FINITE DIFFERENCE COMPUTATION OF FIRST ARRIVAL TIMES IN 3D.      *//*----------------------------------------------------------------------------*//*  P.PODVIN, CGGM/Geophysique, Ecole des Mines de Paris, Fontainebleau.      *//*  E-MAIL: podvin@cggm.ensmp.fr            Tel: 33-(1) 64 69 49 25.          *//*  April 1991, last revision: 7 May 1993                                     *//*                                                                            *//*  This is a plain K&R C (not ANSI-C) code.                                  *//*                                                                            *//*  USAGE: (from a program written in C or in FORTRAN)                        *//*       (int)i_status=time_3d(HS,T,NX,NY,NZ,XS,YS,ZS,HS_EPS_INIT,MSG)        *//*                                                                            *//*  ARGUMENTS: (C description. All FORTRAN arguments are pointers)            *//*    (int)      NX,NY,NZ : Dimensions of the timefield. Cells are cubic.     *//*                          Real model dimensions are NX-1,NY-1,NZ-1.         *//*    (float *)      HS,T : 1-D arrays. Length: NX*NY*NZ                      *//*                          HS[] is interpreted as slowness*mesh parameter,   *//*                          so that associated physical dimension is Time.    *//*                          Both arrays must be arranged as a succession of   *//*                          planes x (resp. z)=Ct, each plane consisting of   *//*                          a suite of y=Ct vectors when this program is      *//*                          called from a program written in C (resp.FORTRAN).*//*                          hs and t are 3D pointers allocated in order       *//*                          to address points and cells straightforwardly.    *//*                          Implicitly staggered grids are used: t[][][]      *//*                          represent arrival times at grid-points, whereas   *//*                          hs[][][] describe (constant) slownesses in cells. *//*                          Cells such that x=NX-1 or y=NY-1 or z=NZ-1 are    *//*                          thus dummy cells located OUT of the model.        *//*                          Their associated slowness is treated as INFINITY  *//*                          (absorbing boundary conditions).                  *//*                          Negative hs values are unphysical and forbidden.  *//*    (float)    XS,YS,ZS : real point source coordinates, i.e. distances     *//*                          along axes between source point and corner 0,0,0  *//*                          of the timefield, measured in h units.            *//*                          e.g. 0.0<=XS<=(float)(NX-1)                       *//*                          If source coordinates are illicit (out of model   *//*                          bounds), the program uses T as a pre-initialized  *//*                          timefield (multiple source, e.g. exploding        *//*                          reflector). At least one element of T must then   *//*                          be finite.                                        *//*    (float) HS_EPS_INIT : fraction (typically 1.0E-3) defining the toler-   *//*                          ated model inhomogeneity for exact initialization.*//*                          A tolerance larger than 0.01 will potentially     *//*                          create errors larger than those involved by the   *//*                          F.D. scheme without any exact initialization.     *//*                          (this arg. is used only in the point source case) *//*    (int)           MSG : Message flag (0:silent,1:few messages,2:verbose)  *//*                          A negative value inhibits "clever" initialization.*//*                                                                            *//*  VALUE: time_3d() returns a nonzero integer if an error occurred.          *//*      In such case, an explicit message is printed on 'stderr'.             *//*                                                                            *//*  FORTRAN INTERFACE: see function time_3d_(). Standard FORTRAN conventions  *//*      are adopted: indexes start at 1 (but this is irrelevant here!),       *//*      and arrays are transposed to fit FORTRAN-style memory mapping.        *//*      e.g.: MAIN program                                                    *//*            parameter (MAXNODES=...)                                        *//*            real*4 hs(MAXNODES),t(MAXNODES)                                 *//*            integer*4 time_3d                                               *//*            nx=... ny=... nz=...                        ! #grid-points      *//*            xs=...(0<=xs<=nx-1) ys=... zs=...           ! source point      *//*            eps_hs=0.001                                ! tolerance         *//*            call build_model(hs,nx,ny,nz)                                   *//*            itime_3d_status=time_3d(hs,t,nx,ny,nz,xs,ys,zs,eps_hs,msg)      *//*            if(itime_3d_status.ne.0) ----> an error occurred !              *//*            ...                                                             *//*            stop                                                            *//*            end                                                             *//*                                                                            *//*            SUBROUTINE build_model(hs,nx,ny,nz)                             *//*            real*4 hs(nx,ny,nz)                                             *//*            nested loops: k=...(1<=k<=nz-1) j=... i=... ! cell coordinates  *//*                  hs(i,j,k)=...                                             *//*            end loops                                                       *//*            return                                                          *//*            end                                                             *//*                                                                            *//*      With SunOS, the FORTRAN compiler appends the final '_' to FORTRAN     *//*      function name 'time_3d'. Full name 'time_3d_' may be necessary on     *//*      other systems. Remember that NO standard C/Fortran interface exists ! *//*                                                                            *//*  PREPROCESSOR OPTIONS:       (/bin/cpp options applicable at compile time) *//*      -DNO_IEEE_PROTOCOL : for systems where IEEE standards are not defined *//*      -DINIT_MIN=value   :         these two options control initialization *//*      -DINIT_RECURS_LIMIT=value     (see comments after #ifndef directives) *//*                                                                            *//*  BUGS :                                                                    *//*       All known bugs are ascribed to bad argument list  or C/Fortran       *//*       interface problems . Most frequent sources of confusing errors :     *//*       -incorrect argument types (NX MUST be an integer, XS a real number)  *//*       -incorrect initialization of array T when using a multiple source    *//*       (e.g. T being initialized with zeroes,if source coordinates are out  *//*        of model boundaries, then array T will be left unchanged !)         *//*                                                                            *//*  REFERENCE: Podvin & Lecomte, Geophys.J.Intern. 105, 271-284, 1991.        *//*----------------------------------------------------------------------------*/#include <stdio.h>#include <math.h>#define MM_SQRT2     1.41421356237309504880#define MM_SQRT3     1.732050807568877076#define INFINITY    1.0e+19#define ISINF(x)    ((x)>1.0e+18)#define NINT(x)     (int)floor((x)+0.5)#define min(x,y) (((x)<(y)) ? (x):(y))#define max(x,y) (((x)>(y)) ? (x):(y))#define min3(x,y,z) (min(x,min(y,z)))#define min4(x,y,z,t) (min(x,min(y,min(z,t))))/*-------------------------------------Static functions-----------------------*/static int    pre_init(/* void */),    init_point(/* void */),    recursive_init(/* void */),    propagate_point(/* int */),    x_side(/* int,int,int,int,int,int */),    y_side(/* int,int,int,int,int,int */),    z_side(/* int,int,int,int,int,int */),    scan_x_ff(/* int,int,int,int,int,int,int */),    scan_x_fb(/* int,int,int,int,int,int,int */),    scan_x_bf(/* int,int,int,int,int,int,int */),    scan_x_bb(/* int,int,int,int,int,int,int */),    scan_y_ff(/* int,int,int,int,int,int,int */),    scan_y_fb(/* int,int,int,int,int,int,int */),    scan_y_bf(/* int,int,int,int,int,int,int */),    scan_y_bb(/* int,int,int,int,int,int,int */),    scan_z_ff(/* int,int,int,int,int,int,int */),    scan_z_fb(/* int,int,int,int,int,int,int */),    scan_z_bf(/* int,int,int,int,int,int,int */),    scan_z_bb(/* int,int,int,int,int,int,int */);    /* the only fully commented "side" functions are x_side() ans scan_x_ff() */static void    error(/* int */),    init_nearest(/* void */),    init_cell(/* int,int,int,int,int,int */),    free_ptrs(/* int */);static float    exact_delay(/* float,float,float,int,int,int */);static int    t_1d(/* int,int,int,float,float,float,float,float */),    t_2d(/* int,int,int,float,float,float,float */),    diff_2d(/* int,int,int,float,float,float */),    t_3d_(/* int,int,int,float,float,float,float,float,int */),    t_3d_part1(/* int,int,int,float,float,float,float */),    point_diff(/* int,int,int,float,float */),    edge_diff(/* int,int,int,float,float,float */);/*-------------------------------------Static variables-----------------------*//* MODEL */static int    nmesh_x,nmesh_y,nmesh_z;          /* Model dimensions (cells) */static float    ***hs,*hs_buf,                    /* 1D and 3D arrays */    *hs_keep=(float *)NULL;           /* to save boundary values *//* TIMEFIELD */static int    nx,ny,nz;                         /* Timefield dimensions (nodes) */static float    ***t,*t_buf;                      /* 1D and 3D arrays *//* SOURCE */static float    fxs,fys,fzs;                      /* Point source coordinates */static int    xs,ys,zs;                         /* Nearest node */static int    mult=0;                           /* Flag used for multiple source *//* PARAMETERS */#ifndef INIT_MIN#define INIT_MIN             7#endif /* INIT_MIN */#define N_INIT_X    (4*INIT_MIN+3)#define N_INIT      N_INIT_X*N_INIT_X*N_INIT_X                                      /* This conventional value defines  */                                      /* the maximum size of the box that */                                      /* will be initialized recursively. */                                      /* (ADJUSTABLE at compile time).    */                                      /* Default value is reasonable.     */                                      /* Cost is already high: 3584 to    */                                      /* 26416 more points according to   */                                      /* source position.                 */#ifndef INIT_RECURS_LIMIT#define INIT_RECURS_LIMIT    2#endif /* INIT_RECURS_LIMIT */                                      /* This parameter defines the maximal */                                      /* level of recursivity during init.  */                                      /* (ADJUSTABLE at compile time).      */                                      /* Value zero would practically rest- */                                      /* rain initialization to the source  */                                      /* point in heterogeneous models.     */                                      /* Value 2 is advisable only when     */                                      /* VERY severe heterogeneities are    */                                      /* located close to the source point. */static int    messages=2,                       /* message flag (0:silent)              */    source_at_node=0,                 /* are source coordinate int's ? (0/1)  */    no_init=0,                        /* 1: inhibition of "clever" init.      */    init_stage=0,                     /* level of recursivity during init.    */    current_side_limit,               /* actual boundary of computations      */    X0,X1,Y0,Y1,Z0,Z1,                /* inclusive boundaries of timed region */    sum_updated,                      /* total count of adopted FD stencils   */    reverse_order,                    /* level of recursivity in FD scheme    */    *longflags,                       /* local headwave flags.                */    flag_fb,x_start_fb,y_start_fb,z_start_fb,    flag_bf,x_start_bf,y_start_bf,z_start_bf,    flag_ff,x_start_ff,y_start_ff,z_start_ff,    flag_bb,x_start_bb,y_start_bb,z_start_bb;                                      /* control current side scanning.       */static float    hs_eps_init;                      /* tolerance on homogeneity                                       (fraction of slowness at source point) */#define SMALLTALK        messages#define VERBOSE          messages==2/*------------------------------------------------Error flags---------------*/#define NO_ERROR         0#define ERR_MULT         (-1)#define ERR_INF          (-2)#define ERR_RECURS       (-3)#define ERR_MALLOC       (-4)#define ERR_HS_EPS       (-5)#define ERR_NONPHYSICAL  (-6)static char *err_msg[]=            {                "\ntime_3d: Computations terminated normally.\n",                "\ntime_3d: Multiple source but no source at finite time.\n",                "\ntime_3d: Source point is in a zero velocity zone.\n",                "\ntime_3d: Fatal error during recursive init.\n",                "\ntime_3d: Memory Allocation failed.\n",                "\ntime_3d: Init: Illegal tolerance on inhomogeneity.\n",                "\ntime_3d: Illegal negative slowness value.\n"            };/*-------------------------------------------------Error()------------------*/static voiderror(flag)int flag;{    fflush(stdout);    if(messages || flag) fprintf(stderr,"%s",err_msg[-flag]);}/*-------------------------------------------------Time_3d()----------------*/inttime_3d(HS,T,NX,NY,NZ,XS,YS,ZS,HS_EPS_INIT,MSG)float *HS,*T,HS_EPS_INIT,XS,YS,ZS;int   NX,NY,NZ,MSG;{    int    signal;    hs_buf=HS;    t_buf=T;    nx=NX;    ny=NY;    nz=NZ;    fxs=XS;    fys=YS;    fzs=ZS;    hs_eps_init=HS_EPS_INIT;    if(hs_eps_init<0.0 || hs_eps_init>1.0) {        error(ERR_HS_EPS);        return(ERR_HS_EPS);    }    if(MSG<0){        no_init=1;        MSG= -MSG;    }    messages=MSG;    if((signal=pre_init())==NO_ERROR){        signal=propagate_point(init_point());        free_ptrs(nx);    }    if(init_stage==0 || signal!=NO_ERROR) error(signal);    return(signal);} /*---------------------------- Time_3d_(): FORTRAN INTERFACE ---------------*/ inttime_3d_(HS,T,NZ,NY,NX,ZS,YS,XS,HS_EPS_INIT,MSG) /* All FORTRAN arguments are pointers. Dimensions X and Z are *//* swapped in order to fit FORTRAN mapping conventions.       */float *HS,*T,*HS_EPS_INIT,*XS,*YS,*ZS;int   *NX,*NY,*NZ,*MSG; {    int     signal;     hs_buf=HS;    t_buf=T;    nx= *NX;    ny= *NY;    nz= *NZ;       fxs= *XS;    fys= *YS;    fzs= *ZS;    hs_eps_init= *HS_EPS_INIT;    if(hs_eps_init<0.0 || hs_eps_init>1.0) {        error(ERR_HS_EPS);        return(ERR_HS_EPS);    }    if(*MSG<0){        no_init=1;        messages= -(*MSG);    }    else messages= *MSG;     if((signal=pre_init())==NO_ERROR){        signal=propagate_point(init_point());        free_ptrs(nx);    }    if(init_stage==0 || signal!=NO_ERROR) error(signal);    return(signal);}/*------------------------------------------------Pre_init()----------------*/static intpre_init(){    int        x,y,z,        np,nt,        n0,n1;    float        *pf;    nmesh_x=nx-1;    nmesh_y=ny-1;    nmesh_z=nz-1;    np=ny*nz;    nt=nx*np;    n1=max(nx,ny);    n0=max(nx,nz);    if(n1==n0) n0=max(ny,nz);    n1*=n0;/* allocate pointers */    if(!(hs=(float ***)malloc((unsigned)nx*sizeof(float **))))

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线综合视频播放| 97久久人人超碰| 日韩美女视频一区二区在线观看| 视频一区欧美日韩| 日韩欧美在线影院| 久久99国产精品免费| 国产三级一区二区| www.在线成人| 亚洲最大成人综合| 日韩美女视频一区二区在线观看| 久久97超碰色| 中文字幕一区二区在线观看| 在线亚洲免费视频| 免费成人在线视频观看| www国产亚洲精品久久麻豆| 国产精品一区二区在线播放| 国产精品久线在线观看| 欧美日韩一级黄| 日韩国产在线一| 欧美一区二区久久久| 国产激情视频一区二区三区欧美| 一区免费观看视频| 欧美一区二区三区日韩视频| 国产成人自拍网| 亚洲一区免费视频| 久久久亚洲午夜电影| 欧洲视频一区二区| 国产一区二区三区国产| 亚洲人成精品久久久久久| 欧美一级二级三级蜜桃| 成人激情动漫在线观看| 日韩国产欧美三级| 亚洲欧洲成人自拍| 日韩精品一区二区三区视频播放| av在线一区二区| 精品午夜一区二区三区在线观看| 中文字幕制服丝袜成人av| 91麻豆精品国产91久久久久| 国产成人在线视频网站| 天堂久久一区二区三区| 中文字幕一区三区| 久久综合丝袜日本网| 欧美日韩三级一区二区| 成人app在线| 国内精品久久久久影院薰衣草| 亚洲一区二区五区| 日本一区二区三级电影在线观看 | 亚洲天堂免费看| 欧美成人一区二区三区在线观看| 色一情一乱一乱一91av| 国产成人免费视频精品含羞草妖精| 婷婷成人激情在线网| 亚洲美女一区二区三区| 中文字幕欧美日韩一区| 亚洲精品在线观看网站| 91精品久久久久久久91蜜桃| 在线日韩一区二区| 91蜜桃网址入口| av电影在线观看完整版一区二区| 美女国产一区二区| 日韩精品色哟哟| 午夜精品福利一区二区三区av| 亚洲少妇屁股交4| 欧美国产成人精品| 久久久久久毛片| 久久综合久久久久88| 欧美xxxx在线观看| 日韩欧美中文字幕制服| 日韩一卡二卡三卡| 日韩一区二区三区在线| 欧美一级精品在线| 欧美一区二区福利在线| 欧美一区二区三区在| 91麻豆精品91久久久久久清纯| 欧美日韩五月天| 欧美酷刑日本凌虐凌虐| 在线播放91灌醉迷j高跟美女 | 91麻豆精品国产91久久久更新时间| 91国偷自产一区二区使用方法| 91在线视频播放| 91久久香蕉国产日韩欧美9色| 日本道色综合久久| 欧美日韩精品一区二区| 4438x亚洲最大成人网| 欧美一区二区私人影院日本| 日韩欧美国产三级| 欧美精品一区二区在线播放| 久久久99精品久久| 国产精品色哟哟| 亚洲日本成人在线观看| 亚洲午夜视频在线| 蜜乳av一区二区| 福利一区二区在线| 色八戒一区二区三区| 欧美日韩日日夜夜| 久久综合五月天婷婷伊人| 中文字幕欧美区| 亚洲六月丁香色婷婷综合久久| 亚洲一区二区在线视频| 免费观看在线色综合| 国产成人精品免费视频网站| 从欧美一区二区三区| 在线亚洲一区观看| 91精品国产一区二区三区香蕉| 久久先锋影音av鲁色资源| 中文字幕一区二| 天天色天天爱天天射综合| 韩国三级电影一区二区| 色综合色综合色综合色综合色综合 | 一区二区中文字幕在线| 亚洲www啪成人一区二区麻豆| 久久成人羞羞网站| 99re在线精品| 69堂国产成人免费视频| 日本一区免费视频| 日本在线不卡视频| 成人av资源站| 日韩欧美视频一区| 综合久久久久久| 蜜臂av日日欢夜夜爽一区| 91亚洲精品久久久蜜桃网站| 欧美一级片在线| 亚洲人成在线观看一区二区| 久久精品99久久久| 在线免费不卡电影| 国产亚洲精品中文字幕| 丝瓜av网站精品一区二区| 粉嫩久久99精品久久久久久夜| 欧美日韩电影在线播放| 国产精品午夜免费| 青青草一区二区三区| 91啪九色porn原创视频在线观看| 欧美tk—视频vk| 亚洲国产精品一区二区久久恐怖片| 国产成人免费视频一区| 日韩欧美国产高清| 亚洲成人av免费| 色婷婷久久综合| 国产欧美精品区一区二区三区| 日韩二区三区四区| 色哟哟精品一区| 国产精品女人毛片| 国产精品一区不卡| 欧美一区二区啪啪| 婷婷综合久久一区二区三区| 91丝袜美腿高跟国产极品老师 | 亚洲日本青草视频在线怡红院| 国产美女视频一区| 日韩欧美色综合网站| 午夜久久久久久| 色8久久人人97超碰香蕉987| 中文字幕日韩一区二区| 国产成人午夜片在线观看高清观看| 9191久久久久久久久久久| 亚洲一区二区三区美女| 91婷婷韩国欧美一区二区| 国产精品久久久久影院色老大| 国产一区二区精品久久99| 精品国产a毛片| 久久精品国产亚洲高清剧情介绍| 欧美日韩国产精品成人| 亚洲午夜久久久久久久久电影院 | www成人在线观看| 免费观看一级特黄欧美大片| 4438x亚洲最大成人网| 日本三级韩国三级欧美三级| 6080国产精品一区二区| 亚洲国产欧美在线| 欧美男男青年gay1069videost| 亚洲综合成人网| 欧美撒尿777hd撒尿| 性久久久久久久| 欧美日韩高清一区二区不卡| 午夜久久久影院| 91精品国产综合久久精品麻豆| 奇米影视7777精品一区二区| 日韩亚洲欧美一区| 激情综合五月天| 久久久久国产精品免费免费搜索 | 色综合天天视频在线观看| 一区二区三区四区高清精品免费观看| 一本大道久久a久久综合| 亚洲夂夂婷婷色拍ww47| 67194成人在线观看| 久草热8精品视频在线观看| 精品少妇一区二区三区| 国产精品888| 亚洲精选免费视频| 欧美另类z0zxhd电影| 激情综合色综合久久综合| 中文字幕成人网| 欧美在线播放高清精品| 日本一区中文字幕| 国产色综合一区| 欧美性猛交xxxx乱大交退制版| 日韩av中文字幕一区二区三区| 精品国产乱码久久久久久闺蜜 | 欧美日韩国产大片| 精品亚洲成a人| 亚洲欧美欧美一区二区三区|