This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Creating matrices in fenics

0 votes

Hi,
I'm new to fenics.
I was wondering how to go about writing matrices in fenics(i.e 3x3 zero or identity matrix).

asked Jun 1, 2017 by woolyabyss FEniCS Novice (420 points)

1 Answer

+1 vote
 
Best answer
import dolfin as df
zero = df.zero((3,3))
I = df.Identity(3)
answered Jun 1, 2017 by finsberg FEniCS User (2,360 points)
selected Jun 1, 2017 by woolyabyss
...