Open honglin-c opened 4 years ago
@chl9797 Can you clarify if this stiffness function should also be included in the forward euler, RK4, and symplectic euler or not? I only see it in the backward euler function.
@lalitlal stiffness
function is only needed for the backward Euler function.
Why are we not allowed to use stiffness... just to torture us?
@chl9797 do we really need to use stiffness in the backward Euler function? I got the same output without using the stiffness function.
@s99090 Yes, I think you'll need stiffness
in backward Euler.
Can't we just obtain the stiffness from force?
@Haotian-Yang Exactly. That's probably the easiest way to do Runge Kutta, but probably not the way the prof wants us to do XD Feels like cheat
@lvlingxiao1 Well, I think it is valid to do. Since we are given a function that computes the force, which basically tells the stiffness(the stiffness already been placed in the lambda expression as a parameter). Otherwise, they shouldn't provide the force function, if they don't want us to use the stiffness. I'm just curious on the what is the purpose of the stiffness function in backward Euler, as we are given the force function already.
@Haotian-Yang let's see what the TAs say. Those two functions provide basically the same information. I have submitted my assignment anyway, so I don't really care now lol
@Haotian-Yang Yes, you can obtain the stiffness from the force, but we just want you to implement the stiffness
function to check your understanding of the stiffness (and use it in the backward Euler if you like, or if possible). :)
Sorry that the function handle
force
andstiffness
should take 3 variables as input instead: