I wrote code as below. It is very simple.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    double g_x = 5;
    double g_y = 5;
    double g_z = 5;
    double g_res = 10;
    compoent c = Hz;
    volume v = vol3d(g_x, g_y, g_z, g_res);
   
    master_printf("Simulating empty structure...\n"); 
    structure s0(v, empty, pml(g_pml));
    trash_output_directory("empty");
    s0.set_output_directory("empty");

    gaussian_src_time src((g_fmin+g_fmax)*0.5, 0.5/(g_fmax-g_fmin), 0, 5/(g_fmax-g_fmin));  
  
    vec src_point(g_xcen, g_ycen, g_zcen);
    vec monitor_point(g_xmonitor, g_ymonitor, g_zmonitor);
   
    if ( g_zmonitor > g_z - g_pml ) {
        master_printf("the location of the monitor is out of the structure!\n");
        exit(1);
    }
   
    geometric_volume flux_plane(vec(g_pml, g_pml, g_zmonitor), vec(g_x-g_pml, g_y-g_pml, g_zmonitor));
  
    fields f(&s);
    f.output_hdf5(Dielectric, v.surroundings());

    master_printf("sources added...\n");
    f.add_point_source(c, src, src_point, 1.0);
     
    dft_flux flux_trans = f.add_dft_flux_plane(flux_plane, g_fmin, g_fmax, g_nfreq);

When I try to run it, the message below is appeared.

*** glibc detected *** double free or corruption (!prev): 0x0a95c3e0 ***
p0_15194:  p4_error: interrupt SIGx: 6

Then I add dft_flux::remove(), it's ok now.
Could you give me some advice?

Many thanks!

BR
Jun




_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to