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(). But this looks a bit ugly. Why not apply finite elements to solve the PDE? -- Anders > -Ali > > 2009/2/25 <[email protected]>: > > > > 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 > >> [email protected] > >> http://www.fenics.org/mailman/listinfo/dolfin-dev > >> > > > > > > > _______________________________________________ > DOLFIN-dev mailing list > [email protected] > http://www.fenics.org/mailman/listinfo/dolfin-dev
signature.asc
Description: Digital signature
_______________________________________________ DOLFIN-dev mailing list [email protected] http://www.fenics.org/mailman/listinfo/dolfin-dev
