[dune-fem] b4102c1 added dump on file for discretefunction (usefull to debug in Matlab

Agnese, Marco m.agnese13 at imperial.ac.uk
Mon Feb 9 19:02:08 CET 2015


Hi Robert,
I have removed the functions to dump on file in order to avoid duplicate functions (as suggested by you).

I have removed the function name inside the stream and I have kept the sparse matrix format and the possibility to give an offset. 
In this way it is very simple to import matrices/vectors assembled by DUNE-FEM in other programs.

Do you think that now it is acceptable?

Best,
Marco.
________________________________________
From: Robert Kloefkorn [robertk at posteo.de]
Sent: Monday, February 09, 2015 3:51 PM
To: Agnese, Marco; dune-fem at dune-project.org
Subject: Re: b4102c1 added dump on file for discretefunction (usefull to debug in Matlab

Hi Marco,

let me point out that I don't want to discourage you from contributing
to dune-fem.

The matrix output makes sence, but probably should be added to the other
classes too, to keep something like an interface. Besides that the whole
matrix stuff needs a revision which hopefully will happen not to soon
from now.

For the discrete functions I would simply remove the name in the print
method. The the user can add the name manually, if needed.

In both cases I would like to keep the

print( std::ostream& out ) const { ...

methods and remove the ones with the filename given since it is a simple as

std::ofstream file( filename );
// check file if you fee like it
df.print( file );

Best,

Rob

> I know that these method are trivial and very simple to implement, but I think that they speed up the debug process and avoid the users to waste time in rewriting this method. Therefore, for my point of view are useful. For this reason I added them to dune-fem instead of implementing in my own codes.
>
> Nevertheless, if you think that it doesn't make sense to have them into dune-fem, we can remove them form the trunk. I don't want to force my point of view since I have very little experience.
>
> Best regards,
> Marco.




More information about the dune-fem mailing list