[Dune-devel] Implementation of inserters
Markus Blatt
markus at dr-blatt.de
Wed Jun 5 20:34:45 CEST 2013
Hi Tilak,
On Sat, Jun 01, 2013 at 01:58:48PM +0530, Tilak Raj Singh wrote:
> I was trying to implement inserters for DUNE's sparse matrices. In my
> proposal I changed the data structure a bit from as proposed in the
> research paper. Can somebody please check it and tell me if my data
> structure was better or the one in the proposed in the paper would give
> better results???
As I consider myself a nice guy (neglecting possible different
opinions of others ;), I took the effort to glance at it.
As you did not include an URL, this meant looking up your application
in google melange (I am not sure whether everybody can do this). If
you seek advice/help next time, please try to save people people some
work by being specific and including all necessary information.
Doing it the way you did it, people will prefer to simply ignore you
and I will might join them sooner or later.
Whether your data structure is better or not is up to you to
check. Just try them both and do some timings on relevant problems.
I am writing this from memory. Therefore some assumptions might not
hold. I did look at the code a few days ago. But as I do not recall
the URL any more and am doing this in my free time, I am not willing
to search for the proposal in melange again.
Your implementation seemed just like a sketch to me. Generally, you
will not see people commenting on implementation sketches. If you are
interested in contributing you will have to provide a working proof of
concept that can set up an ISTL matrix. Currently, I see that your
inserter is mixed with the matrix structure. But it should use an ISTL
matrix (of which the inserter is a friend of) as the data storage
(except for the overflow data storage), that is provided from
outside. I would prefer using operator<< for the insertion as in the
paper:
inserter[row][column]<<value;
If I did not discourage you, you should provide a more tailored
version based on the dune-istl matrices (of course used as template
parameter) . The goal should be to make your code easily tested by
us. Maybe this approach is a good idea:
- clone the dune-istl repository
- create a new branch for your changes
- Implement (start with an inserter for DenseMatrix and then continue
to the harder BCRSMatrix).
- publish somewhere (e.g. github, etc.)
If you do not know how to do this, please research yourself instead of
asking here. There should be lots of documentation on the web and some
even on our website.
Looking forward to your working code.
Cheers,
Markus
--
Do you need more support with DUNE or HPC in general?
Dr. Markus Blatt - HPC-Simulation-Software & Services http://www.dr-blatt.de
Hans-Bunte-Str. 8-10, 69123 Heidelberg, Germany
Tel.: +49 (0) 160 97590858 Fax: +49 (0)322 1108991658
More information about the Dune-devel
mailing list