fdrmrc / Polydeal

C++ implementation of Polygonal Discontinuous Galerkin method within the deal.II Finite Element library.
https://fdrmrc.github.io/Polydeal/
Other
0 stars 0 forks source link

Fix connectivity #44

Closed fdrmrc closed 1 year ago

fdrmrc commented 1 year ago

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

fdrmrc commented 1 year ago

$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 commented 1 year ago

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

luca-heltai commented 1 year ago

And one for chi(x-.5)

fdrmrc commented 1 year ago

Included in https://github.com/fdrmrc/AggloDeal/pull/44/commits/c9acdd69c9c7f62ccc71780fbb46a416810fb274:

// 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 commented 1 year ago

Perfect. :)

fdrmrc commented 1 year ago

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