dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #22508
[Question #152076]: Initial Concition for vector valued function
New question #152076 on DOLFIN:
https://answers.launchpad.net/dolfin/+question/152076
I've got a Trial Function in VectorFunctionSpace and I'd like to
define an initial value for this function.
My function is defined as follows:
class InitialConditions(Expression):
def __init__(self):
values[0] = 0.02
values[1] = 0.02
def eval(self, values, x):
values[0] = 0.02
values[1] = 0.02
def value_shape(self):
return (2,)
V = VectorFunctionSpace(mesh, "CG", 2)
u = TrialFunction(V)
u_init = InitialConditions()
u.interpolate(u_init)
I adopted this from the Cahn-Hilliard example, but I don't understand how I can
adapt it for vector valued functions.
Please can you help me?! Thanks!
--
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.
Follow ups