← Back to team overview

ffc team mailing list archive

Re: user defined matrix?

 

On Sat, Nov 08, 2008 at 10:08:11AM -0800, Chong Luo wrote:
> I'm doing a 2D elasticity problem. In my variational formulation, there are a
> lot of adj(A), like grad(n)*adj(grad(v)):grad(n)*adj(grad(w)), where adj(A) is
> the adjoint of the matrix A. That is if A = (a b, c d), then adj(A) = (d -b, -c
> a).

That looks more like an inverse with a missing determinant than an adjoint.

> If I could define adj(A) in the form file, that would be very handy. Is it
> possible to have user define matrix in FFC?

You can define any operators you want in your form file:

def adj(A):
    return [A[0], A[2], A[1]. A[3]]

But note that FFC does not support matrix-valued functions so you'll
have to represent it as a vector.

Matrices (and in general tensors) are supported by the new form
language (UFL) that will be used in FFC in the future.

-- 
Anders

Attachment: signature.asc
Description: Digital signature


Follow ups

References