Hi
 I have compiled meep without libctl but with hdf5.But I get the following error on trying to compile the first example problem in the C++ tutorial...


[EMAIL PROTECTED] /usr/home/mc/MEEP files]# g++ `pkg-config --cflags meep` test1.cpp -o test1 `pkg-config --libs meep`
test1.cpp: In function `int main(int, char**)':
test1.cpp:9: error: `eps' was not declared in this scope


The program is
#include <meep.hpp>
using namespace meep;

int main(int argc,char **argv)
{
    initialize mpi(argc,argv);
    double resolution=20;
    volume v = vol2d(5,10,resolution);
    structure s(v,eps,pml(1.0));
    fields f(&s);

    f.output_hdf5(Dielectric,v.surroundings());

    double freq = 0.3,fwidth=0.1;
    gaussian_src_time src(freq,fwidth);
    f.add_point_source(Ey,src,vec(1.1,2.3));
    while (f.time() < f.last_source_time())
    {
        f.step();
    }

    f.output_hdf5(Hz,v.surroundings());
   
    return 0;
}

double eps(const vec &p)
{
    if (p.x() < 2 && p.y() < 3)
        return 12.0;
    return 1.0;
}

Note that in my previous mail the error was caused because i commented out the lines cause I didn't have hdf5 ability then...



Unlimited freedom, unlimited storage. Get it now
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to