Remove deprecated monitor_point C++ class#3240
Open
oskooi wants to merge 2 commits into
Open
Conversation
stevengj
reviewed
Jun 29, 2026
| #define HAVE_SOME_FFTW 1 | ||
| #else | ||
| #define HAVE_SOME_FFTW 0 | ||
| #endif |
Collaborator
There was a problem hiding this comment.
Also get rid of the corresponding configure.ac tests if (for now) we have nothing that uses FFTs.
Collaborator
Author
There was a problem hiding this comment.
FFTW is still used — by src/casimir.cpp (the make_casimir_g function uses fftw_plan_dft_1d/fftw_execute and the FFTW2 paths). The configure.ac comment at line 146 even names both files.
The suggested cleanup is to update the stale comment in configure.ac to drop the src/monitor.cpp reference, since that file no longer uses FFTW.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3237.
The C++ class
monitor_point(src/meep.hpp:1100-1128) is a legacy field-sampling helper that has long been documented as deprecated indoc/docs/C++_Developer_Information.md:83. It is a thin caching/bookkeeping wrapper:fields::get_point()already populates it by callingfields::get_field()internally (src/monitor.cpp:62). The documented replacement is to callfields::get_field()directly and, where spectral analysis is needed, feed a collected array intodo_harminv().monitor_pointis C++-only — the Python and Scheme front-ends never use it (Python field sampling already goes throughfields::get_fieldviafields::get_field_point, and Python harminv uses the standalonedo_harminvwrapper). It is exposed to SWIG only incidentally via%include "meep.hpp", with no explicit typemaps, so removing it does not affect the bindings.This PR deletes the class and its supporting
fieldsmethods, migrates the C++ unit tests that use it tofields::get_field(+do_harminvwhere needed), and updates the docs.