I’m working on a SUPG-stabilised finite element solver in the FEniCSx library. Many solvers, including fund3D, Coffe …, use a very specific SUPG term and I would like to implement :
in many paper we can read “The inverse of the stabilization matrix is evaluated at each Gaussian quadrature point for volume integrations and [τ ] is then obtained by means of local matrix inversion”
My question is: how do I implement this term in FenicsX/UFL? It seems that `ufl.inv` won’t work for a 6×6 matrix ? I have no problem with the terms, but i have no idea for the inversion of the matrix. In fact, I think this term should also be taken into account in the differentiation of the Jacobian.
Thank you for your time; I’ll take all your suggestions on board!
@ruhsnay, you need to be careful with wrapping tensors with external operators, especially when you are going to compute the derivative with respect to them. If you wrap a 6x6 tensor with FEMExternalOperator, it will generate a quadrature space and FE coefficient of the size 6x6x(num of dofs of the quadrature space). If you take a derivative with respect to an operand, the library will generate a new quadrature space and a coefficient of the same size multiplied by the mathematical size of the operand. It’s a lot of RAM. Instead of wrapping the tensor itself, it’s better to represent its contraction with a vector (I assume that in your variational formulation, your [\tau] is multiplied by smth).