-
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
[HM] enable mass lumping #2826
[HM] enable mass lumping #2826
Conversation
Do the ctests give different results when mass-lumping is used? |
@endJunction Yes, all tests passed |
for (int idx_ml = 0; idx_ml < storage_p.cols(); idx_ml++) | ||
{ | ||
double const mass_lump_val = storage_p.col(idx_ml).sum(); | ||
storage_p.col(idx_ml).setZero(); | ||
storage_p(idx_ml, idx_ml) = mass_lump_val; | ||
} |
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.
No need for the for-loop. It is included in Eigen through the colwise()
operator. See RM-FEM.
storage_p = storage_p.colwise().sum().eval().asDiagonal();
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.
You're absolutely right. I updated the code.
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.
Failing tests seems not to be changes related. Looks good. ⏩
OpenGeoSys development has been moved to GitLab. |
Gives the option to use mass lumping in HM which can help with oscillation problems