loganoz / horses3d

HORSES3D: A high-order discontinuous Galerkin solver for flow simulations and multi-physics applications
https://loganoz.github.io/horses3d/
MIT License
112 stars 24 forks source link

Add GMM sensor and sensor output to hsol files #110

Closed Andres-MG closed 1 year ago

Andres-MG commented 1 year ago

I have added k-means and a modified GMM clustering algorithm to the code. I use the GMM in one of the shock-capturing sensors, so that can also be used as an example if someone wants to use clustering in other parts of the code. The GMM sensor is still under some testing and I might have to do another pull request in the future with more changes even if it seems to work now.

I have also added a new field in the output .hsol files to save the sensor values. I used a similar approach to the one used for the gradients to keep backward compatibility; however, I do not think that this will scale well and we should find other alternatives if we want to add more fields to the file.

Andres-MG commented 1 year ago

The tests were not passing because ifort seems to handle associate constructs inside OpenMP loops differently. This pull request now tries to address this (at least for shock-capturing sensors).