Closed zhixwang closed 2 years ago
I mean, of course, I can write a for-loop and extract the field_xy along a series of z_prop iteratively. However, this will not be sufficiently vectorized and the speed will be limited.
Is it possible to input something like (x_axis, y_axis, z_axis = [z_prop])
such that we can directly read [Ex, Ey, Ez] as 3D-Tensors?
First, vectorize is theoretically possible. However, in the initial development, we tried fully vectorized operation, but when operating with the eigenmode of the internal layer and the phase of the vectorized z-axis, it requires huge memory size. (rcwa.py line968 - 988) We have not yet found a memory-efficient operation method, so we have not added a function to extract the 3D field.
Thanks for the reply. I can understand that memory becomes a bottleneck for GPU computation. Perhaps an option would be to implement a vectorized 3D function, and in the worst case people can at least use it on CPU?
Sometimes users also use CPU to run PyTorch.
We will consider 3D vectorized function when updating in the future. However, it may take a little longer to update due to verification. (Comparison with other electromagnetic simulations, etc.)
Thanks for the suggestion.
Thank you for taking care!
Hi, I noticed that the program supports to extract
field_xy
,field_yz
andfield_xz
.Is it possible to extract
field_xyz
, so that I can do more complicated computations afterwards?Thanks!