-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mechanics invariants and B-matrices #1359
Mechanics invariants and B-matrices #1359
Conversation
19c9c2c
to
26c946c
Compare
@@ -48,7 +48,7 @@ Eigen::Matrix<double, KelvinToTensorSize<1>::value, | |||
kelvinToTensor(KelvinVector<1> const& v) | |||
{ | |||
Eigen::Matrix<double, 1, 1> m; | |||
m << v[0]; | |||
m.coeffRef(0,0) = v[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe m(0,0) = v[0]
, or something like Eigen::Matrix<double, 1, 1> m = Eigen::Matrix<double, 1, 1>::Constant(v[0])
?
Eigen::Matrix<double, 3, 3> kelvinToTensor(KelvinVector<4> const& v) | ||
{ | ||
Eigen::Matrix<double, 3, 3> m; | ||
// The z-component is ignored, otherwise the matrix must be 3x3. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the comment correct? ✅
Only minor additional comments from my side. Basically:
Afterwards 👍 |
Eigen::Matrix<double, KelvinVectorSize, KelvinVectorSize> P_dev = | ||
Eigen::Matrix<double, KelvinVectorSize, KelvinVectorSize>::Identity(); | ||
|
||
P_dev.template topLeftCorner<3, 3>() -= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unsure: noalias() may influence optimization
looks good, besides minor comments |
Jenkins: OGS-6/Gui/Gui-Linux-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Gui/job/Gui-Linux-PRs/2630/ |
Can I rebase and merge, or is there more review to be expected? The only test failing (again) is
|
I'm fine with this PR. ⏩ |
c8d6c19
to
970318c
Compare
Jenkins, test this please! |
b8d5fb6
to
2988a25
Compare
2988a25
to
fbedd5f
Compare
fbedd5f
to
8da08ee
Compare
It could happen that the error margins in the unit tests are too tight. In that case I'll increase the tolerance a little. |
OpenGeoSys development has been moved to GitLab. |
This is part of the mechanics PR #1340.
Includes:
For the tests the error bounds were eyeballed from a gnuplot graphics showing the error vs. input vector norm. Tried to make them as tight as possible. It might happen that they will need to be increased a little bit... we'll see.
Aside from the failing compiler (of the test code) this is ready for review.
Todo: