S4
S4 copied to clipboard
pointer and integer comparison
Attempting to compile on Mac OS X gives error
"S4/S4.cpp:879:28: error: ordered comparison between pointer and zero ('const double *' and 'int') if(NULL == thick || thick < 0){ ret = -3; }"
I tried fixing it by removing "|| thick < 0" and adding a new variable thick_db = *thick; and putting that in tjhe comparison
This allows it to compile, but then when running the python extension, I try the following:
import S4 S = S4.New(Lattice = ((100,0),(0,100)), NumBasis = 40) S.SetMaterial(Name = 'Vacuum', Epsilon = 1) S.AddLayer(Name = 'top', Thickness = 100, Material = 'Vacuum')
this fails at AddLayer with
Traceback (most recent call last):
File "
the other two commands run fine
I should add that simply using 'make' causes it to fail with some Lua error, so after downloading the package I immediately call 'make S4_pyext'
make lib does nothing