dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #08179
unit vectors in FFC?
Hi all,
is there a simple way to implement a known constant vector (e.g.
the unit vector jhat = [ 0 1]') into a FFC form?
my specific issue is that the right hand side of my PDE looks like
-\Div f\jhat = - df/dy
where f(x,y) is a user defined scalar function (and df/dy is not
easily evaluated)
Given a test function v, the weak form (in pseudo-latex) is
\int dv/dy f dx - \int v f \jhat\dot ds
The question is how to evaluate the 2nd term in the FFC form language
(the volume integral works fine as v.dx(1)*f*dx)
ideally something like
jhat=??
L = v.dx(1)*f*dx) - v*f*jhat*ds
(or more generally for a known unit vector k L=dot(grad(v),k)*f*dx -
v*f*k*ds )
would be nice (in the same way as simple known constants can be built
in directly)
But I'm flexible...all help greatly appreciated
marc
----------------------------------------------------
Marc Spiegelman
Lamont-Doherty Earth Observatory
Dept. of Applied Physics/Applied Math
Columbia University
http://www.ldeo.columbia.edu/~mspieg
tel: 845 704 2323 (SkypeIn)
----------------------------------------------------
Follow ups