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

Remove dependence of step-39 on LocalIntegrators. #17016

Merged
merged 6 commits into from
May 18, 2024
Merged

Conversation

bangerth
Copy link
Member

Related to #15604, #16690. The first commit, in essence, inlines the contents of the LocalIntegrators functions into step-39 plus some minor clean-ups. The second commit is just a C++ issue. The third commit fixes the issue in the computation of the IP penalty factor mentioned in #15604.

@bangerth bangerth mentioned this pull request May 14, 2024
@tjhei
Copy link
Member

tjhei commented May 14, 2024

I am not opposed to the change to remove LocalIntegrator usage. I think it would be much cleaner to use FEInterfaceValues here (instead of the difficult to understand on/out/whatever matrices). I thought I implemented this exact problem already, but maybe I misremember.

What do you think? (I can do that change)

@bangerth
Copy link
Member Author

Yes, totally! If you already have such a patch, feel free to post. Otherwise, how about we merge the current one which removes one kind of dependence (on the pre-canned integrators) and you build your patch on that removing the other kind of dependence (on the various other data structures)?

I would like to get this one merged before the release because that allows us to move forward with #15604. Using a better approach to integration can work on a separate time scale if necessary.

@tjhei
Copy link
Member

tjhei commented May 16, 2024

Let's merge this first then.

double penalty1 = deg1sq / dinfo1.cell->extent_in_direction(normal1);
double penalty2 = deg2sq / dinfo2.cell->extent_in_direction(normal2);
if (dinfo1.cell->has_children() && !dinfo2.cell->has_children())
penalty1 *= 2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why this is different from the old code that does an XOR between the two bools. Your version is a easier to understand, though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I find XORs to be exceptionally difficult to read.

The difference is that in the original code, we only always updated penalty1, even if the second cell was refined. In my code here, I update penalty1 above and penalty2 below. It doesn't matter if you're on a uniform mesh, but it matters in general.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, gotcha!

@tjhei tjhei merged commit bd74b20 into dealii:master May 18, 2024
15 of 16 checks passed
@bangerth bangerth deleted the 39 branch May 21, 2024 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants