[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gsl: discrete Hankel transform
From: |
c. |
Subject: |
Re: gsl: discrete Hankel transform |
Date: |
Fri, 4 Oct 2013 13:48:50 +0200 |
On 4 Oct 2013, at 12:59, Francis Poulin <address@hidden> wrote:
> Hello,
>
> I am trying to solve Poisson's equation on a circular disk and thought I
> might try the Discrete Hankel Transform that is part of gsl. I have gotten as
> far as loading the package. I found some documentation for gsl that gives
> some information but these commands don't they don't seem to be in octave
> (after I pkg load gsl-oct364).
>
> http://www.gnu.org/software/gsl/manual/html_node/Discrete-Hankel-Transform-Functions.html#Discrete-Hankel-Transform-Functions
>
> Does anyone have any example files I could use to learn about how to do this
> in octave?
>
> Cheers, Francis
If you don't need to stick to exactly that method for solving Poisson's
equation,
here is a simple example of how to solve it with the bim package [1]:
>> msh = msh2m_gmsh ("circle", "clscale", ".1");
>> msh = bim2c_mesh_properties (msh);
>> A = bim2a_laplacian (msh, 1, 1);
>> b = bim2a_rhs (msh, 1, 1);
>> dnodes = bim2c_unknowns_on_side (msh, [1 2]);
>> inodes = setdiff (1:columns(msh.p), dnodes);
>> u = zeros (columns (msh.p), 1);
>> u(inodes) = A(inodes, inodes) \ (b(inodes) - A(inodes, dnodes) * u(dnodes));
>> close all
>> graphics_toolkit fltk
>> pdesurf (msh.p, msh.t, u)
you might also want to take a look at the new fem-fenics package [2,3].
c.
[1] http://wiki.octave.org/Bim_package
[2] http://wiki.octave.org/Fem-fenics
[3] http://wiki.octave.org/Fem-fenics#Poisson_Equation