jackhamel16 / MagQuEST

GNU General Public License v2.0
0 stars 0 forks source link

23-Compare explicit against implicit jacobian #10

Open jackhamel16 opened 5 years ago

jackhamel16 commented 5 years ago

The JFNk method uses an implicit jacobian calculation by requiring a function that computes the product of the jacobian and a vector. I want to code up the jacobian explicitly and use that instead. The results should match between the two methods. Issue 21 did this, but given the lapse in time since then, I want to check it again against what is coded up in the development branch. I will create a new branch from development and manually make the changes to do the explicit jacobian. This exercise also doubles as something to refamiliarize me with the code

jackhamel16 commented 5 years ago

Explicit and Implicit methods maintain an error of roughly 1e-5 or lower between the two. They mathc numerically. commit

jackhamel16 commented 5 years ago

I made a mistake previously. When constructing my vector of matvec, I waas never using the explicit jacobain method. I fixed this and now the rror is up to 1e-3 between the two. The saving grace is that the implicit method is 15% faster than the explicit method. for one particle. I am guessing as larger simulations are ran the time saving will become great.