← Back to team overview

dolfin team mailing list archive

Re: Automatic generation of spare linear system of equations

 

2009/2/25 Anders Logg <logg@xxxxxxxxx>:
> On Wed, Feb 25, 2009 at 10:05:34PM +0000, A Navaei wrote:
>> I'm not sure if I'm making sense here. Both of you suggested using
>> assemble which requires Form which, if I'm not wrong, requires
>> Function and that needs FunctionSpace which requires Mesh, but I
>> emphasised that this is no FEM problem :) I'm just trying to get the
>> best of available LA in dolfin.
>>
>> Let me give you a concrete example, have a look at Eq 12 of this paper:
>>
>> http://www.mia.uni-saarland.de/Publications/brox-eccv04-of.pdf
>>
>> Is it possible to use assemble() to extract A and b out of this
>> equation? Many of the coefficients in the equation are image data, I
>> guess I should convert the image data to Matrix and use Variable for
>> the unknowns?
>
> Yes, this would be fine. You just need to set the values in the matrix
> manually using A.set().

It's nice to know the automation is also available for non-FE
approaches. I'll give it a try now.

>
> But this looks a bit ugly. Why not apply finite elements to solve the
> PDE?

I'm not sure if the available non-linear solvers are able to solve the
highly non-linear Eq 7 directly, can they? The method suggested in the
paper involves a double-linearisation which needs two nested loops,
so, solving the final double-linearised equation inside this nested
loops could be expensive.

I'm trying to compare the profiling of the finite-element approach and
the approach in the paper, which could be classified as
finite-difference as they approximate the equation, and then compare
the speed and accuracy of the results.


-Ali

>
> --
> Anders
>
>
>> -Ali
>>
>> 2009/2/25  <kent-and@xxxxxxxxx>:
>> >
>> > I'm not exactly sure what you are asking. But it is easy to obtain the
>> > matrices
>> > and vectors in the linear system to be solved.
>> >
>> > eg.
>> > dolfin/demo/la/trilinos/python/demo.py
>> >
>> > shows how to solve the system using Trilinos. You can use dolfin
>> > to make matrices and vectors in PETSc, uBlas, MTL, and Trilinos format.
>> > You can choose to let dolfin solve it for you or you can get the underlying
>> > matrix and solve it with the above LA libraries.
>> >
>> > Kent
>> >
>> >
>> >
>> >> Is the linear algebra support in dolfin capable of automatically
>> >> generating the sparse linear system of equations? (I know that ffc
>> >> effectively does this, but note that this question does not involve
>> >> solving a PDE using FEM, but a linear system of equations).
>> >>
>> >> For example, assume we have some busy sets of linear equations and we
>> >> wish to convert them to Ax = b so that we can feed them to the linear
>> >> solvers. Is there any way of automatically obtaining A and b avoiding
>> >> manual calculations and hard-coding?
>> >>
>> >>
>> >> -Ali
>> >> _______________________________________________
>> >> DOLFIN-dev mailing list
>> >> DOLFIN-dev@xxxxxxxxxx
>> >> http://www.fenics.org/mailman/listinfo/dolfin-dev
>> >>
>> >
>> >
>> >
>> _______________________________________________
>> DOLFIN-dev mailing list
>> DOLFIN-dev@xxxxxxxxxx
>> http://www.fenics.org/mailman/listinfo/dolfin-dev
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkmlwzMACgkQTuwUCDsYZdGgrQCeJt6cXdWcVYMqpN1dzWOcVR08
> qgUAoIVFdtPvb9uT5O7KRC39fO9Chkff
> =Eo80
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev
>
>


Follow ups

References