comp.lang.ada
 help / color / mirror / Atom feed
From: "comp.lang.php" <kst@ecs.soton.ac.uk>
Subject: Re: Ann: Mathpaqs, release Feb. 2011
Date: Thu, 24 Feb 2011 01:51:18 -0800 (PST)
Date: 2011-02-24T01:51:18-08:00	[thread overview]
Message-ID: <46b2df60-5b87-44f3-8c2d-22b830749c50@y31g2000prd.googlegroups.com> (raw)
In-Reply-To: m2k4gq24uo.fsf@pushface.org

On Feb 23, 2:38 pm, Simon Wright <si...@pushface.org> wrote:
> "Nasser M. Abbasi" <n...@12000.org> writes:
>
>
>
>
>
>
>
>
>
> > On 2/22/2011 3:33 AM, Dmitry A. Kazakov wrote:
>
> >> Are you asking why Ada does not include them in the standard library?
>
> > My question is the same, a very simple user question, I will repeat it again:
>
> > What do I need to do to solve Ax=b in Ada, with A being sparse matrix.
>
> > If no one has done this before in Ada, that is fine. I am just asking.
>
> > The format of the sparse is not important, the package used is not
> > important. I am just asking if the tools, the bindings, the
> > library, or whatever, is there now, today, to do this in Ada.
>
> > It is really a simple question :)
>
> I'm pretty sure the answer is -- there is no Ada binding to do what you
> want.

A sparse matrix is one whose elements are mostly zero. Hence, the
designer of code for such problems needs to avoid the store of zero
terms and silly operations such as 0 + 0*0. The matrix can be stored
in several ways.

We can instantiate the package Ada.Containers.Ordered_Maps with the
index as key_type, the chosen real type as element_type or use the
compact row storage formula (or variants) of Saad. The first way gives
a dynamic data structure the latter a bounded one.

To solve linear equations directly by Gaussian elimination the problem
is "fill in" where zeros become nonzeros. Reordering the rows and
columns can help considerably. Modern methods try to work with blocks
of dense matrices in order to exploit level 3 blas operations. A good
method is UMFPACK  http://www.cise.ufl.edu/research/sparse/umfpack/ ,
it is written in C and Ada bindings are possible.

I have worked with sparse matrices in my finite element codes written
in Ada. I have a crude binding to UMFPACK that needs tidying before
public release.

I have not used the gnat tool to generate automatic bindings yet. It
would be very useful if it could be added to GPS and appear in a menu.

Ken Thomas



  reply	other threads:[~2011-02-24  9:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-21 18:43 Ann: Mathpaqs, release Feb. 2011 Gautier write-only
2011-02-21 23:59 ` Nasser M. Abbasi
2011-02-22  2:34   ` Gautier write-only
2011-02-22  9:56     ` Nasser M. Abbasi
2011-02-22 10:27       ` Dmitry A. Kazakov
2011-02-22 10:40         ` Nasser M. Abbasi
2011-02-22 11:33           ` Dmitry A. Kazakov
2011-02-22 20:45             ` Nasser M. Abbasi
2011-02-22 21:03               ` Dmitry A. Kazakov
2011-02-23 14:38               ` Simon Wright
2011-02-24  9:51                 ` comp.lang.php [this message]
2011-02-25 21:09                   ` Simon Wright
2011-02-26  0:21                     ` Nasser M. Abbasi
2011-02-26  7:53                       ` Simon Wright
2011-02-26 18:38                       ` Gautier write-only
2011-02-26 20:59                         ` Simon Wright
2011-02-22 17:35           ` Simon Wright
2011-02-22 17:21       ` Gautier write-only
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox