TAGGED: photonics
-
-
May 26, 2024 at 5:01 amLee Seung YongSubscriber
I'm using Lumerical Mode and have some questions about it.
I made a double for loop and wanted to escape from the inner part of the 'for loop' (there is an 'if' condition, and I want to select just one value of which satisfied the conditions), but I found that the lumerical break script ceases whole processing. (As I know)
Is there any way to just get out of the inner for loop?
(If there are i = 1,2,3 & j = 1,2,3,4,5, and j which satisfies the conditions A and B are j = 1, 4 (i = 1), I only want to select j = 1 (and break) and move to i = 2 for another iteration.)
-
May 27, 2024 at 6:12 pmAmrita PatiAnsys Employee
Hi Lee Seung,
I believe there is no way to skip an iteration. But I agree, that it will be very helpful have a script command like that, I remember using functions like "continue" in C++. I will recommend you to submit a feature request on IX: Ideas Exchange.
In the mean time, we can try and find a workaround. I didn't fully understand the condtions, so please feel free to elaborate a little bit. But I am thinking if we can use something like this as a workaround:
flag=0;
for (i=1:1:3){
for(j=1:1:5){
if(j==1 or j==4){#Run only if certain j conditions are met
flag=1;
?flag;}
else{#else do nothing
}
}
}Regards,
Amrita
-
- You must be logged in to reply to this topic.
- Ansys Insight:使用Checkpoint继续仿真被迫中断或已经仿真结束的文件
- 怎么修改生成远场图片的横纵坐标以及坐标标签的字体大小
- INTERCONNECT – No results unless rerun simulation until it gives any
- EME得到的S参数与监视器结果不一致的问题
- 如何直观计算3db带宽
- INTERCONNECT – obtain power output over time & check for SNR
- varFDTD半导体激光器建模方向及反射率设置问题
- Inverse Design Freezing Issue
- Calculation of correlation values in laser modulation bandwidth simulation
-
421
-
192
-
178
-
162
-
140
© 2024 Copyright ANSYS, Inc. All rights reserved.