Material Plugin Linux Implementation

materialplugin

#1

Hello,

I have been working with the material plugin functionality available in FDTD software suites. I have been successful making plugins on Windows platforms using the provided materials. However, I am struggling to implement a plugin on a Linux/UNIX platform as all of the provided material is focused on Windows platform.

I think the issues exists in the imaterialplugin.h file as the code existing to create the plugin components are written for Windows implementation. Is it possible to get the provided file formatted for Linux/UNIX implementation of the material plugins?

Thanks for the help.


用代码生成lorentzexample.dll放在plugin-material但FDTD找不到
#2

Hi @rld,

The imaterialplugin.h file should also work in a Linux/UNIX platform. I have tested this with the source code for the Lorentz example (in lorentzexample.zip), which you can download here.

I used the following lines of code to compile the plugin using g++:

g++ -c -fpic lorentzexample.cpp
g++ -shared -o liblorentz_example.so lorentzexample.o

Once the library file has been created you can copy it to the folder where the plugins are:

sudo cp liblorentz_example.so /opt/lumerical/fdtd/bin/plugins/materials/.

Please try this and let me know if it works.


#3

Hi @fgomez,

Yes, I was able to get this example code to work. I was also able to resolve the problem with my own plugins. The imaterialplugin.h file I was using had a typo in one of the definitions that would only be evaluated when being compiled on a non windows platform.

Thank you for your assistance.

Cheers.