how to create a matrix with given entries?
Asked by
Doug Arnold
This seems like a simple question, but I'm stuck. Suppose I want to create
a dolfin Matrix object (with the default PETSc backend), with a given array.
E.g., suppose I want a matrix object M so that M.array() returns
array([[ 0., 0.],
[ 7., 0.]])
or so that M.array() is equal to some other numpy array I have created.
Can someone supply the python code?
Thanks -- Doug
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Doug Arnold for more information if necessary.
To post a message you must log in.