亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
国产精品久久网站| 日产欧产美韩系列久久99| 亚洲男同性视频| 亚洲国产精品久久久久秋霞影院| 亚洲成人资源在线| 国产成人在线电影| 在线亚洲免费视频| 久久久久国色av免费看影院| 一区二区视频在线| 日本在线不卡视频一二三区| 风间由美一区二区三区在线观看| 欧美日韩日日夜夜| 欧美国产日韩a欧美在线观看| 一区二区在线看| 国产麻豆精品视频| 91在线免费视频观看| 日韩欧美亚洲另类制服综合在线| 国产亚洲欧美激情| 日韩电影在线一区二区三区| 成人av在线网| 欧美xxxxxxxx| 亚洲图片激情小说| 国产成人av电影在线播放| 91精品国产综合久久婷婷香蕉| ...xxx性欧美| 久久99精品久久久久久| 欧美视频在线观看一区二区| 欧美经典一区二区| 免费观看在线色综合| 欧美图片一区二区三区| 亚洲三级电影网站| 国产91在线看| 精品国产人成亚洲区| 天天操天天干天天综合网| 91国产成人在线| 综合久久国产九一剧情麻豆| 国产在线一区二区综合免费视频| 制服丝袜中文字幕亚洲| 亚洲高清中文字幕| 国产.精品.日韩.另类.中文.在线.播放| 欧美电影一区二区| 美女尤物国产一区| 欧美视频三区在线播放| ...中文天堂在线一区| av资源网一区| 久久日韩精品一区二区五区| 青青草97国产精品免费观看| 欧美精品在线一区二区| 午夜视频一区在线观看| 91福利在线看| 日韩毛片精品高清免费| 波多野结衣中文字幕一区| 国产欧美日韩视频在线观看| 国产福利一区二区三区视频| 国产日韩av一区二区| 国产一区二区在线观看免费| 日韩免费在线观看| 韩国av一区二区三区四区| 久久久综合视频| 国产激情91久久精品导航| 中国av一区二区三区| 色综合天天综合在线视频| 中文av字幕一区| 91浏览器在线视频| 婷婷久久综合九色综合伊人色| 欧美情侣在线播放| 精品伊人久久久久7777人| 久久久精品一品道一区| 91在线观看免费视频| 亚洲一区二区成人在线观看| 欧美在线综合视频| 亚洲另类在线视频| 欧美美女喷水视频| 国产一区二区不卡在线| 亚洲欧美另类图片小说| 欧美日韩欧美一区二区| 久久国产日韩欧美精品| 国产日韩欧美精品综合| 国产福利一区二区三区视频| 中文字幕免费在线观看视频一区| 91麻豆文化传媒在线观看| 午夜精品一区在线观看| 精品国产乱码久久久久久影片| 国产成人综合网| 亚洲精品自拍动漫在线| 欧美电影免费提供在线观看| 成人丝袜18视频在线观看| 亚洲精品少妇30p| 精品毛片乱码1区2区3区 | 成人性生交大合| 亚洲视频中文字幕| 日韩欧美在线综合网| 91丝袜美女网| 日本 国产 欧美色综合| 中文字幕一区二区三区在线不卡| 欧美美女网站色| 成人免费高清视频| 久久精品72免费观看| 亚洲天堂精品视频| 久久综合99re88久久爱| 欧美日韩亚洲综合一区| 成人av网在线| 久久国产三级精品| 亚洲高清不卡在线| 久久综合999| 日韩一级黄色大片| 欧美在线观看视频在线| 成人午夜视频在线观看| 麻豆精品久久精品色综合| 一区二区高清免费观看影视大全| 久久一夜天堂av一区二区三区| 国产精品亚洲一区二区三区在线| 日本不卡一区二区三区| 亚洲一区二区三区中文字幕在线| 国产精品欧美久久久久无广告| 精品处破学生在线二十三| 欧美日韩中文国产| 一本色道亚洲精品aⅴ| 国产+成+人+亚洲欧洲自线| 麻豆91小视频| 久久国产精品第一页| 国产黄色精品网站| 99久久综合国产精品| av资源站一区| 欧美亚洲国产一区二区三区va | 欧美乱妇20p| 在线不卡欧美精品一区二区三区| 欧美一区二区久久久| 欧美大黄免费观看| 2019国产精品| 国产精品成人免费在线| 亚洲国产日韩a在线播放性色| 亚洲chinese男男1069| 久久成人免费电影| 成人综合在线观看| 在线观看一区二区精品视频| 欧美一区2区视频在线观看| 26uuu色噜噜精品一区| 亚洲天堂成人在线观看| 日本伊人色综合网| 国产成人日日夜夜| 欧美网站一区二区| 精品国产乱码久久久久久免费 | 色综合天天综合网天天狠天天| 91福利国产成人精品照片| 日韩欧美高清在线| 日韩毛片精品高清免费| 日韩精品一卡二卡三卡四卡无卡| 国产91丝袜在线18| 欧美日韩国产一区二区三区地区| 久久影院电视剧免费观看| 一区二区三区不卡视频在线观看 | 欧美成人aa大片| 日韩伦理av电影| 蜜乳av一区二区三区| 91麻豆文化传媒在线观看| 欧美mv日韩mv国产| 一区二区三区精品| 国产黄色91视频| 欧美一区二区在线观看| 最新日韩av在线| 国产一区二区影院| 欧美伦理影视网| 17c精品麻豆一区二区免费| 男人操女人的视频在线观看欧美| eeuss国产一区二区三区| 粉嫩av一区二区三区在线播放| 欧美色图第一页| 亚洲欧洲精品一区二区精品久久久| 日本最新不卡在线| 91国偷自产一区二区三区成为亚洲经典| 精品国产不卡一区二区三区| 亚洲成人自拍一区| 94色蜜桃网一区二区三区| www久久精品| 国产·精品毛片| 日韩欧美中文一区| 午夜天堂影视香蕉久久| 91欧美激情一区二区三区成人| 久久日一线二线三线suv| 免费xxxx性欧美18vr| 欧美日韩中文字幕一区二区| 国产精品日日摸夜夜摸av| 国产精品一区不卡| 日韩亚洲欧美在线| 亚洲成年人网站在线观看| 色老汉av一区二区三区| 国产精品看片你懂得| 国产成都精品91一区二区三| 亚洲精品一线二线三线| 日本不卡一二三区黄网| 91精品麻豆日日躁夜夜躁| 一区二区日韩电影| 色综合一个色综合| 一区二区成人在线| 一本一道波多野结衣一区二区| 亚洲欧美激情插| 色综合婷婷久久| 亚洲国产精品一区二区久久| 欧美亚洲综合网|