Thanks Mischa!

What about getting time points?
I’ve had a nightmare of a time getting it to do this elegantly for time, too. 
Currently I’m calling another step function:

           (at-beginning output-grid-points)
           (during-sources (to-appended "ex" (at-every 0.05 output-efield-x))
                           (to-appended "time" (at-every 0.05 
output-time-points))
                           )

which call the functions:

(define (get-coordinates r eps)
  (vector3-z r))
(define (get-time r eps)
  (meep-round-time))
(define (output-grid-points) (output-field-function "grid-points" (list 
Dielectric) get-coordinates))
(define (output-time-points) (output-field-function "time" (list Dielectric) 
get-time))



but it is still very contrived to access this data. There don’t seem to be any 
documents on how to write your own hdf5 output functions, or how exactly the 
predefined ones work.


> On Jun 25, 2016, at 5:14 PM, Mischa Megens <[email protected]> wrote:
> 
> Hi John,
> 
> I suppose a convenient way to get grid points would be to use
> (output-real-field-function name cs func)
> Define the function to return the coordinate component you are
> interested in, i.e.,
> (define (f r eps) (vector3-x r))
> It might even work without the eps, I haven't tried.
> The reference page
> http://ab-initio.mit.edu/wiki/index.php/Meep_field-function_examples
> gives some more details.
> 
> Success,
> Mischa
> 
> 
> On 6/24/2016 6:48 PM, John B. Sigman wrote:
>> This has been asked several times in the help forums, but seems to be 
>> unanswered. Is there an elegant way to get grid points and time points for 
>> the field values I output?
>> 
>> Other than, of course, tracking the simulation I set up and reconstructing 
>> the (assumed) linear points in between the boundaries?
>> 
>> Thanks
>> Johnny
>> _______________________________________________
>> meep-discuss mailing list
>> [email protected]
>> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
> 
> 

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

Reply via email to