luiswirth / formoniq

Rust Implementation of Finite Element Exterior Calculus on Coordinate-Free Simplicial Complexes
4 stars 0 forks source link

solve poisson in arbitrary dimensions #11

Closed luiswirth closed 2 months ago

luiswirth commented 3 months ago

I should convert the poisson{1d,2d} examples into a poisson example that is generic over the dimension.

luiswirth commented 3 months ago

In commit 3f2549bdf2d6abc6b4dd4d2fb763c44578704f73 this was done. Unfortunatly in dimensions higher than 1D the convergence rate is terrible. Not clear why.

luiswirth commented 3 months ago

2024-07-02T194236 Here we can see that we converge to the wrong solution. It looks like at x=1 a wrong boundary condition is being enforced.

luiswirth commented 3 months ago

As suspected there was a bug in the boundary condition enforcement. It is now fixed.

The 2D solution now correctly converges with order 2 in L2 norm as predicted by theory. 🥳

2024-07-02T200433

luiswirth commented 3 months ago

convergence in 3D is however still terrible... Unclear why.

----------------------------------------------
|  k | nsubdivisions |     error | conv_rate |
----------------------------------------------
|  0 |             1 |   0.000e0 |       inf |
|  1 |             2 |  4.078e-6 |      -inf |
|  2 |             4 |  3.781e-1 |    -16.50 |
|  3 |             8 |  3.231e-1 |      0.23 |
|  4 |            16 |  2.966e-1 |      0.12 |
|  5 |            32 |  2.776e-1 |      0.10 |
----------------------------------------------
luiswirth commented 3 months ago

2024-07-03T133325 Beginning at 3 subdivisions the solution in 3D is completly spurious.

luiswirth commented 2 months ago

closed in favor of #28