Question about mcc_rma_implicit_sinh_onevar.hpp #12
-
|
What does it mean this part of the code? Could not be simplified like " dp0_depv = 0.5 *p0_min;" in the second part? if (p0_helper > p0_min){ |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
Hi @GaglianoLuca, thanks a lot for your question. I believe you are right, I think it was originally written like this for symmetry. The point of this part of the code is essentially to improve the convergence of the Newton-Raphson scheme as we are dealing with a non-smooth hardening law p0 = max( , Ksinh(-xiepv + asinh(p00/K))). Maybe the original author @vertobi would like to add to this explanation? |
Beta Was this translation helpful? Give feedback.
-
|
Hi @GaglianoLuca, you're right that these two lines of the code can be simplified. We could update it to: if (p0_helper > p0_min) { Thanks for catching this. As @larsblatny mentioned, this section was likely to help ensure dp0_depv is updating correctly, but I just directly translated what I had written on paper to code without taking a second look to simplify it at the time. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks a lot for clarifying, @vertobi ! |
Beta Was this translation helpful? Give feedback.
Hi @GaglianoLuca, you're right that these two lines of the code can be simplified. We could update it to:
if (p0_helper > p0_min) {
dp0_depv = dp0_depv_helper - 0.5 * p0_min;
} else {
dp0_depv = 0.5 * p0_min;
}
Thanks for catching this. As @larsblatny mentioned, this section was likely to help ensure dp0_depv is updating correctly, but I just directly translated what I had written on paper to code without taking a second look to simplify it at the time.