← Back to team overview

dolfin team mailing list archive

Re: pydolfin

 

On Thu, Aug 21, 2008 at 11:03 PM, Marie Rognes <meg@xxxxxxxxxxx> wrote:

> Evan Lezar wrote:
>
>>
>>
>> On Thu, Aug 21, 2008 at 10:53 PM, Marie Rognes <meg@xxxxxxxxxxx <mailto:
>> meg@xxxxxxxxxxx>> wrote:
>>
>>    Evan Lezar wrote:
>>
>>
>>
>>        On Thu, Aug 21, 2008 at 10:04 PM, Anders Logg <logg@xxxxxxxxx
>>        <mailto:logg@xxxxxxxxx> <mailto:logg@xxxxxxxxx
>>
>>        <mailto:logg@xxxxxxxxx>>> wrote:
>>
>>           It works if you replace
>>
>>            Function(element, mesh, h_e)
>>
>>           by
>>
>>            Function(element, mesh, Vector())
>>
>>           You should get an error message when trying to create a
>>        Function from
>>           a numpy array (unless Martin has done some tricks for
>>        initialization
>>           of vector constants that I have missed).
>>
>>           Martin?
>>
>>
>>        Hi
>>
>>        Good news.  I just got it working - I think the discussion got
>>        me thinking just the right amount :)
>>
>>        And yes, the problem was with the numpy array that I was
>>        trying to pass to the constructor - there were no error
>>        messages or warnings.
>>
>>        I think I will have a look at putting the check in and
>>        submitting a patch.
>>
>>        Now I have officially used dolfin to solve for the TM cutoff
>>        modes of a rectangular waveguide :)  It's a good day indeed.
>>         Now all I need to be able to do is identify which dofs
>>        correspond with dirichlet edges so that I can solve for the TE
>>        modes aswell (I need to remove the rows and columns associated
>>        with those degrees of freedom from the eigensystem).  How is
>>        work on that coming along?
>>
>>
>>    I'm not quite into electromagnetics lingo, so exactly what system
>>    of equations are you looking at?
>>
>>    Something like:
>>
>>      (curl E, curl T) = k^2 (E, T)      for all T in V_h \subset H(curl)
>> with T x n = 0 on the boundary?
>>
>>
>> Yes.
>>
>> Assuming the boundary is a perfect electrical conductor (PEC), then the
>> electric field (which one needs to solve for to find the TE modes) has a
>> zero tangential component on the boundary (or the parts that are PEC).
>>
>> As soon as I have things together nicely I will submit some demos with
>> supporting documentation.
>>
>
> So you get an generalized eigenvalue problem with
>
>   A x = k^2 B x
>
> ...  Dirichlet boundary conditions are implemented for the Nedelec
> elements. So, I guess you could just apply the bc to the matrices A and B
> and solve for the resulting eigenvalues/eigenvectors. You'll get a bunch of
> "false" eigenvalues = 1.0 with eigenvectors that only have positive values
> for the dofs at the boundary edges (I'm conjecturing slightly here), but
> those should be possible to filter out?
>
>
Yes, it is a generalized eigenproblem.  I think the reason that I haven't
been as successful as what I had hoped is that I had run into some problems
trying to apply the boundary values, but I might be better equipped to deal
with that now.  The problem of false eigenvalues shouldn't be too much of a
problem since I already have to identify the eigenvalues associated with
spurious (non-physical) solutions from the null-space of the curl
opperator.  Of course if you could remove those entries entirely, then the
eigensystem that you need to solve is a little smaller, but that would
probably only be significant for really large problems - so I will have a
look at simply applying the BC's as a start.

I will give it a go and give a shout if I get stuck again.  Thanks for the
assistance thus far.

Evan


> --
> Marie E. Rognes
> Ph.D Fellow, Centre of Mathematics for Applications, University of Oslo
> http://folk.uio.no/meg
>
>

References