Hi, In my Meep c++ script, I tried to use set_epsilon and set_mu based on my derived material_function class.
But it seems that the set_epsilon in the structure class does not recognize the overloaded eps member function. I made the simplified case only for set_epsilon below. Kind regards, Sendy -----------------------------snip------------------------------------ #include <iostream> #include <meep.hpp> using namespace meep; using namespace std; class mymat: public material_function { public: cres(){}; double eps(const vec &p){ if ( p.x() < 2 && p.y() < 3 ){ return 2.; } return 3.; }; }; double background(const vec &p){ return 1.5; }; int main(int argc, char **argv) { initialize mpi(argc, argv); // do this even for non-MPI Meep double resolution = 20.; // pixels per distance grid_volume v = vol2d(5,10,resolution); structure s(v, background, pml(1) ); mymat eg1; s.set_epsilon(eg1); fields f(&s); f.output_hdf5(Dielectric, v.surroundings()); return 0; } This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. _______________________________________________ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss