-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add DAGSet.create classmethod #13
Conversation
Do we also imagine a way to populate these meshsets? What's the utility in generating new meshsets if we don't have a way to populate them with triangles? Or do we imagine that a pydagmc user/developer would have a way to do this and we just want to provide the set manipulation interface? |
Yeah, I hear you @gonuke. It may not seem that useful at first glance. To get a sense of how one could use this, see the following snippet (from a branch of mine for stellarmesh): After a surface is created, the actual triangles are loaded from an STL file that was written by gmsh. |
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 @paulromano - One question about the safety of setting the global_id - but maybe this should be an issue about that setter?
I assume, we just need a rebase to merge this? |
I believe that adding some documentation comments would be very helpful for future improvements to our documentation. I'm willing to review all the code and create a PR to add the necessary documentation support once this is merged. |
@ahnaf-tahmid-chowdhury that would be welcome prior to the initial release. Can I let you know when the time comes? I don't want you to waste your time while we're still changing aspects of the design/API. |
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.
It seems we'll need to re-think the ID setting now that #17 has been merged.
I guess one question here is whether or not it's valid to return a DAGSet
object rather than a dagmc.Volume
or dagmc.Surface
object (as you mentioned in the PR description). Combined with the ID assignment issue, maybe DAGModel.create_volume()/create_surface()
methods are really the way to go.
I would be grateful if you tell me so. Maybe there was a community call planned for this that I might have missed. |
I'll need to refresh my understanding of calling parent class methods, but I think the current design is mostly OK/makes sense. Either way, we'll need some way to do the work that @paulromano adds in I think each derived class can have it's own |
Ah yeah, I was thinking the problem was that we didn't have the right type around to do the internal ID check properly. Moving the ID assignment later in the It still feels a little awkward to me to be passing the
|
See #21 for updates to the |
Co-authored-by: Patrick Shriwise <[email protected]>
Co-authored-by: Patrick Shriwise <[email protected]>
@pshriwise Sorry for the delay on updating this -- hopefully should be good to go now. One thing I noticed while working through this is that there were two |
Thanks @paulromano! And nice catch. It seems we were writing too many tests! *jokes* Also, I'm not sure who's manufacturing this irradiated olive oil, but I'm going to avoid that brand... |
This PR adds a
DAGSet.create
classmethod that can be used to create new volumes/surfaces that functions similar to theGroup.create
classmethod:One thought I had regarding design is that it might be better to have
create
methods on theDAGModel
class instead since the model always has to get passed, so that the above example would look like: