S4 icon indicating copy to clipboard operation
S4 copied to clipboard

pointer and integer comparison

Open fragkrag opened this issue 6 years ago • 1 comments

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 "", line 1, in TypeError: Required argument 'S4_Material' (pos 3) not found

the other two commands run fine

fragkrag avatar Sep 12 '18 02:09 fragkrag

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

fragkrag avatar Sep 12 '18 02:09 fragkrag