Set entries of a Dolfin matrix object
Asked by
Alejandro Ortiz-Bernardin
Hello everyone,
I just started to explore Dolfin capabilities. I am reading the Fenics book to this end. I am really impressed about Fenics project in general. For now, I would like to use the solver function, which looks quite simple. For this a matrix object is needed. I am interested in the C++ version. Say, the following is the matrix:
A= [ 1 4 7 4;
4 2 6 8;
7 6 4 2;
4 8 2 6]
How can I set all these entries in a matrix object? Can somebody provide a small C++ code example for this?
Also, it seems Dolfin only works with sparse matrices. Is there any way to work with a dense matrix like A previously defined?
I would appreciate your reply.
Thanks,
Alejandro.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Johan Hake
- Solved:
- Last query:
- Last reply:
To post a message you must log in.