[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Project progress
From: |
c. |
Subject: |
Re: Project progress |
Date: |
Sun, 6 Oct 2013 21:46:38 +0200 |
On 6 Oct 2013, at 20:28, marco Vassallo <address@hidden> wrote:
> At the moment I'm doing something very close (I hope) to what you suggest,
> just using nnz
> to preallocate the vector. [1]
The "if" statement is not the only difference between the two implementations
...
* I'd rather not use a ColumnVector to store and array of indices in [1],
Array<octave_idx_type> would be better ...
* And you may use Array<double> for the matrix entries because you don't
need all the overhead from the ColumnVector class.
* For fast access to the Array entries you should get the pointer via the
fortran_vec () method.
* Using the SparseMatrix () constructor from Array<...> rather than
ColumnVector [3] you don't need to increment all indices as it uses 0-base
indexing.
* I'm not quite sure statement [4] is correct (of course apart from the double
semicolon ...)
what is the idea behind the choice of setting the size to (nr * nz) / (i + 1)?
* You should remove all the verbose debug outputs like [5][6]...
if you really need to write something to screan you should pass it through
the pager.
c.
[1]
http://sourceforge.net/p/octave/fem-fenics/ci/default/tree/src/assemble.cc#l108
[2]
http://sourceforge.net/p/octave/fem-fenics/ci/default/tree/src/assemble.cc#l124
[3]
http://sourceforge.net/p/octave/fem-fenics/ci/default/tree/src/assemble.cc#l136
[4]
http://sourceforge.net/p/octave/fem-fenics/ci/default/tree/src/assemble.cc#l116
[5]
http://sourceforge.net/p/octave/fem-fenics/ci/default/tree/src/assemble.cc#l192
[6]
http://sourceforge.net/p/octave/fem-fenics/ci/default/tree/src/assemble.cc#l211
- Project progress, marco Vassallo, 2013/10/05
- Re: Project progress, c., 2013/10/05
- RE: Project progress, marco Vassallo, 2013/10/06
- Re: Project progress,
c. <=
- RE: Project progress, marco Vassallo, 2013/10/06
- RE: Project progress, marco Vassallo, 2013/10/06
- Re: Project progress, c., 2013/10/06
- RE: Project progress, marco Vassallo, 2013/10/06
- Re: Project progress, c., 2013/10/07