openEMS is a free and open-source electromagnetic field solver using the EC-FDTD method.
 
 
 
 
 
 
Go to file
Yifeng Li 486f3140cb openEMS.pyx: check canonical path in assert, close #113.
Currently, running openEMS's example Python scripts on macOS always fails
with the following error:

    $ python3 MSL_NotchFilter.py
    Traceback (most recent call last):
      File "/Users/gentoo/code/openEMS-Project/openEMS/python/Tutorials/MSL_NotchFilter.py", line 103, in <module>
        FDTD.Run(Sim_Path, cleanup=True)
      File "openEMS/openEMS.pyx", line 489, in openEMS.openEMS.openEMS.Run
    AssertionError

This is caused by an oversight of an assertion in openEMS.pyx:

    os.chdir(sim_path)
    # ...
    assert os.getcwd() == sim_path

The problem here is that "sim_path" is not a canonical path name,
so the assertion would fail if the path we're switching into contains
a symbolic link. This problem affects all operating systems, it's not
limited to macOS. But on macOS, the problem is especially serious,
since macOS's "/tmp" is a link to "/private/tmp" by default. Thus, it
causes an AssertionError in all the included Python examples.

Instead of doing "assert os.getcwd() == sim_path", we should write
"assert os.getcwd() == os.path.realpath(sim_path)" to ensure that
we're checking a canonical path.

Signed-off-by: Yifeng Li <tomli@tomli.me>
2023-05-03 18:46:29 +02:00
Analyse example updates 2010-03-16 21:43:11 +01:00
Common Fix various typos 2022-12-11 11:32:04 +01:00
FDTD PML: try to fix pml working for a finite conductor waveguide 2023-03-08 22:10:30 +01:00
TESTSUITE fixed testsuite (Coax.m) 2012-11-30 23:06:23 +01:00
cmake/Modules add CMake to openEMS 2014-09-18 21:12:50 +02:00
linux Fix various typos 2022-12-11 11:32:04 +01:00
matlab fix hdf5 search to not find opencv hdf5.h 2023-01-06 16:43:21 +01:00
nf2ff nf2ff main: update year info 2023-02-19 12:47:33 +01:00
python openEMS.pyx: check canonical path in assert, close #113. 2023-05-03 18:46:29 +02:00
tools Fix various typos 2022-12-11 11:32:04 +01:00
.gitattributes add gitattributes 2015-06-18 20:37:13 +02:00
.gitignore python: replace distutils with setuptools 2021-07-13 19:17:15 +02:00
CMakeLists.txt cmake: drop support for vtk<=5 2023-01-06 20:05:13 +01:00
COPYING GPL licensing 2010-03-11 16:47:40 +01:00
Doxyfile simplified the dot diagrams in doxygen output 2011-01-07 09:59:10 +01:00
INSTALL Fix various typos 2022-12-11 11:32:04 +01:00
NEWS news update 2013-09-03 14:13:37 +02:00
README version v0.0.33-rc1 2015-08-05 21:23:31 +02:00
TODO Fix various typos 2022-12-11 11:32:04 +01:00
astyle.sh shell script to invoke the source code formatter astyle 2010-08-26 15:32:25 +02:00
known_bugs new: known_bugs/problems lists 2010-03-11 15:35:28 +01:00
known_problems new: known_bugs/problems lists 2010-03-11 15:35:28 +01:00
main.cpp A few fixes for MPI 2016-12-02 19:03:35 +01:00
openEMS.sh Fixes in openEMS.sh 2021-08-18 23:46:45 -07:00
openEMS_MPI.sh initial MPI support 2011-03-10 10:39:07 +01:00
openems.cpp engine: try to find optimal number of engine threads 2023-01-06 20:01:07 +01:00
openems.h engine: try to find optimal number of engine threads 2023-01-06 20:01:07 +01:00
openems_global.h python+MSVC: reorganize headers to reduce req. includes 2019-12-30 20:04:22 +01:00

README

*
* openEMS - a free and open electromagnetic field solver
*
* Copyright (C) 2010-2015 Thorsten Liebig
*

openEMS is licensed under the terms of the GPLv3, see <http://www.gnu.org/licenses/>.


Website:   http://openems.de
Forum:     http://openems.de/forum/
Tutorials: http://openems.de/index.php/Tutorials


To use openEMS from Matlab or Octave, you need to include the <openEMS-install-folder>/matlab folder in the respective environment:
> addpath( '<openEMS-install-folder>/matlab' );

To verify the correct installation follow the instructions at:
http://openems.de/index.php/Tutorial:_First_Steps