www.gusucode.com > FDTD计算二维光子带隙的程序 > FDTD计算二维光子带隙的程序/247787/InitializeSource.m
function InitializeSource %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 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 NormalizedFrequency Profile global SourceDuration TimeSteps Source global xSource ySource global Air Silicon nEff BoundaryType global ModeNumber WaveguideWidth global eC mC eF mF SourceWidth if BoundaryType~=0 & BoundaryType~=6 SourceDuration=0; return end if Source==2 nEff=EffectiveIndex(WaveguideWidth,ModeNumber); Profile(1:Y)=MakeProfile(WaveguideWidth,ModeNumber,nEff); end