-
Notifications
You must be signed in to change notification settings - Fork 19
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
Organizing boundary conditions #5
Comments
I think this makes sense. The last bullet point would also allow checks on dimensionality of positions/velocities. Not sure it makes sense to do that at the top level since people could conceivably want fat or tall matrices, but would be easy to put into a concrete implementation. |
I think dimensionality of the system is still a well-defined and clear concept irrespective of whether the users want to stack the coordinates as columns or rows of a matrix. |
Oh yeah for sure, sorry, I realize now that was unclear. I just meant it doesn't necessarily make sense to have a check on the shape of the matrices coded in at the top level for that reason. I agree with the general proposal! |
Sorry, but what do you mean by the matrices coded at the top level? (I thought you were talking about a matrix of all the coordinates or a matrix of all the velocities) |
Yeah, that is what I meant. I'm just saying since some people may want (e.g. in 3D) 3 x N or N x 3 (or AoS), we don't need to also impose a check that e.g. the first dimension of the positions array is D or something like that at the level of the abstract dispatches, but that may be something that developers of concrete implementations would want, and having the type parameter |
BC-related comments from @cortner from #23 : re
|
Right now, the boundary conditions are specified as
AbstractVector{BoundaryCondition}
.I suggest we make it
NTuple{D, BoundaryCondition}
(D
is the dimensionality of the system):is a subtype of
NTuple{3, BoundaryCondition}`.Periodic
,DirichletZero
, are singleton types (they don't have any fields). So, if the boundary conditions are specified as for exampleTuple{Periodic,Periodic,DirichletZero}
, you don't actually need to store this tuple, you can directly dispatch on its type.AbstractSystem{D}
, than we enforce that the size of the tuple of boundary conditions equals to the dimensionality of the system.The text was updated successfully, but these errors were encountered: