Hi Andreas and fellow users,
I have modified the Maxwell operator to work with epsilon and mu which
vary through space (attached em.py). The code is still a little rough
and ready, but I've cleaned it up a bit and re-integrated the code for
fixed epsilon and mu as well. I have attached a couple of files which
give some very limited tests of the functionality - there are still
great swathes of code which are essentially untested. I have also
added PMC boundary conditions, and tried to improve the documentation.
Unfortunately the PML and logging functionality won't work with this
operator at this stage. I'd be interested to hear any feedback.
In the 2D cavity example I have instrumented one point in space and
dumped it to a text file, with the idea of passing it to harminv to
check the resonant frequency. However harminv seems to choke on this
file, but a simple FFT reveals that the frequency is of the right
order of magnitude!
Since I am mostly interested in scattering problems, my next step will
be to look into implementing the total-field/scattered-field approach
for incident fields.
On 20 June 2010 09:58, Andreas Kloeckner <lists(a)informa.tiker.net> wrote:
> Not sure if that'll be much help, but here's a link to a snippet of code
> that I wrote against the hedge.partition interface--it might need a few
> fixes to get it to go:
> Observe that right now it's a bit cumbersome to use because you have to
> construct and invoke the inter-domain fluxes by hand. This could use
> some automation.
I'll try to have a closer look some time, at the moment I'm having
trouble connecting to git.tiker.net
>> > What you suggest doesn't cover smoothly varying epsilon and mu. This
>> > might not happen very often in practice, but I don't want to preclude
>> > it through a misguided interface choice.
>> I see what you mean - I can think of a few examples where this might
>> crop up. However, doesn't this also require the operator to be
>> modified to take into account the spatial derivatives of epsilon and
>> mu? Possibly a way to cover all cases would be
I just realised that I was confusing first order and second order
formulations of Maxwell's equations. So as far as I can see the code
I have written should work for smoothly varying materials without any
further modification, so your suggestion sounds like the best way to
go. Currently it tests whether epsilon and mu are numbers, or
>> The error always occurs during time stepping, but seems to be somewhat
>> random as to how many time steps it takes to occur. I just installed
>> unbuntu 10.04 server on the same computer, which has openmpi 1.4.1-2,
>> and did a fresh clone of the git repository. Now I don't have this
>> problem any more, though I've left my unbutu 9.10 installation intact
>> so I could go back and try to reproduce it if necessary.
> For now, it seems a bit too obscure to dedicate time to hunt it down,
> but if it ever becomes an issue, let me know, and I'll try to see what's
> going on.
This seem quite reasonable. For some reason I always seem to bump
into errors like this that nobody else can reproduce!
>> Also, I just noticed that for some reason visit 2.0 doesn't seem to
>> like the VTK files which hedge is producing.
> I just sent an email to the visit folks (with you cc'd)--let's see what
> they reply.
Again, not a major issue, I'll just stick with paraview, I like its
GUI better anyway. I just remember that somewhere (on the wiki?) you
I've been reading the code and doing the tests. When I began to test the
file maxwell-pml.py I found this problem:
rgomezal@localhost ~ $ python maxwell-pml.py
Traceback (most recent call last):
File "maxwell-pml.py", line 222, in <module>
File "maxwell-pml.py", line 74, in main
mesh = make_mesh(a=numpy.array((-1,-1)), b=numpy.array((1,1)),
File "maxwell-pml.py", line 37, in make_mesh
line 102, in set
line 62, in set_points
self.points[i] = pt
TypeError: No registered converter was able to produce a C++ rvalue of
type double from this Python object of type numpy.int32
It seems something concerning the method set_point in the class
MeshInfoBase, but I cannot find the origin of this error. Have you seen
this kind of message before?
By the way, I don't know if you received my last email. I sent it to your
email account (at the university) but perhaps it was filtered because it
had an attachment.