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

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

?? toyfdtd2.c

?? ToyFDTD2, version 1.0
?? C
?? 第 1 頁 / 共 3 頁
字號:
// ToyFDTD2, version 1.0 //      The if-I-can-do-it-you-can-do-it FDTD! // Copyright (C) 1998,1999 Laurie E. Miller, Paul Hayes, Matthew O'Keefe// Copyright (C) 1999 John Schneider // This program is free software; you can redistribute it and/or //     modify it under the terms of the GNU General Public License //     as published by the Free Software Foundation; either version 2//     of the License, or any later version, with the following conditions//     attached in addition to any and all conditions of the GNU//     General Public License://     When reporting or displaying any results or animations created//     using this code or modification of this code, make the appropriate//     citation referencing ToyFDTD2 by name and including the version//     number.  //// This program is distributed in the hope that it will be useful,//     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//     along with this program; if not, write to the Free Software//     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  //     02111-1307  USA// Contacting the perpetratorss://// Laurie E. Miller, Paul Hayes, Matthew O'Keefe// Department of Electrical and Computer Engineering//      200 Union Street S. E.//      Minneapolis, MN 55455//// lemiller@borg.umn.edu// // http://www.borg.umn.edu/toyfdtd/// http://www.borg.umn.edu/toyfdtd/ToyFDTD2.html// http://www.toyfdtd.org/// This code is here for everyone, but not everyone will need something //      so simple, and not everyone will need to read all the comments.  // This file is over 700 lines long, but less than 400 of that is actually//      code. ///////////////////////////////////////////////////////////////////////////////// ToyFDTD2 builds into ToyFDTD1 a way of allocating memory so that each //      field verctor array is forced to be be contiguous, which the//      ToyFDTD1 scheme does not.  In many cases this will be faster//      than the ToyFDTD1 scheme, but in some cases it will be slower;//      which will be better is highly platform-dependent.  Some optimizing//      compilers simply force the ToyFDTD1 arrays to be contiguous.  It's//      worth testing more than one option before undertaking a large run.//      Both schemes are designed to be easy to read.  In ToyFDTD2, macros//      are defined for accessing the arrays to make the notation easy to //      read: i.e. Ez(i,j,k).  The modifications were written by //      John Schneider.// This ToyFDTD2 is a stripped-down, minimalist 3D FDTD code.  It //      illustrates the minimum factors that must be considered to //      create a simple FDTD simulation.  ///////////////////////////////////////////////////////////////////////////////// This is a very simple Yee algorithm 3D FDTD code in C implementing//      the free space form of Maxwell's equations on a Cartesian grid.// There are no internal materials or geometry.  // The code as delivered simulates an idealized rectangular waveguide //      by treating the interior of the mesh as free space/air and enforcing//      PEC (Perfect Electric Conductor) conditions on the faces of the mesh.// The problem is taken from Field and Wave Electromagnetics, 2nd ed., by //      David K. Cheng, pages 554-555.  It is a WG-16 waveguide //      useful for X-band applications, interior width = 2.29cm, //      interior height = 1.02cm.  The frequency (10 GHz) is chosen to be //      in the middle of the frequency range for TE10 operation.  // Boundaries: PEC (Perfect Electric Conductor).// Stimulus: A simplified sinusoidal plane wave emanates from x = 0 face.// 3D output: The electric field intensity vector components in the direction //      of the height of the guide (ez) are output to file every //      PLOT_MODULUS timesteps (and for the last timestep), scaled to //      the range of integers from zero through 254.  (The colormap //      included in the tar file assigns rgb values to the range zero through//      255.)   Scaling is performed on each timestep individually, since //      it is not known in advance what the maximum and minimum //      values will be for the entire simulation.  The integer value 127 is //      held to be equal to the data zero for every timestep.  This method //      of autoscaling every timestep can be very helpful in a simulation //      where the intensities are sometimes strong and sometimes faint, //      since it will highlight the presence and structure of faint signals //      when stronger signals have left the mesh.  //      Each timestep has it's own output file.  This data output file format//      can be used in several visualization tools, such as animabob and viz. // Other output: Notes on the progress of the simulation are written to standard//      output as the program runs.  //      A .viz file is output to feed parameters to viz, should viz later be//      used to view the data files.// Some terminology used here://// This code implements a Cartesian mesh with space differentials //     of dx, dy, dz.// This means that a point in the mesh has neighboring points dx meters //     away in the direction of the positive and negative x-axis,//     and neighboring points dy meters away in the directions //     of the +- y-axis, and neighboring points dz meters away //     in the directions of the +- z-axis,// The mesh has nx cells in the x direction, ny in the y direction, //     and nz in the z direction.// ex, ey, and ez refer to the arrays of electric field intensity vectors //     -- for example, ex is a 3-dimensional array consisting of the //     x component of the E field intensity vector for every point in the //     mesh.  ex[i][j][k] refers to the x component of the E field intensity //     vector at point [i][j][k].  // hx, hy, and hz refer to the arrays of magnetic field intensity vectors.//// dt is the time differential -- the length of each timestep in seconds.//// bob is a file format that stands for "brick of bytes", meaning a string //     of bytes that can be interpreted as a 3-dimensional array of byte //     values (integers from zero through 255).  animabob is a free //     visualization tool that displays and animates a sequence of bricks //     of bytes.  For more information on animabob or to download a copy, //     see the ToyFDTD website at http://www.borg.umn.edu/toyfdtd///// viz is another free visualization tool that displays and animates //     brick-of-byte files. For more information on viz or to download a copy, //     see the ToyFDTD website at http://www.borg.umn.edu/toyfdtd/#include <math.h> #include <stdio.h>#include <stdlib.h>#include <float.h>// program control constants#define MAXIMUM_ITERATION 1000          // total number of timesteps to be computed#define PLOT_MODULUS 5          // The program will output 3D data every PLOT_MODULUS timesteps,          //     except for the last iteration computed, which is always          //     output.  So if MAXIMUM_ITERATION is not an integer          //     multiple of PLOT_MODULUS, the last timestep output will          //     come after a shorter interval than that separating          //     previous outputs.  #define FREQUENCY 10.0e9               // frequency of the stimulus in Hertz#define GUIDE_WIDTH 0.0229          // meters#define GUIDE_HEIGHT 0.0102          // meters#define LENGTH_IN_WAVELENGTHS 5.0          // length of the waveguide in wavelengths of the stimulus wave#define CELLS_PER_WAVELENGTH 25.0          // minimum number of grid cells per wavelength in the x, y, and          //     z directions// physical constants#define LIGHT_SPEED 299792458.0                 // speed of light in a vacuum in meters/second#define LIGHT_SPEED_SQUARED 89875517873681764.0                  // m^2/s^2#define MU_0 1.2566370614359172953850573533118011536788677597500423283899778369231265625144835994512139301368468271e-6          // permeability of free space in henry/meter#define EPSILON_0 8.8541878176203898505365630317107502606083701665994498081024171524053950954599821142852891607182008932e-12          // permittivity of free space in farad/meter// The value used for pi is M_PI as found in /usr/include/math.h on SGI //     IRIX 6.2.  Other such constants used here are DBL_EPSILON and FLT_MAXmain()	{// main  /////////////////////////////////////////////////////////////////////////////  // variable declarations  int i,j,k;                // indices of the 3D array of cells  int ioff_ex, ioff_ey, ioff_ez, ioff_hx, ioff_hy, ioff_hz;           // offsets used in the macros below for calculating position           // within the data arrays  int nx, ny, nz;                    // total number of cells along the x, y, and z axes, respectively  int allocatedBytes = 0;                     // a counter to track number of bytes allocated  int iteration = 0;                     // counter to track how many timesteps have been computed  double stimulus = 0.0;                  // value of the stimulus at a given timestep  double currentSimulatedTime = 0.0;           // time in simulated seconds that the simulation has progressed  double totalSimulatedTime = 0.0;                  // time in seconds that will be simulated by the program  double omega;                  // angular frequency in radians/second  double lambda;                  // wavelength of the stimulus in meters  double dx, dy, dz;            // space differentials (or dimensions of a single cell) in meters  double dt;           // time differential (how much time between timesteps) in seconds  double dtmudx, dtepsdx;                  // physical constants used in the field update equations   double dtmudy, dtepsdy;                  // physical constants used in the field update equations   double dtmudz, dtepsdz;                  // physical constants used in the field update equations   double *ex, *ey, *ez;            // pointers to the arrays of ex, ey, and ez values#define Ex(I,J,K) ex[ioff_ex*(I) + (nz+1)*(J) + (k)]#define Ey(I,J,K) ey[ioff_ey*(I) + (nz+1)*(J) + (k)]#define Ez(I,J,K) ez[ioff_ez*(I) + nz*(J) + (k)]           // macros to make accessing Ex, Ey, and Ez convenient           // i.e. Ez(i,j,k)  double *hx, *hy, *hz;           // pointers to the arrays of hx, hy, and hz values#define Hx(I,J,K) hx[ioff_hx*(I) + nz*(J) + (k)]#define Hy(I,J,K) hy[ioff_hy*(I) + nz*(J) + (k)]#define Hz(I,J,K) hz[ioff_hz*(I) + (nz-1)*(J) + (k)]           // macros to make accessing Hx, Hy, and Hz convenient           // i.e. Hz(i,j,k)  // bob output routine variables:  char filename[1024];           // filename variable for 3D bob files  double simulationMin = FLT_MAX;           // tracks minimum value output by the entire simulation  double simulationMax = -FLT_MAX;           // tracks maximum value output by the entire simulation  double min, max;           // these track minimum and maximum values output in one timestep  double norm;           // norm is set each iteration to be max or min, whichever is            //     greater in magnitude  double scalingValue;           // multiplier used in output scaling, calculated every timestep  FILE *openFilePointer;           // pointer to 3D bob output file  FILE *vizFilePointer;           // pointer to viz file  /////////////////////////////////////////////////////////////////////////////  // setting up the problem to be modeled  //  // David K. Cheng, Field and Wave Electromagnetics, 2nd ed.,   //     pages 554-555.   // Rectangular waveguide, interior width = 2.29cm, interior height = 1.02cm.  // This is a WG-16 waveguide useful for X-band applications.  //  // Choosing nx, ny, and nz:  // There should be at least 20 cells per wavelength in each direction,   //     but we'll go with 25 so the animation will look prettier.     //     (CELLS_PER_WAVELENGTH was set to 25.0 in the global   //     constants at the beginning of the code.)  // The number of cells along the width of the guide and the width of   //     those cells should fit the guide width exactly, so that ny*dy   //     = GUIDE_WIDTH meters.    //     The same should be true for nz*dz = GUIDE_HEIGHT meters.    // dx is chosen to be dy or dz -- whichever is smaller  // nx is chosen to make the guide LENGTH_IN_WAVELENGTHS   //     wavelengths long.    //   // dt is chosen for Courant stability; the timestep must be kept small   //     enough so that the plane wave only travels one cell length   //     (one dx) in a single timestep.  Otherwise FDTD cannot keep up   //     with the signal propagation, since FDTD computes a cell only from   //     it's immediate neighbors.    // wavelength in meters:  lambda = LIGHT_SPEED/FREQUENCY;   // angular frequency in radians/second:  omega = 2.0*M_PI*FREQUENCY; 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
美女视频一区在线观看| 欧美激情一区二区在线| 天天操天天综合网| 久久免费视频色| 91小视频在线| 一区二区久久久久久| 精品不卡在线视频| 在线观看亚洲专区| 精品一区二区三区的国产在线播放 | 国产一区999| 亚洲一区二区三区爽爽爽爽爽| 欧美一区二区成人6969| 成人爱爱电影网址| 日韩福利视频网| 亚洲欧洲在线观看av| 日韩一区二区视频在线观看| 99久久精品国产精品久久| 亚洲一区二区三区精品在线| wwwwww.欧美系列| 欧美嫩在线观看| 在线中文字幕一区| 91美女精品福利| 成人美女视频在线观看| 日韩高清欧美激情| 久久精品一区二区三区av| 欧美一区日韩一区| 欧美在线看片a免费观看| av亚洲精华国产精华精华| 免费在线观看不卡| 一区二区三区中文在线观看| 国产精品国产三级国产aⅴ中文| 日韩你懂的在线观看| 欧美伊人久久大香线蕉综合69| 岛国av在线一区| 精品在线亚洲视频| 日韩激情一二三区| 亚洲一二三专区| 亚洲蜜桃精久久久久久久| 中文字幕日韩一区二区| 国产欧美日韩不卡| 精品久久久久久久一区二区蜜臀| 日韩欧美一级片| 在线观看一区不卡| 色视频欧美一区二区三区| 岛国一区二区在线观看| 免费观看在线色综合| 亚洲已满18点击进入久久| 亚洲欧美色综合| 亚洲一区二区三区四区在线观看| 一区二区三区高清在线| 性做久久久久久免费观看欧美| 一区二区成人在线| 一区二区三区电影在线播| 夜色激情一区二区| 偷拍自拍另类欧美| 蜜桃一区二区三区在线观看| 麻豆91在线观看| 精东粉嫩av免费一区二区三区| 蜜桃视频在线一区| 国产成人av电影在线观看| 国产一区二区三区四区五区美女| 国产激情一区二区三区四区 | 日韩福利电影在线观看| 亚洲成人资源在线| 一区二区视频在线| 亚洲第一狼人社区| 日本不卡1234视频| 国产福利一区二区三区视频在线 | 成人精品高清在线| 91浏览器入口在线观看| 欧美伊人久久久久久久久影院| 在线播放中文字幕一区| 99在线热播精品免费| 久久国产乱子精品免费女| 国产精品原创巨作av| 欧美国产精品久久| 欧洲一区在线观看| 亚洲色图视频网站| 日韩欧美国产一区二区在线播放| 91精品国产91久久综合桃花| 欧美一区二区国产| 欧美主播一区二区三区| 在线观看视频91| 欧美羞羞免费网站| 色综合天天综合网天天狠天天| 久久99九九99精品| 日韩成人午夜精品| 亚洲制服丝袜av| 偷窥国产亚洲免费视频| 婷婷成人综合网| 亚洲午夜免费视频| 亚洲自拍偷拍麻豆| 亚洲777理论| 国产高清不卡二三区| 美日韩一区二区| 日韩和欧美一区二区三区| 亚洲一区电影777| 亚洲国产va精品久久久不卡综合| 精品视频在线视频| 欧美日韩国产一区| 777午夜精品视频在线播放| 91福利国产成人精品照片| 99久久婷婷国产综合精品电影| 国产福利一区在线观看| 久久精品免费观看| 夜夜嗨av一区二区三区四季av| 久久精品噜噜噜成人88aⅴ| 天天操天天色综合| 亚洲综合网站在线观看| 中文字幕一区二区在线观看| 国产日韩在线不卡| 欧美军同video69gay| 中文字幕一区av| 成人一级视频在线观看| 亚洲第一狼人社区| 亚洲精品一区二区三区精华液| 中文字幕一区二区三区不卡 | 日韩高清不卡一区二区三区| 日韩专区中文字幕一区二区| 国产乱码精品一区二区三| 国产精品一线二线三线| 亚洲欧美日韩一区二区三区在线观看| 欧美tickle裸体挠脚心vk| 精品乱人伦小说| 成人免费在线观看入口| 亚洲欧美另类久久久精品 | 久久综合九色综合久久久精品综合| 中文字幕一区二区三区在线不卡 | 中文字幕第一区综合| 午夜a成v人精品| 精东粉嫩av免费一区二区三区| 国产盗摄精品一区二区三区在线 | 91久久线看在观草草青青 | 日本人妖一区二区| 久久99精品国产麻豆婷婷| 精品一区二区三区免费视频| 成人国产精品免费观看视频| 日本一区二区免费在线| 国产精品色眯眯| 91精选在线观看| 91久色porny | 国产精品一级二级三级| 欧美一卡2卡三卡4卡5免费| 在线播放视频一区| 1024成人网色www| 99精品国产视频| 亚洲视频免费在线观看| 国产资源在线一区| 久久久五月婷婷| 久久国产精品第一页| 久久精品日韩一区二区三区| 香蕉乱码成人久久天堂爱免费| 亚洲一区二区三区四区的| 99精品国产视频| 一区二区免费在线播放| 99久久国产综合色|国产精品| 精品捆绑美女sm三区| 亚洲图片欧美一区| 在线播放91灌醉迷j高跟美女 | 国产成人日日夜夜| 国产69精品久久99不卡| 五月天久久比比资源色| 欧美裸体一区二区三区| 日本中文一区二区三区| 欧美日韩国产一区二区三区地区| 亚洲欧美日韩中文播放| 狠狠色丁香久久婷婷综合_中| 国产亚洲美州欧州综合国| 日韩专区欧美专区| 欧美综合一区二区三区| 成人av电影免费观看| 久久久久9999亚洲精品| 56国语精品自产拍在线观看| 91精品国产黑色紧身裤美女| 日韩欧美色综合| 久久精品无码一区二区三区 | 91精品国产色综合久久| 美女任你摸久久| 欧美mv日韩mv国产网站app| 精品在线播放免费| 日韩一级大片在线| 欧美夫妻性生活| 欧美激情资源网| 中文子幕无线码一区tr| 国产女主播在线一区二区| 麻豆精品一区二区av白丝在线| 欧美日韩精品福利| 秋霞av亚洲一区二区三| 精品蜜桃在线看| 蜜乳av一区二区三区| 亚洲三级在线看| 欧美成人精品1314www| 欧美亚洲国产一区在线观看网站| 精品国产91洋老外米糕| 色播五月激情综合网| 国产综合一区二区| 久久99国内精品| 视频一区中文字幕国产| 亚洲综合无码一区二区| 中文字幕一区二区不卡|