-
Notifications
You must be signed in to change notification settings - Fork 15
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
Generalization to 3D #96
Conversation
bulk_ghost_penalty_canvas.jl
Outdated
end | ||
end | ||
bounds = [(xmin[i], xmax[i]) for i in 1:D] | ||
point_iterator = Iterators.product([bounds[i] for i in 1:D]...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't you just use here Iterators.product(bounds...)
?
bulk_ghost_penalty_canvas.jl
Outdated
bounds = [(xmin[i], xmax[i]) for i in 1:D] | ||
point_iterator = Iterators.product([bounds[i] for i in 1:D]...) | ||
bounding_box_node_coords[bounding_box_node_ids[agg]] = | ||
reduce(vcat,[Point(p...) for p in point_iterator]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a less memory hungry version of
reduce(vcat,[Point(p...) for p in point_iterator])
would be to use
reshape([Point(p...) for p in point_iterator],2^D)
Again ... not a big deal ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @amboschman ... great work! Just minor comments for improvement (mainly so that we also get familiarized with the workflow).
implemented suggested changes (by Alberto on Generalization to 3D #96)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Selection of polytope type (lines 105-109) is now done via a conditional statement: is there a more elegant way to do this?