Python MPB interface#191
Python MPB interface#191stevengj merged 82 commits intoNanoComp:masterfrom ChristopherHogan:chogan/mpb_iface
Conversation
* Rename mpb -> libpympb * Rename meepmpb.cpp -> pympb.cpp * Remove MaterialGrid stuff * Add libmeepgeom pieces to pympb.cpp
Description of Changes by File.travis.ymlAdd Makefile.amBuild configure.ac
libmeepgeom/material_data.hpp
libmeepgeom/meepgeom.cpp
libpympb/Makefile.amBuilds libpympb/pympb.cpp and pympb.hppContains the
python /Makefile.am
python/examples/mpb-tutorial.pyA port of python/geom.pyAdd the python/meep.iI put the common typemap functions used by both pymeep and pympb in python/mpb.i
python/solver.pyDefines the main Python object, python/tests/data/tutorial-*.h5Reference data collected from scheme runs (setting python/tests/geom.pyAdd test case for #180 python/tests/mpb.pyUnit tests for all MPB functionality. There is a test for every section of the tutorial in The only test that's questionable is python/typemap_utils.cppRefactored to include the functions that are used in both |
Chogan/mpb examples
* Broken Links in documentation (NanoComp#104) * Links to further examples corrected As I came across the broken links in the online documentation on readthedocs I thought I just propose the corrected links. The broken link to the User interface was fixed as well. * Links to Scheme Tutorial corrected Links from "Scheme_Tutorial.md" changed to "Scheme_Tutorials/Basics.md" * Fixes for running in Jupyter notebooks (NanoComp#101) * Fixes for Jupyter * Fix regex * mpiPython V2P0 (NanoComp#87) * trying mkdocs stuff on master branch as readthedocs seems to have trouble with other branches * synced with stevengj/master * sync with stevenj master * updates * rebased and updated .travis.yml with a 4-branch build matrix * updates * updates * solely for the sake of travis debugging, remove all tests except aniso_disp from the core-library test suite * updates to .travis.yml build matrix; temporary reduce TESTS in tests/Makefile.am and python/Makefile.am to minimal test suite just to get travis build working * updates to .travis.yml * updates to .travis.yml * updates to .travis.yml * rebased and updated .travis.yml with a 4-branch build matrix * updates * updates * solely for the sake of travis debugging, remove all tests except aniso_disp from the core-library test suite * updates to .travis.yml build matrix; temporary reduce TESTS in tests/Makefile.am and python/Makefile.am to minimal test suite just to get travis build working * updates to .travis.yml * updates to .travis.yml * updates to .travis.yml * updates to .travis.yml * updates * updates * fields_chunk must only delete structure_chunk after it is done with it: after it has deleted the polarization state data * test deleting structure before fields * test deleting structure before fields * Add material-dispersion.py example and test (NanoComp#99) * Add material-dispersion.py example and test * Includes Susceptibility fixes * Temp workaround for py2 double free * Add material-dispersion.py example and test * Includes Susceptibility fixes * Temp workaround for py2 double free * WIP * Delete extra comment * Remove __swig_destroy__ calls * Copy simulation.py to install directory (NanoComp#108) * add Python tutorial for holey waveguide example to documentation and other minor fixes (NanoComp#110) * Python tutorial for holey waveguide and other minor fixes * minor tweaks * Travis fixes (NanoComp#113) * trying mkdocs stuff on master branch as readthedocs seems to have trouble with other branches * synced with stevengj/master * sync with stevenj master * updates * remove unnecessary libhdf5-serial-dev package from .travis build; restore in python/Makefile.am to ensure python tests are executed under mpirun when building --with-mpi * restored libhdf5-dev to package prerequisites (still omitting libhdf5-serial-dev) * updates * updates * Add ring-cyl.py example and test (NanoComp#106) * Add ring-cyl.py example * Add working test for ring-cyl.py example * Fix for py3 jupyter * Add .py extension to __main__ * Check for cylindrical user volume Also set default geometry and sources to [] * add Python tutorials for material dispersion and third-harmonic generation examples to documentation and other minor fixes (NanoComp#111) * Python tutorial for material dispersion and other minor fixes * minor tweaks and fixes * more minor tweaks and fixes * some fixes and 3 additional Scheme example files * add Third Harmonic Generation example with more fixes and tweaks * final set of tweaks and fixes * tiny fix * add Python tutorial for ring resonator in cylindrical coordinates to documentation and other fixes (NanoComp#117) * add Python ring resonator in cylindrical coordinates tutorial to documentation and other fixes * restore meep-pkgconfig.in * minor tweaks * fixes for new material_type in libctlgeom 4 (NanoComp#120) * fixes for new material_type in libctlgeom 4 * update python usage of material_type * Improve usability of user-defined material functions (NanoComp#118) * set_epsilon wrapper * Return Vector3 from vec2py instead of tuple * Add antenna-radiation.py example and test (NanoComp#121) * Add working antenna-radiation.py * Add test for radiation-antenna.py * Add cavity-farfield.py * Working cavity-farfield.py example * Print complex numbers in scheme format (NanoComp#119) * Print complex numbers in scheme format * Don't mutate data * Don't print double minus sign * Use global Vector3 for material function (NanoComp#124) * Destroy volume_list (NanoComp#123) * Array slice fix (NanoComp#122) * trying mkdocs stuff on master branch as readthedocs seems to have trouble with other branches * synced with stevengj/master * sync with stevenj master * updates * revised calculation of array_slice strides and offsets * revised calculation of sco=slice chunk offset in array-slice.cpp * Add output functions and synchronized_magnetic (NanoComp#126) * add Python tutorial for near2far to documentation and other fixes (NanoComp#125) * add near-to-far field transformation tutorial to documentation and other minor fixes * more fixes and tweaks * Initial high level interface to get_array_slice (NanoComp#105) * f * Add cavity_arrayslice test to Makefile * Improve readability of if condition in change_k_point * Return ndarray instead of storing shape * Adjust array tests * Fix get_array_slice typemaps * Allow user arrays * Allow complex arrays * Py2 compatability * Default complex in get_array * Account for cylindrical Volume * Add python ports of all remaining examples (NanoComp#127) * Add metal-cavity-ldos.py example * Add metal-cavity-ldos.py and parallel-wvgs-force.py * Add initial wvg-src.py * Working wvg-src.py and test * Add pw-source.py example * Working pw-source.py and test * don't put sources at non-owned points (potential fix for NanoComp#23) (NanoComp#128) * Fix failing wvg_src.py test (NanoComp#131) * local density of states (LDOS) and optical forces Python tutorials for documentation (NanoComp#133) * local density of states (LDOS) Python tutorial for documentation * add optical forces Python tutorial to documentation and minor fixes * more minor fixes and tweaks * Add aliases and mu parameter for Medium (NanoComp#136) * Only print on master node in MPI mode (NanoComp#139) * Only print on master node in MPI mode * Remove non-standard mpi flags * Fix hanging test * Fix failing physical.py test * Send non-master MPI output to os.devnull * Don't close os.devnull * Remove future import * Add support for field functions (NanoComp#134) * Add metal-cavity-ldos.py example * Add metal-cavity-ldos.py and parallel-wvgs-force.py * Starting field functions * Field function progress * Field functions working * Test output_field_function * Show test logs on travis while still taking advantage of 'set -e' * Fix python test-suite.log path * fix test suite paths * simplify * Add missing functionality from meep.scm (NanoComp#135) * Add use_output_directory * Add test for use_output_dir * Don't test directory creation/removal in MPI mode * Add missing functionality * numpy compatibility with Vector3 * Medium shortcuts * meep.inf * get_epsilon_point * load/save/load_minus near2far/force * at_time * after_sources_and_time * in_point * when_true/false * with_prefix * scale_flux/force/near2far * get_near2far_fields * Add tests, fix filename_prefix * Fix after_sources_and_time * Make simulation.py tests work with MPI * Use meep's MPI calls * Fix field function tests * Add ALL_COMPONENTS and use meep's MPI calls * Fix memory leaks * integrate2 field function typemaps and sanity test * Fix travis * Don't need mp prefix in __init__.py * Fix failing field function test in python 2 * Add ring-mode-overlap.py as integrate2_field_function example and tests * add Python User Interface page to documentation and minor fixes (NanoComp#144) * add Python User Interface page to documentation and minor fixes * fixes and tweaks * more README * fixes * fixes * centering * centering * Fix TODOs and warnings (NanoComp#142) * Add support for absorbers and extra_materials (NanoComp#148) * Add support for absorbers and an example, absorber-1d.py * Add tests/absorber_1d.py * Pass extra_materials from python to libmeepgeom * User defined materials (NanoComp#114) * trying mkdocs stuff on master branch as readthedocs seems to have trouble with other branches * synced with stevengj/master * sync with stevenj master * updates * initial commit of modeExpansion branch with new mode-decomposition feature * updates * initial stab at support for user-defined material functions in libmeepgeom * updates * updates * redefined user_defined_materials, but the way I did it can't *possibly* be right * update material_type_destroy() to free memory allocated by user function for user-defined material * revamped handling of material_data structures; added libmeepgeom/user-defined-materials.cpp test code for user-defined materials * revamped handling of material structures * updates to revamped handling of material_data structures in libmeepgeom * make_user_material now calls user function at the origin to initialize medium structure * removed is_material_or_user function * removed spurious image files in doc/docs/images * initial commit of modeExpansion branch with new mode-decomposition feature * updates * initial stab at support for user-defined material functions in libmeepgeom * updates * updates * redefined user_defined_materials, but the way I did it can't *possibly* be right * update material_type_destroy() to free memory allocated by user function for user-defined material * revamped handling of material_data structures; added libmeepgeom/user-defined-materials.cpp test code for user-defined materials * revamped handling of material structures * updates to revamped handling of material_data structures in libmeepgeom * make_user_material now calls user function at the origin to initialize medium structure * removed is_material_or_user function * removed spurious image files in doc/docs/images * updated python code/typemaps to reflect changes to material_data in libmeepgeom * updates to python typemaps to reflect changes to material_data structure in libmeepgeom * updates to python typemaps to reflect changes to material_data structure in libmeepgeom * Improve pw_source.py test (NanoComp#140) * Add better test for pw_source.py * Add better test for pw_source.py * Add missing functionality (NanoComp#146) * Add missing functionality * make _init_fields and _get_filename_prefix public * add point_in_periodic_objectp * add display_geometric_object_info as `info` method to geometric objects * add shift_geometric_object as `shift` method to geometric objects * add require_dimensions * Add geometric_object_duplicates and tests * Rename point_in_object methods * Allign with docs and use parallel make in travis (NanoComp#147) * Updates to docs (NanoComp#151) * replace stability error with warning message in Lorentzian susceptibilities (NanoComp#150) * fix bug due to rounding error in lorentzian_unstable * replace the error with a warning message instead * rm test * modularize build a bit more, add check for -lctlgeom (NanoComp#153) * add comment about Kerr conventions * Add conda installation instructions (NanoComp#155) * Conda installation instructions. * Add TMPDIR workaround for parallel Mac * updates to docs (NanoComp#157) * updates to docs * Update FAQ.md * Update FAQ.md * Update Guile_and_Scheme_Information.md * Update Guile_and_Scheme_Information.md * Update index.md * Remove dead code and extra whitespace (NanoComp#158) * Support user defined materials in python (NanoComp#156) * User defined materials working * User material function fixes * Material functions return a Medium * Add optimized path for epsilon_func * Add proper test * Update material function docs * Add material_function docs to Simulation section * Add epsilon_input_file and refactor pymaterial_to_material * Align docs * Adjust tolerance for tests on Mac (NanoComp#161) * Relax material_dispersion test tolerance for Mac * Fix for Mac * Adjust test tolerance for Mac * Add typemap and test for custom source (NanoComp#159) * Add typemap and test for CustomSource * Smooth source function for test * stop recommending environment variables for most paths * allow you to pass NULL for eps in structure constructor, in order to set the material later * no longer install MPI version with -mpi suffix (NanoComp#166) * updates and tweaks to documentation (NanoComp#165) * Refactor geom_epsilon::eff_chi1inv_row for MPB (NanoComp#164) * Refactor geom_epsilon::eff_chi1inv_row for MPB * eff_chi1inv_row calls eff_chi1inv_matrix * simplify autogen.sh for NanoComp#160 * Quote list of tests to run (NanoComp#167) * correctly handle args with spaces in autogen.sh * Fix volume bug and add test (NanoComp#168) * Add pymeep build instructions to docs (NanoComp#160) * Add pymeep build instructions to docs * Remove --with-pic and LIBS=-ldl. Add --enable-shared * Remove environment variables from build script and use rpath * Replace serial and parallel builds with just one version * User variables for flags * Pass env to autogen.sh * Explicit PYTHON and sudo pip * Typo in installation docs * Only create ~/install if it doesn't exist * mkdir -p ~/install * Update Installation.md * Replace h5utils with python libraries (NanoComp#163) * Animation with matplotlib * Use RdBu colormap * Update python tutorial image to RdBu * Add vmin,vmax and RdBu colormap to animation * Add get_array example * Crop wvg-bent-ez-tslice * Adjust Simulation constructor (NanoComp#170) * Adjust Simulation constructor * Make sure all "input variables" from the scheme docs can be passed into the constructor. * Organize arguments into a column for readability. * Update docs * Remove dead make targets (NanoComp#171) * Array slice doc (NanoComp#169) * trying mkdocs stuff on master branch as readthedocs seems to have trouble with other branches * synced with stevengj/master * sync with stevenj master * updates * documentation for array-slice * Update Python_User_Interface.md * Get epsilon_input_file working and add test (NanoComp#162) * Fix epsilon_input_file and add test * Pass None to structure() instead of dummy_eps * Get lattice size from structure.user_volume instead of passing to libmeepgeom. * Don't need py_vector3_object * Switch on user_volume * Prevent calling Py_XDECREF on junk ptr * add components_allocated flag to track whether any field components have been allocated, and check it in add_dft (NanoComp#172) * Create LICENSE * COPYING and LICENSE are duplicates * no need for manifest file * NEWS * version bump for 1.4 * copyright year bump * Update pympi startup message (NanoComp#178) * trying mkdocs stuff on master branch as readthedocs seems to have trouble with other branches * synced with stevengj/master * sync with stevenj master * updates * update MPI-enabled pymeep startup message to mimic that of libctl meep binary * ensure MPI startup message in pymeep is only printed by master process * Add missing Vector3 methods and tests (NanoComp#175) * update docs in preparation for v1.4 release (NanoComp#176) * update docs in preparation for v1.4 release * tweaks * turn --with-python on by default * rm redundant Release_Notes file * make dist fix * 1.4 release date * typo * fix NEWS target for out-of-tree builds * make sure h5 files are included in dist for testing * bump version to 1.4.1 * eliminate need for NEWS file * Slightly change how dft_chunk objects handle include_dV_and_interp=false. (NanoComp#181) Instead of implicitly doing this in the dft_chunk object by setting dV0=0, which is loses the value of dV0 and may double-count interpolation weights, it instead explicitly stores the include_dV_and_interp flag in the dft_chunk and sets the weight to 1 when updating the DFT if include_dV_and_interp=false. * Document Vector3 and add __mul__ operator (NanoComp#179) * Document Vector3 and add __mul__ operator * Add __rmul__ operator * Fit user volumes to Simulation dimensions (NanoComp#182) * Fit user volumes to Simulation dimensions * Adjust user Volumes via Simulation method * Only run make distcheck. Alternative to PR NanoComp#183 (NanoComp#185) * Changes for make distcheck * Adjust flags and clean after py tests * Add flags * Only run make distcheck * Default to 3 dimensions (NanoComp#187) * add material library for metals used in optoelectronic devices (NanoComp#188) * add material library for metals used in optoelectronic devices * minor tweaks * use unicode µ and not a character entity * version bump for 1.4.2 * don't use -malign-double on x86_64, to silence compiler warning (since it is the default in that arch) * move materials-library to examples * Workaround for SWIG 3.0.12 import handling (NanoComp#189) * fix GNU sed-ism * 64-bit support (NanoComp#193) * use size_t/ptrdiff_t for total #points * missing headers * another missing stddef.h * clarifications (closes NanoComp#173) * Portable sed commands (NanoComp#194) * Portable sed commands * Remove sed backup files on clean * Fix in_point and pass filename_prefix through Simulation constructor (NanoComp#196) * Be explicit about which names are functions in Python docs (NanoComp#201) * Show test-suite.log in travis (NanoComp#200) * Fix 2d Absorbers (NanoComp#202) * Fix 2d Absorbers * Remove strength member from C++ absorber * new clean branch for modeExpansion code (NanoComp#192) * new clean branch for modeExpansion code * updates * fixed minor issue in add_eigenmode_source that had produced slight discrepancies in wvg_src.py test * update docs, examples, tests (NanoComp#199) * update docs, examples, tests * fix imported library path * tweaks * fixes for 64-bit indices * missing gitignore files * am_master -> am_master() fix * can't run 2d near2far tests if we don't have GSL for Hankel functions * symmetry test tolerance was slightly too low for MacOS/LLVM compilers * rename libctl directory to scheme * MEEP_SUFFIX seems to be no longer used (NanoComp#205) * fix spelling (NanoComp#204) * support susceptibilities in user-defined materials (NanoComp#203) * trying mkdocs stuff on master branch as readthedocs seems to have trouble with other branches * synced with stevengj/master * sync with stevenj master * updates * adds support for susceptibilities in user-defined materials; fixes github issue NanoComp#197 * added --with-susceptibility option to libmeepgeom/user-defined-material test * Python MPB interface (NanoComp#191) * Initial mpb files * MPB progress * Rename mpb -> libpympb * Rename meepmpb.cpp -> pympb.cpp * Remove MaterialGrid stuff * Add libmeepgeom pieces to pympb.cpp * Add test machinery * Add pympb.hpp * libpympb compiling * Set up python Makefile for libpympb * Test create_maxwell_data * Successfully creating maxwell_data from python * Build adjustments for meep.mpb * Add Lattice and Matrix. * set_maxwell_dielectric working * Starting solve_kpoint * Solving kpoints, but values are off * Adjust parity in test * Add output_epsilon to python iface * Fix warnings * Copy default_material and add get_epsilon * Add meep.hpp include path to pympb tests * Add band range data and gap output functions * Reuse linear_interpolate from libmeepgeom * Default constructors for meepgeom types * No globals. Don't copy geometry and default_material * Initial output_field_to_file function * Add matrix multiplication * Move Matrix and Lattice to geom.py * Move imports to geom.py * Keep vacuum global for now * output_epsilon working from python * Bands agreeing * Outputing band ranges and gaps from python * Refactor libpympb * Basis MPB run working perfectly from python * Use deterministic results for testing * run_te with geometry working * Factor common checks into functions * Test gap_list lengths * Add list_split. Fix gap_list * Reuse epsilon_file_material from meepgeom * Get h_field from python * Add get_e_field and get_d_field * Start py version of output_field_to_file * Get ref values of mpt-tutorial-epsilon.h5 * Add h5py for MPB * Basic h5 file creation * h5 python epsilon output working (without geometry) * Get mpb stuff working on travis * Fix libpympb MPI test * Don't allocate memory in pympb test * get_efield and get_dfield passing tests * Refactor fields tests and add get_bfield * Get meep version from configure * Complete 'First Band Structure' tutorial working * Add test for compute_field_energy * Add python version of output_field_z * Add test for output_efield_z * Refactor output_field_to_file * Add with_hermitian_epsilon * Refactoring, and clean up h5 files from unit tests * Only delete test files on master process * Fix lattice typemap * Reuse common swig functions and fix compiler warnings * Align python with pympb name change * Add triangular lattice test * Add maximize gap and anisotropic gap to tutorial, plus tests * Add 5x5 point defect example with tests * Fix tests for py2 * All MPB tutorial functionality complete * Add test for issue 180 * Passing output_efield_z test * Remove h5 IO from C++ * Add output_charge_density and test * Remove matrixio.cpp and all C++ IO stuff * Remove redundant C++ tests and fix Makefiles * Don't generate Makefile for libpympb/tests * Fix bug in output_scalar_field * Fix test_output_efield_z by calling fix_efield_phase * Add bragg-sine example and test * Reset dimensions on each run * Add bragg example and test. Add verbose flag * Allow tolerance in check_band_range * Prevent MPI race conditions in tests * Fix memory issues (NanoComp#209) * more gitignore files * add way to turn off COW semantics for structure_chunks * gitignore python-mpb * Add new MPB examples and functionality (NanoComp#211) * Add diamond example and test * Add hole-slab examples and test * Add honey_rods example and test * Replace np.testing.assert_allclose for h5 comparisons * Add line_defect example and test. * Add sq_rods example and test * Run sq_rod example in main * Fix mpb in installation package (NanoComp#215) * Fix mpb in installation package * Force remove on cleanup * documentation updates/tweaks (NanoComp#216) * updates to docs * more tweaks * add modeexpansion link * FAQ on speedup * Update FAQ.md * Add subpixel averaging, remaining MPB examples, and lower MPB test tolerance (NanoComp#217) * Add remaining MPB examples and tests * Starting subpixel averaging * Subpixel averaging working * Lower MPB test accuracy * Update test data to use subpixel averaging * Always use Kottke method * Remove meep's infinity from python wrapper (NanoComp#220) * Add convenience version of set_materials_from_geometry (NanoComp#210) * Add public set_materials method * Add sanity test for set_materials * Add documentation for set_materials * Remove any old susceptibilities before setting them * Improve test_set_materials * Fields needs to know if chunks are shared * Enable set_maxwell_mu (NanoComp#222) * minor updates (NanoComp#225) * note that libctl is used for Python * Add missing MPB functionality (NanoComp#223) * Add first_brillouin_zone and test * Add missing functionality * Add missing functionality * copyright year update * clarify near2far parallelization * removed k_func argument to get_eigenmode_coefficients, added typemaps to call get_eigenmode_coefficients from python (NanoComp#227) * removed k_func argument to get_eigenmode_coefficients, added typemaps to allow get_eigenmode_coefficients to be callable from python * updates * Manipulating raw eigenvectors (NanoComp#221) * Getting eigenvectors * get_eigenvectors working * set_eigenvectors working * load and save eigenvectors working * Call fix_hfield_phase in get_eigenvectors test * Add high level modal_volume_in_box and solve_cw (NanoComp#229) * Convert physical.py test to high level API (NanoComp#231) * Pass solve_cw arguments * add frequency-domain solver tutorial and other fixes to docs (NanoComp#232) * add frequency-domain solver tutorial and other fixes to docs * remove figures * update configure.ac * update scheme/Makefile.am * tweaks * more tweaks * Align with scheme interface on *in_box functions (NanoComp#239) * rehauled flux/mode overlap calculation, added HDF5 output routines for all DFT structures (NanoComp#226) * rehauled flux/mode overlap calculation, added HDF5 output routines for all types of DFT structures * fixed bugs in output_dft routines; added libmeepgeom/dft-fields.cpp code to test new dft_fields structures and new output_dft routines * updates to libmeepgeom/dft-fields.cpp test * removed multiple-resolution runs from libmeepgeom/dft-fields and added this test to unit-test suite * updated typemap suite for add_dft_fields; removed old dummy interface to C++ routine that had been used with previous typemap suite * fixed failing test in libmeepgeom/dft-fields * Initial mpb-data support for python (NanoComp#233) * Starting data-analysis * Progress on mpb-data * mpb_data port complete * mpb-data file i/o working * Switch MPBData to array i/o instead of file i/o * Fix for python 2 * Write map_data in C * data analysis tests working * Fix return shape of get_*field functions. * Remove transpose flag * Fix for py2 * handle_cvector working * High level dft wrappers (NanoComp#241) * add output_dft example to the frequency-domain solver tutorial and other doc updates (NanoComp#242) * updates to docs * more tweaks * minor fixes * epsilon input file support (NanoComp#240) * Add epsilon_input_file support and test * Make all_freqs an ndarray * Support for with-hermitian-epsilon (NanoComp#243) * Support for with-hermitian-epsilon * Fix typo * Align docs and *in_box functions (NanoComp#246) * Check for complex offdiag in user materials (NanoComp#245)
* Initial mpb files * MPB progress * Rename mpb -> libpympb * Rename meepmpb.cpp -> pympb.cpp * Remove MaterialGrid stuff * Add libmeepgeom pieces to pympb.cpp * Add test machinery * Add pympb.hpp * libpympb compiling * Set up python Makefile for libpympb * Test create_maxwell_data * Successfully creating maxwell_data from python * Build adjustments for meep.mpb * Add Lattice and Matrix. * set_maxwell_dielectric working * Starting solve_kpoint * Solving kpoints, but values are off * Adjust parity in test * Add output_epsilon to python iface * Fix warnings * Copy default_material and add get_epsilon * Add meep.hpp include path to pympb tests * Add band range data and gap output functions * Reuse linear_interpolate from libmeepgeom * Default constructors for meepgeom types * No globals. Don't copy geometry and default_material * Initial output_field_to_file function * Add matrix multiplication * Move Matrix and Lattice to geom.py * Move imports to geom.py * Keep vacuum global for now * output_epsilon working from python * Bands agreeing * Outputing band ranges and gaps from python * Refactor libpympb * Basis MPB run working perfectly from python * Use deterministic results for testing * run_te with geometry working * Factor common checks into functions * Test gap_list lengths * Add list_split. Fix gap_list * Reuse epsilon_file_material from meepgeom * Get h_field from python * Add get_e_field and get_d_field * Start py version of output_field_to_file * Get ref values of mpt-tutorial-epsilon.h5 * Add h5py for MPB * Basic h5 file creation * h5 python epsilon output working (without geometry) * Get mpb stuff working on travis * Fix libpympb MPI test * Don't allocate memory in pympb test * get_efield and get_dfield passing tests * Refactor fields tests and add get_bfield * Get meep version from configure * Complete 'First Band Structure' tutorial working * Add test for compute_field_energy * Add python version of output_field_z * Add test for output_efield_z * Refactor output_field_to_file * Add with_hermitian_epsilon * Refactoring, and clean up h5 files from unit tests * Only delete test files on master process * Fix lattice typemap * Reuse common swig functions and fix compiler warnings * Align python with pympb name change * Add triangular lattice test * Add maximize gap and anisotropic gap to tutorial, plus tests * Add 5x5 point defect example with tests * Fix tests for py2 * All MPB tutorial functionality complete * Add test for issue 180 * Passing output_efield_z test * Remove h5 IO from C++ * Add output_charge_density and test * Remove matrixio.cpp and all C++ IO stuff * Remove redundant C++ tests and fix Makefiles * Don't generate Makefile for libpympb/tests * Fix bug in output_scalar_field * Fix test_output_efield_z by calling fix_efield_phase * Add bragg-sine example and test * Reset dimensions on each run * Add bragg example and test. Add verbose flag * Allow tolerance in check_band_range * Prevent MPI race conditions in tests
Adds MPB-based mode-solver support from Python.
Eventually, we might want to refactor this into MPB itself, but that will require refactoring libmeepgeom into a meep-independent part, so for now we will require users to install Meep in order to get the Python MPB interface.
Incidentally, this PR fixes #180.