← Back to team overview

dolfin team mailing list archive

Re: [Question #156844]: How to initialize a matrix without a dofmap?

 


On 10/05/11 08:35, Kent-Andre Mardal wrote:
> 
> 
> On 10 May 2011 09:27, Garth N. Wells <gnw20@xxxxxxxxx
> <mailto:gnw20@xxxxxxxxx>> wrote:
> 
>     On May 10 2011, Kent-Andre Mardal wrote:
> 
>         New question #156844 on DOLFIN:
>         https://answers.launchpad.net/dolfin/+question/156844
> 
> 
>         How should I initialize a matrix without a dofmap?
> 
> 
>     You can create a Matrix,
> 
>      Matrix A
> 
>     but it must be initialised using a sparsity pattern. Sparse matrices
>     are not properly defined by dimensions only, some backends do not
>     support this, and using dimensions is basically useless in parallel,
> 
>     If you want a dense matrix, or one that does not require a sparsity
>     pattern, you can use a backend that supports this, e.g. uBLASMatrix.
> 
> 
> The matrix is sparse, but I want to do it all by hand :) The reason is
> that I have two different meshes. 
>


Use uBLASMatrix (uBLASSparseMatrix) or MTL4Matrix. They support random
insertion into sparse matrices.

> 
> 
>         It seems that the resize function is taken away. Also the read
>         function is removed.
> 
> 
>     Which 'read' function are you referring to? I don't think that there
>     was ever a GenericMatrix::read function.
> 
>     Garth
> 
> 
> I meant the read from file function. 
>

File io needs major revision.

Garth

> Kent
> 




References