← Back to team overview

dolfin team mailing list archive

Re: [Question #102501]: Best way to specify coefficient fields

 

Question #102501 on DOLFIN changed:
https://answers.launchpad.net/dolfin/+question/102501

    Status: Answered => Solved

Chris Richardson confirmed that the question is solved:
OK, so I can use something like this for a scalar field defined on the
nodes:

V = FunctionSpace(mesh, "CG", 1)
# create an initial condition for C
initC = Expression("0.5*tanh((x[1]-1)*20)+1.5")
C = project(initC,V)

and presumably, the same will work with Vector and Tensor
Functionspaces...

Now, I might have some other questions, but I think this is solved for
me...

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



References