⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 improved2.c

📁 国外一大学教授讲章
💻 C
字号:
/* Further improved bare-bones 1D FDTD simulation. */#include "fdtd2.h"#include "ezincarg.h"int main(){  Grid *g;                               ALLOC_1D(g,1,Grid); // allocate memory for Grid    /* Initialize the grid. */  gridInit2(g);                          /* initialize source function */  ezIncArgInit(1.0,30.0,10.0);  /* do time stepping */  for (Time=0; Time<MaxTime; Time++) {     /* update magnetic field */    updateH2(g);                           /* update electric field */    updateE2(g);                           /* apply source function at time "Time" and location zero */    Ez(0) = ezInc(Time,0.0);    printf("%g\n",Ez(50));               } /* end of time-stepping */  return 0;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -