initialize.m
来自「外国人开发的电磁时域有限差分方法工具包 Electromagnetic Fin」· M 代码 · 共 53 行
M
53 行
function Initialize
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Electromagnetic Finite-Difference Time-Domain %
% Version 1.20, Release 1 %
% %
% (C) Copyright 2005 %
% Sharif University of Technology %
% School of Electrical Engineering %
% All Rights Reserved %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
global L dT dL
global Cnt xCnt yCnt X Y
global MaxTimeStep MaxSpeed
global OutputFileName
global xProbe yProbe DifferenceDirection
global xCenter yCenter TimePoints
global Alpha Source DiffusionLength
global BoundaryType TimeSteps TimeDecimation
global eSigmax mSigmax eSigmay mSigmay Mu Epsilon
global KappaX KappaY Mode TE TM xPMLCnt yPMLCnt
OutputFileName='Default';
L=1;
dL=1;
MaxTimeStep=dL/MaxSpeed;
dT=dT*MaxTimeStep;
if Mode==TE
Temp=Epsilon;
Epsilon=Mu;
Mu=Temp;
end
KappaX=0;
KappaY=0;
InitializePML;
DiffusionLength=1.3;
xCenter=xCenter+xPMLCnt;
yCenter=yCenter+yPMLCnt;
xProbe=xProbe+xPMLCnt;
yProbe=yCenter+yPMLCnt;
TimePoints=round(TimeSteps/TimeDecimation);
DifferenceDirection=+1;
InitializeSource;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?