29 Jun
                
                    2015
                
            
            
                29 Jun
                
                '15
                
            
            
            
        
    
                7:58 p.m.
            
        I don't *think* so (I might be wrong -- Martin?), but what about .dx(0).dx(0)? On 29 June 2015 at 19:54, Jacobs, Christian T <c.jacobs10@imperial.ac.uk> wrote:
I'm trying to express the following in UFL: http://amcg.ese.ic.ac.uk/~ctj10/images/k.png where A and B are matrices and u is a vector of solution variables.
For the case of k=1 I can write e.g.
-1*([1*u[0].dx(0) + 2*u[1].dx(0) + 5*u[0].dx(1) + 6*u[1].dx(1), 3*u[0].dx(0) + 4*u[1].dx(0) + 7*u[0].dx(1) + 8*u[0].dx(0)])
But how can I write this for k>1? Having e.g. (1*u[0].dx(0) + 2*u[0].dx(1) + ...)**2 will result in terms that represent (du/dx)**2 not (d**2)u/(dx**2). Is there a way of expressing .dx() (of arbitrary order) without an operand in UFL, so we can just have d^k/dx^k ?