octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Project progress


From: c.
Subject: Re: Project progress
Date: Mon, 7 Oct 2013 08:07:07 +0200

On 6 Oct 2013, at 23:06, marco Vassallo <address@hidden> wrote:

>> But why do you say you don't trust nnz returned by the data() method?
>> c.
> 
> It is just that I checked the value of nnz as given from the data method and 
> sometimes it is really higher then the final value and sometimes really 
> closer.
> For example,
>                                   data-> nnz  |  final value in octave
> Poisson problem   |     7361          |  5119
> Darcy-Stokes        |      2681009   |  1283503
> Mixed-Poisson      |      88320        |  81440
> 
> But as it is always an upper bound maybe we can just use it and avoid the if 
> statement.

That is probably because the nonzero pattern is initialized from the mesh 
structure before knowing the values of the entries ...
For example I suspect the Poisson problem above was solved on a 2D mesh with 
all right angles, wasn't it?
In this case the nonzero pattern produces roughly 8 nonzeros per row, while the 
actual nonzeros are only about 5 per row.

If you want to get rid of the extra zeros you should use the maybe_compress 
method in Octave (or the equivalent method in dolfin),
but, while it might save a lot of space in some special cases I don't think it 
is worth the effort in general ...

> Marco                                           
c.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]