Comments (3)
I also have this issue. I guess 'GetAmplitudes' method is obsolete or broken?
from s4.
--- a/S4/main_lua.c
+++ b/S4/main_lua.c
@@ -2186,7 +2186,7 @@ static int S4L_Simulation_GetAmplitudes(lua_State *L){
layer_name = luaL_checklstring(L, 2, NULL);
layer = S4_Simulation_GetLayerByName(S, layer_name);
- if(NULL == layer){
+ if(layer < 0){
S4L_error(L, "GetAmplitudes: S4_Layer named '%s' not found.", layer_name);
return 0;
}
@@ -2204,7 +2204,7 @@ static int S4L_Simulation_GetAmplitudes(lua_State *L){
amp = (double*)malloc(sizeof(double)*8*n);
Simulation_GetAmplitudes(S,
- layer,
+ &S->layer[layer],
luaL_checknumber(L, 3),
amp, &[4*n]);
It seems to be working after making this change.
from s4.
--- a/S4/main_lua.c +++ b/S4/main_lua.c @@ -2186,7 +2186,7 @@ static int S4L_Simulation_GetAmplitudes(lua_State *L){ layer_name = luaL_checklstring(L, 2, NULL); layer = S4_Simulation_GetLayerByName(S, layer_name); - if(NULL == layer){ + if(layer < 0){ S4L_error(L, "GetAmplitudes: S4_Layer named '%s' not found.", layer_name); return 0; } @@ -2204,7 +2204,7 @@ static int S4L_Simulation_GetAmplitudes(lua_State *L){ amp = (double*)malloc(sizeof(double)*8*n); Simulation_GetAmplitudes(S, - layer, + &S->layer[layer], luaL_checknumber(L, 3), amp, &[4*n]);
It seems to be working after making this change.
I did this change, but only GetAmplitudes only works por s-pol. Is the same for you?
from s4.
Related Issues (20)
- About the S4 installation HOT 4
- Aperiodic Structure With PML HOT 4
- How to use real dielectric constant of the material?
- Is there a way to implement a layer with pixelized refractive index distribution in S4?
- Which function can be used to set the incident plane wave to be circularly polarized? HOT 2
- Could S4 do interference simulation?
- Cannot produce simple Talbot carpet HOT 2
- Cannot execute S4 after installation HOT 2
- Layers with different lattice vectors HOT 2
- A problem of "SetLayerPatternPolygon" HOT 1
- Scattering Matrix
- Installation Problem in M2 Max
- Python API: Error while setting excitation wave
- Creating a model with different refractive index along the wavelength HOT 1
- Multi-threading/Muti-processing HOT 2
- Angle orientation
- Adaptive fequency sampling HOT 1
- Installation for Windows HOT 2
- Cannot implement "make S4lua " HOT 1
- Pyramidal Structure HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from s4.