S4 icon indicating copy to clipboard operation
S4 copied to clipboard

Update on python API to correct undefined references

Open jmllorens opened this issue 7 years ago • 3 comments

Since the migration to the new C API the python module stop working as expected. A few errors appear after import:

  • undefined functions: Layer_Init, Material_Init, Material_InitTensor, Simulation_AddMaterial, Simulation_GetPoyntingFlux and Simulation_MakeExcitationExterior
  • The SetFrequency stop detroying previous results.

All these dependencies to the old API have been corrected by upgrading to the new C API when possible.

Old API calls still remains, although the python extension is more useful that the current version.

jmllorens avatar Apr 21 '17 14:04 jmllorens

Works like a charm! Thanks so much for making these corrections.

kwrobert avatar May 04 '17 16:05 kwrobert

@kwrobert After sending the pull request I noticed that some of functions which still use the old API are not working properly. For example, I fixed S4Sim_SetRegionCircle in my fork, because is one of the functions I use most. Probably it is a better a idea to wait until S4v2 is merged with master to implement all the changes.

jmllorens avatar May 05 '17 07:05 jmllorens

I get a ImportError: /home/chronum/S4/jmllorens/S4/build/lib.linux-x86_64-3.6/S4.cpython-36m-x86_64-linux-gnu.so: undefined symbol: PyInt_AsLong when working with this. Any ideas?

Chronum94 avatar Jul 30 '18 18:07 Chronum94