I was confusing with the notation not distinguishing between S as a
function or as its coefficients. What I'm thinking is to write first the
unknowns S and u using the basis functions (indicated with the name of the
test function belonging to the same space):
S = S_coeff psi_trial
u = u_coeff phi_trial
so that we have:
A = dot(S, grad(phi)) =
= S_coeff (psi_trial, grad(phi)) =
= dot(u, psi) * (psi_trial, grad(phi)) =
= u_coeff * dot(phi_basis, psi) * (basis_psi, grad(phi))
the problem is that the two terms have first to be integrated and then
multiplied. Would that be possible?
Thanks,
Alessio
I don't see how to do this. As I understand, you have two matrices and
you want to compute their product. So you want to compute a sum of
products of integrals. I don't know how to write this as a single
integral (other than as a "double integral" over the square of the
domain).
What is the quantity you want to compute in the end? Can you write it as
a single integral?
/Anders
Alessio Quaglino wrote:
I have a question about matrix multiplication in FFC. Say I want to
measure a certain quantity S in respect to a test function psi belonging
to the same finite space:
S = dot(u, psi) (1)
and then I want to use this measure to assemble the bilinear form where
phi is taken from the same finite space of u:
A = dot(S, grad(phi)) (2)
this is equivalent to assemble the bilinear form (1) obtaining the "m x
n"
matrix S and then the bilinear form (2) obtaining the "n x m" matrix A.
Then what I need is to perform the multiplication A*S getting a "n x n"
matrix. Can I write A in such a way that this is done directly in the
form? Do I have to define a trilinear form?
Thanks,
Alessio Quaglino
_______________________________________________
FFC-dev mailing list
FFC-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/ffc-dev
_______________________________________________
FFC-dev mailing list
FFC-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/ffc-dev