jonfanlab / GLOnet

Global optimization based on generative neural networks
MIT License
101 stars 40 forks source link

Reticolo res0 input #8

Open satadrudas opened 1 year ago

satadrudas commented 1 year ago

in the repository GLOnet/solvers/Eval_Eff_1D.m, line 17 input for res0 is -1 saying that its for the polarization

parm = res0(-1); % TE polarization. For TM : parm=res0(-1) parm.res1.champ = 1; % the electromagnetic field is calculated accurately %parm.res1.trace = 1; % show the texture

but when I check the reticolo res0.m file the input is supposes to dims and there is a 'pol' in the struct when dim=2

` if nargin<1;dim=2;end; if dim==2;% 2 D sym=struct('x',[],'y',[],'pol',0); parm1=struct('angles',1,'trace',0,'xlimite',[],'ylimite',[],'nx',100,'ny',100,'calcul',1,'champ',0,'ftemp',1,'fperm',[],'sog',1,'li',1); else;% 1 D sym=struct('x',[]); parm1=struct('trace',0,'xlimite',[],'nx',1000,'calcul',1,'champ',1,'ftemp',0,'fperm',[],'sog',1);

end; parm2=struct('cals',1,'cale',1,'calef',1,'tolh',1.e-6,'tolb',1.e-6,'retss',3,'retgg',0,'result',1); parm3=struct('npts',10,'cale',[1:6],'calo',i,'sens',1,'caltab',0,'gauss',0,'gauss_x',10,'gauss_y',nan,'trace',0,'champs',[1:6,0],'apod_champ',0); parm=struct('dim',dim,'sym',sym,'res1',parm1,'res2',parm2,'res3',parm3); `

I am a bit confused h ere if there is any error in the code or my understanding. Please help!!

jiaqi-jiang commented 1 year ago

Thanks for pointing it out. The comment has a typo. res0(-1) refers to TM and res0(1) refers to TE. You can find detailed information in Reticolo documentation.

wbupt commented 1 year ago

该文件缺少必要的MATLAB代码,可在 https://www.lp2n.institutoptique.fr/equipes-de-recherche-du-lp2n/light-complex-nanostructures 界面中,下载 https://zenodo.org/record/5905381/files/RETICOLO%20V9a.zip?download=1 这样代码才能运行完整。