?? tfsf.c
字號:
#ifndef _MATH_H#include <math.h>#endif#include "fdtd3.h"#include "ezinc.h"static int tfsfBoundary=0; void tfsfInit(Grid *g) { printf("Enter location of TFSF boundary: "); scanf(" %d",&tfsfBoundary); ezIncInit(g); // initialize source function return;}void tfsfUpdate(Grid *g) { /* check if tfsfInit() has been called */ if (tfsfBoundary<=0) { fprintf(stderr, "tfsfUpdate: tfsfInit must be called before tfsfUpdate.\n" " Boundary location must be set to positive value.\n"); exit(-1); } /* correct Hy adjacent to TFSF boundary */ Hy(tfsfBoundary) -= ezInc(Time,0.0)*Chye(tfsfBoundary); /* correct Ez adjacent to TFSF boundary */ Ez(tfsfBoundary+1) += ezInc(Time+0.5,-0.5); return;}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -