Skip to content
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

Merged
merged 1 commit into from
Mar 2, 2020
Merged

[HM] enable mass lumping #2826

merged 1 commit into from
Mar 2, 2020

Conversation

FZill
Copy link
Contributor

@FZill FZill commented Feb 28, 2020

Gives the option to use mass lumping in HM which can help with oscillation problems

  1. Feature description was added to the changelog

@endJunction
Copy link
Member

Do the ctests give different results when mass-lumping is used?

@FZill
Copy link
Contributor Author

FZill commented Feb 28, 2020

@endJunction Yes, all tests passed

Comment on lines 308 to 313
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;
}
Copy link
Member

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();

Copy link
Contributor Author

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.

Copy link
Member

@TomFischer TomFischer left a 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. ⏩

@TomFischer TomFischer merged commit 09c4664 into ufz:master Mar 2, 2020
@FZill FZill deleted the HM_Mass_Lumping branch March 2, 2020 10:09
@ogsbot
Copy link
Member

ogsbot commented Jun 19, 2020

OpenGeoSys development has been moved to GitLab.

See this pull request on GitLab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants