Export the spmatrix as scipy sparse matrix for scheme.assemble
Make it possible to extract dof vectors and assembled matrices for different backends (fem,eigen,istl,petsc)
- added a method
to the discrete function (
as_numpyfor eigen/fem,
as_istlfor istl and
as_petscfor
petsc` -
scheme.assemble
returns a scipy crs matrix for eigen/fem, an istl bcrs or a petsc matrix depending on backend used
To do: at the moment there is a method space.numpyFunction
to generate a discrete function from a given numpy
array. We need something similar for BVectors
and Petsc::Vec
storages. Possibly:
space.discreteFunction(vector,name)
and the correct version is used depending on the type of vector
. Alternative, the vector
has to match the storage provided by the space
.
Edited by Andreas Dedner