Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scheme interface for oblique coefs #945

Merged
merged 3 commits into from
Jul 9, 2019
Merged

scheme interface for oblique coefs #945

merged 3 commits into from
Jul 9, 2019

Conversation

stevengj
Copy link
Collaborator

@stevengj stevengj commented Jul 2, 2019

Scheme interface to #940, same as Python (optional direction keyword argument to eigenmode coefficients).

@oskooi
Copy link
Collaborator

oskooi commented Jul 3, 2019

The build is failing on Travis (as well as my local machine) due to a SWIG-related error:

meep-meep_wrap.o: In function `_wrap_do_get_eigenmode_coefficients(scm_unused_struct*, scm_unused_struct*, scm_unused_struct*, scm_unused_struct*, scm_unused_struct*, scm_unused_struct*, scm_unused_struct*, scm_unused_struct*, scm_unused_struct*, scm_unused_struct*)':
meep_wrap.cxx:(.text+0x43f95): undefined reference to `do_get_eigenmode_coefficients(meep::fields*, meep::dft_flux, meep::volume const&, int*, int, int, std::complex<double>*, double*, double, double, meep::vec (*)(double, int, void*), void*)'
collect2: error: ld returned 1 exit status
Makefile:517: recipe for target 'meep' failed
make[3]: *** [meep] Error 1

Fix: update the SWIG wrapper?

@stevengj stevengj force-pushed the scheme_oblique_coef branch from 8d2c1b6 to 28719c7 Compare July 5, 2019 17:21
@stevengj
Copy link
Collaborator Author

stevengj commented Jul 5, 2019

Should be fixed now.

@oskooi
Copy link
Collaborator

oskooi commented Jul 9, 2019

This PR has broken the backward compatibility of the get-eigenmode-coefficients routine such that any of the scheme/example files such as binary-grating.ctl or metasurface_lens_phasemap.ctl which involve the calling convention e.g. (get-eigenmode-coefficients mode-mon (arith-sequence 1 1 nmode) #:eig-parity (+ ODD-Z EVEN-Y)) produce the following error:

Backtrace:
In ice-9/boot-9.scm:
 160: 8 [catch #t #<catch-closure 55dacae32680> ...]
In unknown file:
   ?: 7 [apply-smob/1 #<catch-closure 55dacae32680>]
In ice-9/eval.scm:
 432: 6 [eval # #]
 432: 5 [eval # #]
In unknown file:
   ?: 4 [primitive-load "binary_grating.ctl"]
In ice-9/eval.scm:
 453: 3 [eval # ()]
 432: 2 [eval # #]
 436: 1 [eval # #]
In unknown file:
   ?: 0 [do-get-eigenmode-coefficients # # # ...]

ERROR: In procedure do-get-eigenmode-coefficients:
ERROR: Wrong number of arguments to do-get-eigenmode-coefficients

@stevengj
Copy link
Collaborator Author

stevengj commented Jul 9, 2019

Whoops, I forgot to pass the extra arg to do-get-eigenmode-coefficients … should be fixed now?

@stevengj stevengj merged commit 84d8e9e into master Jul 9, 2019
bencbartlett pushed a commit to bencbartlett/meep that referenced this pull request Sep 9, 2021
* scheme interface for oblique coefs

* whoops

* whoops
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants