-
Notifications
You must be signed in to change notification settings - Fork 65
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
Verify method for blueprint nestset #285
Conversation
@nselliott: Thank you for adding this! After looking over your changes and thinking a bit more about the structure of the |
@nselliott: I apologize for taking longer than anticipated to respond, but I was able to talk with @cyrush about this yesterday and here's a revised version of
The main motivation for all of these adjustments was to make each individual |
@xjrc @cyrush @nselliott A few questions:
|
This is describing something equivalent to overlap relationships between patches on different levels in SAMRAI. For the "relation" entry, a "parent" is a coarser domain/patch and a "child" is a finer domain/patch. The "relation_id" is a global integer identifier, unique on the hierarchy, of the parent or child domain. I would like different names for relation and relation_id, but I need to think about it.
Under normal circumstances a user would choose one centering or the other and use that always. The "association" entry just identifies which centering is being described by the i-j-k index space in this particular instance. I would expect SAMRAI-based hierarchies to always use the element association, as that maps directly to SAMRAI's data structures, but some other code could have a SAMR hierarchy that defines its index spaces with a node/vertex centering.
This particular addition to the blueprint concerns only coarse-fine overlap/nesting relationships within a block. I'm not sure if the blueprint already has a way to define multiblock boundaries, but it's outside the scope what the nestsets are intended to describe. |
Thanks @nselliott for the explanations. I'm curious what you folks come up with for the multiblock connectivity relationships because different codes use different conventions. |
@nselliott @xjrc, how about @rhornung67 for domain abutment of unstructured meshes, we have something modeled on mfem's solution for how they describe communication surfaces. @bryujin and I have long had an idea for how to do structured mesh. |
Here's a slightly revised version of the schema with improved names for
By changing the overlap relationship keys to have Also, one other thing: it occurs to me that items in |
@xjrc I like the change to You are right we were able to have less info in |
@xjrc would it be better (i.e., more descriptive) to change 'local' to 'local_idx' and 'remote' to 'remote_idx' for the index ranges? |
@rhornung67: That's a good idea, but I think if we're going to make those identifiers more descriptive we should go all the way (e.g. |
@xjrc whatever you guys decide is fine with me. Overall, I think that using descriptive names is preferable to relying on documentation. |
Another suggestion for your consideration, along the lines of @rhornung67's name suggestion: |
Having the remote info is just used to identify which of the unique relationships this is. (You can have multiple relationships between two domains) for adjsets, I believe the order of entries in the list matches across domains -- so we didn't need info to match them up. I think that will be harder to do here. Even if we can't use the order, we could impose an id for the relationship. Not sure if thats better than just including the extents |
I like: |
The remote extents can be computed by taking the local extents, multplying or dividing by the ratio, and making an adjustment if using the vertex association. If it's better to compute it on the fly rather than storing it here, we can do that. |
@nselliott That's exactly the conversation I was having with @cyrush earlier too |
@nselliott, then that solves it -- we don't need the remote extents |
Integrating @gzagaris's and @nselliott's feedback, here's the new
|
I am backtracking on What about: |
That's a good point Cyrus; I was actually getting the concepts a bit confused while thinking about it. I've created another revision with the following changes:
|
Perhaps another name for this would be Another consideration is that the Alternatively, you could add some additional metadata attributes, for example, |
@gzagaris thanks for the input. We are already using I also believe the state will also have an optional |
sounds good @cyrush, thanks. |
1 similar comment
sounds good @cyrush, thanks. |
Here is a very basic example, likely some errors b/c I hand typed it, please pick apart :-)
|
I do think using I also think we should consider the same for extents, b/c when its simply an array, I always have to detangle:
vs
We would of course pick one, but the point its not apparent from how the data is described. |
There will not be one window per nestset. @nselliott @gzagaris a named nestset actually represents a complete group of nesting info -- for example all of the local amr relationships for a given topology. |
to clarify: within a named nestset, there will be as many windows as there are parent / child relationships for a given domain. |
That's different from how I have understood this from the beginning, but we can roll with that. Given that, I like @gzagaris suggestion in his most recent post to have "nestsets" hold up to two nestsets, one for the parent relationships and one for the child relationships. We can identify which is which either via a "type" label or a level number as shown in George's post. The rule would be that all windows within a nestset represent only parents or only children. |
@cyrush , yes, I agree, you can have multiple "windows". So, if you put both child & parent domains within the same named nestset, you cannot hoist up the Unless, perhaps if you do something like that:
|
@gzagaris: That's close to what I was thinking, but I don't even think the separation of parent/child relationships is necessary. In particular, what I was suggesting was to store
If a client is going to inspect the |
the info we need is the level of the remote, so level will need to be part of each window spec, not hoisted, unless we group like George suggests. I think replacing "type" with "level", for each window may work. |
@xjrc , I think you need something like |
@gzagaris, I think there is limited value to hoisting things that potentially do vary a the window level (such as the level and the ratios) If its even possible they could vary there -- to process the info you would have to always look in two places just to be sure. |
I'm working on an implementation inside SAMRAI to output all of this stuff, but I think we still need to nail down a consensus for the format. The main thing I see yet to be determined is how to identify the parent/child relationships. The ideas I see are:
Any of these I could implement without much trouble, so it's a matter of coming to a conclusion on what the group wants. |
@nselliott As for the first: "parent": domain_id Hopefully changing small details won't be too hard once you have worked out the bigger details. |
* Made some minor improvements to the automated structured AMR schema generation code.
@nselliott: Could you give me permission to push to this branch on your repository? I have an update that includes fixes and a complete set of test cases. Once I've pushed these changes, I think we're only a minor adjustment or two away from this being finalized. EDIT: Disregard the above request; it turns out the permissions problem was related to me pushing to the wrong branch. |
@xjrc Thanks. Everyone feel free to make useful changes. |
…blems when setting an existing object/list node to a scalar type.
…tor to simplify code.
@xjrc @nselliott , I think we have converged on this & this PR is ready. @xjrc, it looks like there is a small conflict, can you resolve that and then we can merge? |
@cyrush: Done; merge will be ready assuming all continuous integration checks pass. |
thanks @xjrc ! |
Thanks! |
This adds a verify method for nestsets to describe the nesting of AMR domains as proposed in issue #255