Code structure #109
mark-hobbs
started this conversation in
Ideas
Replies: 1 comment
-
I agree with this! Separation of Concerns all ways good, separating model description / setup with the process of solving it sounds right. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Should there be a new class - simulate? It seems odd to me that the integrator is an input parameter for the model class. These feel like separate concepts to me. Build the input file (model) -> simulate (integrator) -> post-processing.
I am trying to write a new integrator class that used Numba, however, I am having difficulties structuring the code within the constraints of the current classes and tests. For example, an efficient implementation on the CPU requires a bond list of size (nbonds, 2). This is significantly more efficient than a connectivity matrix of size (nnodes, max_family_size). It isn't possible to build the bond list in the integrator class because this would require the connectivity matrix (which hasn't been built yet). I could build the bond list in the model class but this will require rewriting existing tests (probably what I will have to do).
This is a longer term project that needs discussion to determine the optimal code structure. My preferred option would be to have a very clear distinction between building input files and simulations.
Beta Was this translation helpful? Give feedback.
All reactions