excite.c
来自「FDTD 模拟 天线 包含 近场-远场 外推程序(时谐场)」· C语言 代码 · 共 50 行
C
50 行
/* -------------------------------------
The Iteration Formulae of
Ez Component in the Excitation Plane
*/
# include "excite.h"
void E_Excite_Iter(MODULE *pModule,int t, double ****Ez)
{
int i,k,J_Excite;
J_Excite=pModule->Excite.nLocation;
for(i=pModule->Excite.nFw_start;i<=pModule->Excite.nFw_end;i++)
{
for(k=pModule->Excite.nFl_start;k<pModule->Excite.nFl_end;k++)
{
Ez[0][i][J_Excite][k]=Ez[0][i][J_Excite][k]+Gauss_Pulse(t);
}
}
printf("time=%d Gauss=%lf\n",t,Gauss_Pulse(t));
}
double Gauss_Pulse(int time)
{
double temp=0.0;
temp=exp(-(time-t0)*(time-t0)/T/T);
return temp;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?