On Jul 28, 2009, at 3:25 PM, Christian Schreiber wrote:
In order to do that, I need to be able to set the electric field at
a certain position in a "target" volume to a value which I have
determined in some other routines. Is there some explicit function
which could do that, or are there some ways of achieving this
otherwise?
Well, you can call meep::fields::initialize_field. In Scheme you
could do, for example:
(init-fields)
(meep-fields-initialize-field fields Ez myfunc)
where myfunc(x) is a function of one argument (a vector x) that
returns the desired Ez at that point. Similarly for other field
components.
If this is not quite what you want, you may need to modify the Meep
source code, perhaps starting with the code for initialize_field (in
src/initialize.cpp) to guide you.
Steven
_______________________________________________
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss