Installation#

MPh is available on PyPI and can be readily installed via

pip install MPh

Run pip uninstall MPh in order to remove the package from your system.

Requires JPype for the bridge from Python to Comsol’s Java API and NumPy for returning (fast) numerical arrays. pip makes sure the two Python dependencies are installed and adds them if missing.

Comsol, obviously, you need to license and install yourself. Versions from Comsol 5.1 onward are expected to work, though only Comsol 5.5 and newer have been rigorously tested. A separate Java run-time environment is not required as Comsol ships with one already built in.

On Linux and macOS, Comsol is expected to be found in its respective default location. On Windows, any custom install location is supported, as the installer stores that information in the central registry.

Though if, on Linux, you do have Comsol installed in a custom location, create a symbolic link in ~/.local, have it point to that Comsol folder, and give it a name that starts with comsol.