Skip to content

Remove deprecated monitor_point C++ class#3240

Open
oskooi wants to merge 2 commits into
NanoComp:masterfrom
oskooi:monitor_point_remove
Open

Remove deprecated monitor_point C++ class#3240
oskooi wants to merge 2 commits into
NanoComp:masterfrom
oskooi:monitor_point_remove

Conversation

@oskooi

@oskooi oskooi commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator

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 in doc/docs/C++_Developer_Information.md:83. It is a thin caching/bookkeeping wrapper: fields::get_point() already populates it by calling fields::get_field() internally (src/monitor.cpp:62). The documented replacement is to call fields::get_field() directly and, where spectral analysis is needed, feed a collected array into do_harminv().

monitor_point is C++-only — the Python and Scheme front-ends never use it (Python field sampling already goes through fields::get_field via fields::get_field_point, and Python harminv uses the standalone do_harminv wrapper). 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 fields methods, migrates the C++ unit tests that use it to fields::get_field (+ do_harminv where needed), and updates the docs.

Comment thread src/monitor.cpp
#define HAVE_SOME_FFTW 1
#else
#define HAVE_SOME_FFTW 0
#endif

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also get rid of the corresponding configure.ac tests if (for now) we have nothing that uses FFTs.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

get rid of deprecated monitor_point code

2 participants