← Back to team overview

dolfin team mailing list archive

[Question #142110]: defining a varying 2nd order tensor

 

New question #142110 on DOLFIN:
https://answers.launchpad.net/dolfin/+question/142110

Hi.
I want to define a 2nd order 3X3 tensor.
I guess that 'project' function is needed.


my current code is 

D = TensorConstant(tetrahedron)
#I want to define D = as_matrix( [ [D0,0,0], [0,D1,0], [0,0,D2] ] )
D.D0 = Expression(10e-18*(1+10/(1+exp(-20*(u1-0.5)))) ) # where u1 is a scalar field
D.D1 = Expression(10e-15*(1+10/(1+exp(-20*(u1-0.5)))) )
D.D2 = 0

-- 
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.