On Wed, Jun 11, 2008 at 08:11:56AM -0400, mspieg wrote: > 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
It looks like you expect ds to be a vector. It's not. It's a scalar. -- Anders
signature.asc
Description: Digital signature
_______________________________________________ DOLFIN-dev mailing list [email protected] http://www.fenics.org/mailman/listinfo/dolfin-dev
