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

Fix connectivity #44

Merged
merged 7 commits into from
Nov 30, 2023
Merged

Fix connectivity #44

merged 7 commits into from
Nov 30, 2023

Conversation

fdrmrc
Copy link
Owner

@fdrmrc fdrmrc commented Nov 27, 2023

Fixes #43
I'll add some sanity checks for jump terms. Additionally, I've tried to clean the code a little bit.

@fdrmrc
Copy link
Owner Author

fdrmrc commented Nov 28, 2023

$v^T A v$, with $v = I_h(f)$, for $f(x,y)=x$, $f(x,y)=x+y$, $f(x,y)=1$ varying the number of subdomains. @luca-heltai

N subdomains: 50
Test with f(x,y)=x:1
Test with f(x,y)=x+y:2
Test with 1: 5.70461e-14
N subdomains: 100
Test with f(x,y)=x:1
Test with f(x,y)=x+y:2
Test with 1: -1.42813e-14
N subdomains: 120
Test with f(x,y)=x:1
Test with f(x,y)=x+y:2
Test with 1: 4.44953e-14

@luca-heltai
Copy link
Collaborator

Benissimo. Can we add a test for |x-.5| with agglomeration on left and right of .5?

@luca-heltai
Copy link
Collaborator

And one for chi(x-.5)

@fdrmrc
Copy link
Owner Author

fdrmrc commented Nov 28, 2023

Included in c9acdd6:

// Agglomerate a 2x2 mesh in the following way:
// |------------|-------------|
// |------------|-------------|
// |---- K0-----|------K1---- |
// |------------|-------------|
// x=0         x=0.5        x=1

StepFunction $f = 0$ in $K_0$, $f=1$ in $K_1$
Vfunction: $f(x,y)=|x-.5|$

Here are the results:

Test with Step function = 2
Test with V function = 1

@luca-heltai
Copy link
Collaborator

Perfect. :)

@fdrmrc
Copy link
Owner Author

fdrmrc commented Nov 30, 2023

Another test, this time with an unstructured mesh generated with gmsh. I'm checking again that jumps terms give no contribution when one plugs a linear function in the weak form. It will fail as I'm using our new Rtree function to build the agglomerated mesh (I should open a PR for the lambda visitor)

Here's the solution with 320 agglomerates (colored by index):
image

@fdrmrc fdrmrc merged commit 144c0c9 into main Nov 30, 2023
1 of 3 checks passed
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.

Bug in connectivity (neighboring faces of agglomerates)
2 participants