defining a varying 2nd order tensor
Asked by
Sungick Kim
Hi.
I want to define a 2nd order 3X3 tensor.
I guess that 'project' function is needed.
my current code is
Q = FunctionSpace(mesh, "CG", 1)
D = TensorConstant(
#I want to define D = as_matrix( [ [D0,0,0], [0,D1,0], [0,0,D2] ] )
D0 = Expression(
D1 = Expression(
D2 = 0
D = as_matrix( [ [D0,0,0], [0,D1,0], [0,0,D2] ] )
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Sungick Kim
- Solved:
- Last query:
- Last reply:
To post a message you must log in.