Probably, you would better look at generic src_time class. AFAIK, you just have to override its dipole(time) function to whatever function you need. I don't have a working c++ example and would be glad if anyone provides it.
wbr Shawkat 2009/9/11, Chintha Handapangoda <h_chin...@yahoo.com>: > Dear All, > > I am trying to simulate a two dimensional photonic crystal with a square > lattice composed of cylinders, using the C++ interface to meep. My source is > in the form of discrete values in both spatial and time domains (stored in > an array). I tried to use the "custom_src_time" function defined in the > meep.hpp header file but came across the following problem: > > The function is defined in meep.hpp as custom_src_time(complex<double> > (*func) (double t, void *), void *data, double st, double et). > What information is passed as the second argument (void *data) to this > function? > > Thanks very much. > > <font color="blue" face="ScriptS">Chintha Handapangoda.</font> > > > > _______________________________________________ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss