SPEC icon indicating copy to clipboard operation
SPEC copied to clipboard

Question about matrix free method

Open abaillod opened this issue 3 years ago • 2 comments

Hi,

I am trying to understand what is going on in mtrxhs.f90, and how it is used to evaluate the derivatives of the field w.r.t the geometry degrees of freedom.

@zhisong , would you have a document that explains what is implemented in this part of the code? To me it seems that you evaluate the derivative of the matrix dMA multiplied to the solution array that contains the magnetic field vector potential harmonics. Is this correct?

https://github.com/PrincetonUniversity/SPEC/blob/924bcab37302024b839110e4a50991febef50bb4/src/mtrxhs.f90#L88-L136

I would like to implement something similar for the new freeboundary version implemented by Stuart - I already implemented the derivatives of the new matrix dMA in the vacuum region, but I don't know how to use these with the matrix free approach.

abaillod avatar Aug 18 '22 13:08 abaillod

Hi,

I am trying to understand what is going on in mtrxhs.f90, and how it is used to evaluate the derivatives of the field w.r.t the geometry degrees of freedom.

@zhisong , would you have a document that explains what is implemented in this part of the code? To me it seems that you evaluate the derivative of the matrix dMA multiplied to the solution array that contains the magnetic field vector potential harmonics. Is this correct?

https://github.com/PrincetonUniversity/SPEC/blob/924bcab37302024b839110e4a50991febef50bb4/src/mtrxhs.f90#L88-L136

I would like to implement something similar for the new freeboundary version implemented by Stuart - I already implemented the derivatives of the new matrix dMA in the vacuum region, but I don't know how to use these with the matrix free approach.

Yes, it is correct. I should have written some documents for that. But it is basically just computing (15)-(22) of the following page https://princetonuniversity.github.io/SPEC/group__grp__build__matrices.html#ga1c52bb6dbffdb432550aae12b096080f

If you like we can have a face-to-face discussion on Zoom. Currently, I am quite fed up with teaching. The week after next week will be a break so we can do it then.

zhisong avatar Aug 27 '22 11:08 zhisong

Hi Zhisong,

I watched the recording of your SPECtacular talk on December, 10th 2019, and got a general understanding of what you implemented. I still struggle however to see how this can be applied to the new free-boundary approach from Stuart.

I think a zoom meeting between you, @SRHudson, and I would be helpful. Unfortunately, I am on vacation from the 5th till the 23rd of September. It is either this week or we will have to postpone it to the end of September. Let me know what suits you best!

abaillod avatar Aug 29 '22 07:08 abaillod