📄 improved3.c
字号:
/* FDTD simulation where main() is primarily used to call other * functions that perform the necessary operations. */#include "fdtd3.h"int main(){ Grid *g; ALLOC_1D(g,1,Grid); // allocate memory for Grid gridInit3(g); // initialize the grid tfsfInit(g); // initialize TFSF boundary snapshotInit(g); // initialize snapshots /* do time stepping */ for (Time=0; Time<MaxTime; Time++) { updateH3(g); // update magnetic field tfsfUpdate(g); // correct field on TFSF boundary abc(g); // apply ABC updateE3(g); // update electric field snapshot(g); // take a snapshot (if appropriate) } /* end of time-stepping */ return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -