wsshin / maxwellfdfd

MATLAB-based solver package of Maxwell's equations by the FDFD method

Home Page:http://www.mit.edu/~wsshin/maxwellfdfd.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error running tests on Matlab 2017a

Chronum94 opened this issue · comments

The class 'Object' contains a parse error, cannot be found on MATLAB's search path, or is shadowed by another file with the
same name.

Error in build_system (line 101)
	obj_dom = Object.empty();

Error in maxwell_run (line 288)
		build_system(ge, solveropts.pml, varargin{1:iarg}, pm);

Error in pointsrc_2d (line 10)
[E, H, obj_array, src_array, J] = maxwell_run(...```

I get this when running `pointsrc_2d.m`. All of the installation folders/subfolders are in the search path, so I'm at a bit of a loss here. Any help appreciated.

I'm also running MATLAB 2017a and am having the exact same issue. I don't know enough about classes in Matlab to know what this might refer to. Any help is greatly appreciated.

I'm also running MATLAB 2017a and having the same errors, can any idea how to reslove it.

It appears that this isn't under active development anymore, unfortunately. I've been toying with the far-fetched idea of porting all of this to Python/Cython.

Hey all,

I renamed all instances I found of Object to something else (I chose Objekt). This fixed it. I think the problem is that Object is overloaded and then MATLAB tries to run something else. I have also installed the MNPBEM toolbox by Ulrich Hohenester and Andreas Trugler from the University of Graz, and I think they also have an object class named Object. Maybe that;s the overloading that casued the problem, I don't really know, but rename all instances of Object in the FDFD code and it should work.

Beautifully done. This worked. It appears that the package shadows some other package or toolbox with some variable called Object. Renaming all instances of Object (including strings, automate this process) solves this.

Thanks all for reporting the problem and coming up with a solution! I changed Object to EMObject to remove this error. Good to know that still many people are using this package!