I don't actually do 1D, but the other dimensions in my problem are doing Poisson-type displacement. So, only 1D is really active, but all are calculated.

On Thu, Jul 31, 2008 at 4:07 PM, rpmu...@gmail.com rpmu...@gmail.com wrote:

Ondrej,

Thanks, I'll go through the schrodinger problems a little more carefully, and post my questions to this thread.

On Jul 31, 2:57 pm, "Ondrej Certik" ond...@certik.cz wrote:

On Thu, Jul 31, 2008 at 10:33 PM, rpmu...@gmail.com rpmu...@gmail.com wrote:

Here's yet another plea for help on a "first problem".

I've been trying to learn FEM a little more thoroughly. Being a quantum chemist, I started thinking about looking at idealized 1d eigenproblems using FEA. I worked out some of the integrals, and the result is in the paper that I've added to the group space here:

http://groups.google.com/group/sfepy-devel/web/fem-1d-eigen.pdf

My quantum chemistry background shows through here, as I'm just using the finite elements like a normal basis set, a "pointy" Gaussian, if you will, and computing matrix elements. This isn't the way that real FEA people solve problems, and I'm trying to understand what that entails. I know it's something like:

- create a mesh
- work out a bunch of integrals over the mesh elements
- then a miracle occurs
- write down your final solution
You do it exactly right in the paper. It's the same in 2D and 3D. I view FEM in the same way as you do, the mesh just defines a basis, you plug the basis in the equation, you get the matrix formulation, you solve it, you are done.

If you plugged the basis into the equation naively (e.g. directly), you'd get unsymmetric matrices, so you first integrate the equation per partes (or the green theorem, as you use in the paper).

Mathematicians also say a lot of other things about weak solutions and stuff, but I found it's not really useful and it doesn't provide any more useful information for me besides the above.

Being a python person as well, I have high hopes that sfepy can help me understand how real FEA solutions work. But I'm still being a little bone-headed, and I don't understand the example files very well.

My hope is that the simple 1d problems that I've provided are simple enough that it wouldn't be too much work for someone (Ondrej?) to show me how to implement them in sfepy. Thanks in advance for any help anyone can offer.

I am not sure if sfepy can solve 1D problems. 1D problems can be solved imho more efficiently by just integrating the ordinary differential equation. Ryan, do you know how to implement 1D stuff in sfepy?

For 2D and 3D, see the schroedinger.py script, that implements the particle in the box and oscillator problems, both in 2D and 3D. Maybe it could be adapted to 1D as well, I never thought about that.

Let me know if something is not clear in the script. If you are interested in the internals, I can also answer something that I understand and Robert can answer all the other details, as he programmed it in the first place.

Ondrej