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

Confusing "parameter flow" for the calculators #57

Open
ceriottm opened this issue Sep 22, 2024 · 4 comments
Open

Confusing "parameter flow" for the calculators #57

ceriottm opened this issue Sep 22, 2024 · 4 comments
Assignees

Comments

@ceriottm
Copy link
Contributor

The calculators use a mix of class parameters and "compute function" parameters to define e.g. the smearing and the calculation accuracy. This is confusing and a bit clunky - it'd be better to streamline the implementation to avoid having to worry too much about (re)setting these values.

@PicoCentauri PicoCentauri self-assigned this Sep 23, 2024
@sirmarcel
Copy link
Contributor

Just to add to this, it's a huge potential foot-gun that various parts of the infrastructure now store the cell/the mesh and need to be kept updated. It may be worth thinking about converting everything into something functionally pure and then implementing caching based on these guarantees -- but I don't know yet how to best do this. I agree that this is a problem that needs to be addressed.

@PicoCentauri
Copy link
Contributor

Not directly the issue but related:

While benchmarking, I found a couple of places that are slowing down the code just because we do multiplication with floats in the code. @sirmarcel already mentioned this but now I really saw it.

On top: In many places we may overcome repeating calculations by adding buffers in the init of each class to compute prefactors.

@ceriottm
Copy link
Contributor Author

ceriottm commented Oct 1, 2024

On top: In many places we may overcome repeating calculations by adding buffers in the init of each class to compute prefactors.

We have to be careful here if the prefactors depend on stuff, e.g. the smearing.

@PicoCentauri
Copy link
Contributor

Good point!

this is why these points are in the correct place inside this issue. We can also update buffers if we have to, but hopefully we can avoid.

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

No branches or pull requests

3 participants