dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #20840
[Question #142116]: writing a tensor
New question #142116 on DOLFIN:
https://answers.launchpad.net/dolfin/+question/142116
Hi.
I want to write a tensor F_ij, where i,j=0,1,2
Can you give me a hand?
So not working code is
-------------------------------------------------------------
V = VectorFunctionSpace(sphere, "CG", 1)
v = TestFunction(V)
ID = Identity(v.cell().d) # Identity tensor
F= 0*ID #initializing
F[0][0] = 1
F[1][1] = 2
F[2][2] = 3
-------------------------------------------------------------
--
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.