leon-vv / Traceon

Electromagnetic solver and electron tracer
https://traceon.org/
GNU Affero General Public License v3.0
3 stars 4 forks source link

Adaptive integration for singular integrals #59

Closed leon-vv closed 1 year ago

leon-vv commented 1 year ago

It seems that even with special methods fixed quadrature does not give the accuracy required for singular integrals with higher order elements in 3D. We should therefore investigate whether adaptive integration can be performant enough to fill the diagonal of the matrix. Initial tests using Scipy quad seem promising. In C we could add the GNU Scientific Library as a dependency [1]

[1] https://www.gnu.org/software/gsl/doc/html/integration.html#qag-adaptive-integration

leon-vv commented 1 year ago

Implement for 3D. It is slow but acceptably slow. Accuracy is beautiful