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.

Calculating the Hessian Matrix and Eigen Values

Please login with a confirmed email address before reporting spam

Hello,
I am using the tutorial "Pacemaker Electrode" in COMSOL 4.4, which gives me the voltage field in a 3D volume (cylinder) induced by electrical stimulation.
I figured out how to extract the voltage values in a CSV file, as well as the second spatial derivative in particular directions (d(d(V,x),x)).

Now, I would like to compute the hessian matrix at each point and the maximal eigenvalue of each of these Hessian Matrices, where each point is taken on a uniformly spaced grid. How can I do that?

I was thinking to export 6 different values (d(d(V,x),x),d(d(V,x),y),d(d(V,x),z),d(d(V,y),y),d(d(V,y),z),d(d(V,z),z)) in a file, and then import these values in Matlab, where I can fabricate the Hessian matrix. Then I would calculate the largest eigenvalue of each matrix in Matlab.

Do you have other suggestions to calculate these Hessian Matrices and Eigenvalues directly in COMSOL, or is this the best way to go?

Thank you in advance for your help.

Best,
Julien

1 Reply Last Post 23 giu 2014, 06:51 GMT-4
Sven Friedel COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 23 giu 2014, 06:51 GMT-4
Hi Julien,

there might be better ways of doing that but to give a poroper recommendation I would need to see your model - can you send it?

Sven
Hi Julien, there might be better ways of doing that but to give a poroper recommendation I would need to see your model - can you send it? Sven

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.