Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Extract Inner-Product-Matrices to Matlab?

Please login with a confirmed email address before reporting spam

Hello to all!

Does anyone know, how to access the inner product matrices in Comsol 4.2a in Matlab?

I would like to compute different norms of a solution u.
The Euclidian norm simply is: u' * u
If I want the L2 norm, I have to calculate u' * L2 * u
or for the H1 norm: u' * H1 * u
with the inner-product-matrices L2 or H1.

But how do I extract these inner-product-matrices L2 or H1 from Comsol? I think the L2-inner-product-matrix should be:
L2 = mphmatrix(model,'sol1','Out', 'D')
Right?

But how can I get the H1-inner-product- matrix?

Thank you very much
Oli

1 Reply Last Post 25 set 2012, 05:08 GMT-4
Nils Malm COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 25 set 2012, 05:08 GMT-4
Hi Oli,
The H1 inner product matrix is essentially the same as the "K" matrix for a Coefficient form PDE with c=a=1, remaining coefficients equal to zero, assembled using the mphmatrix command.

best regards
Nils Malm
COMSOL AB
Hi Oli, The H1 inner product matrix is essentially the same as the "K" matrix for a Coefficient form PDE with c=a=1, remaining coefficients equal to zero, assembled using the mphmatrix command. best regards Nils Malm COMSOL AB

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.