-
Notifications
You must be signed in to change notification settings - Fork 4
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
Type declarations of Box #44
Comments
Hello, Indeed, the "Box" type of CellListMap is annoyingly complex:
You either need to parameterize all that in your The creation of a The construction of the In summary:
The
|
An additional comment: I noticed that you are trying to pass all parameters to the Box type here: That looks fine, though (as you have seen above), the set of type parameters is not something that I guarantee to be stable in the interface. In particular, it will not be in the next release (0.7) because I needed to change them to allow automatic differentiation and unit propagation to happen through the code. Thus, before you get a broken code yourself there, I really recommend sticking with the |
Just reinforcing: you shouldn't really care that your |
Oh okay, I see then. Thank you very much for clarifying this. I actually took a lot of inspiration from your FortranCon talk on molecular dynamics, so all of this is greatly appreciated. I still have some other type instabilities, but I'll try to figure those out as I go. Thanks again!
Thanks, I will make sure to make it concrete. |
Hello, thanks a lot for the package. It is really fantastic.
I am currently trying to implement a basic Monte Carlo simulation engine here (https://github.com/edwinb-ai/Metropolis.jl), and I am using
CellListMap.jl
for computing the interactions between particles.However, I am having some trouble when defining a type that contains a field that is of type
Box
. The PR in which I am working is here.Basically, the problem is that I want to define the following type
I then have a constructor that automatically creates the simulation box, which is this one
I am using
Cthulhu.jl
to check for type instabilities, and the one that I get is that the type ofbox
is not concrete, and so there are many allocations happening.I was wondering if you could point me in the right direction of how I should be declaring the types of Box inside other types, such as the one I described above.
The text was updated successfully, but these errors were encountered: