moose icon indicating copy to clipboard operation
moose copied to clipboard

Add a positions object with a parsed selection criterion

Open GiudGiud opened this issue 8 months ago • 12 comments

Thoughts on this?

Seems like it could be useful. But it does not quite do what the user wanted (material properties) here: https://github.com/idaholab/moose/discussions/30765 It's inspired from that need though.

Edit: actually using the auxvariable output of the property, this does work for matprops

name could be ElementParsedSelectionPositions instead since it keeps the element centroid positions or we could add (in the future) an argument to decide the type of loops (nodal, Qps, faces, ...)

GiudGiud avatar Jun 15 '25 13:06 GiudGiud

Job Documentation, step Docs: sync website on cd8f5eb wanted to post the following:

View the site here

This comment will be updated on new commits.

moosebuild avatar Jun 15 '25 16:06 moosebuild

Job Coverage, step Generate coverage on cd8f5eb wanted to post the following:

Framework coverage

98f5d7 #30767 cd8f5e
Total Total +/- New
Rate 85.47% 85.50% +0.03% 91.93%
Hits 114883 114947 +64 148
Misses 19525 19494 -31 13

Diff coverage report

Full coverage report

Modules coverage

Optimization

98f5d7 #30767 cd8f5e
Total Total +/- New
Rate 88.20% 88.19% -0.01% 100.00%
Hits 1966 1956 -10 2
Misses 263 262 -1 0

Diff coverage report

Full coverage report

Full coverage reports

Reports

This comment will be updated on new commits.

moosebuild avatar Jun 15 '25 17:06 moosebuild

git s buggy so replying here

: We already have a quadraturePointPositions btw. We could add an option to this ParsedPositions to be able to down-select from an existing Positions object .

Otherwise it feels a bit like adding code just because we can

Every system ought to have parsed capabilities imo. It's just so much more flexible and helps no-code users of our software.

GiudGiud avatar Jun 17 '25 19:06 GiudGiud

Can we make a helper function somewhere to help reduce the number of times we repeat this pattern? There is certainly some variation throughout these grep match occurrences but maybe the helper function could take arguments that support those variations

seems tough with the number of attributes that may not be shared by all these objects. I ll take a look. I think all these attributes can then just be parameters of the utility, along with a bunch of booleans to enable/disable things

GiudGiud avatar Jun 17 '25 19:06 GiudGiud

Otherwise it feels a bit like adding code just because we can

Every system ought to have parsed capabilities imo. It's just so much more flexible and helps no-code users of our software.

Sure but this is adding a very particular parsed capability type of positions: element centroids. Has a user asked for that particular type of positions?

or we could add (in the future) an argument to decide the type of loops (nodal, Qps, faces, ...)

Why future and not now? Then we would be adding a flexible parsed positions object that potentially addresses an immediate user need

lindsayad avatar Jun 18 '25 18:06 lindsayad

Users need are met outside of moose fairly easily in that thread.

I think my new idea (use this to downselect) is pretty good I'll implement that

GiudGiud avatar Jun 18 '25 19:06 GiudGiud

Sounds good

lindsayad avatar Jun 18 '25 19:06 lindsayad

Not done with addressing the review but the new design is online now if you want to take a look. I think the added generality and capability is worth the new object now

GiudGiud avatar Jun 19 '25 17:06 GiudGiud

Well the testing is failing in parallel because of ghosting issues. Instead of adding my semiverify check that can be avoided by just evaluating for a given element if (elem->processor_id() == this->processor_id()). Then there are no ghosting issues, you only evaluate the function on one rank for a given element, and then logically there is no chance for a disagreement between ranks

lindsayad avatar Jun 20 '25 04:06 lindsayad

Yup that's a good idea. I was thinking we would need algebraic ghosting to always match geometric ghosting otherwise. And the potential for disagreement seals the deal.

I think I should still have code to make the point locator consider multiple elements, in case someone uses this at nodes

GiudGiud avatar Jun 20 '25 10:06 GiudGiud

Testing failure is unrelated

GiudGiud avatar Jun 23 '25 09:06 GiudGiud

Added the sweeps so we dont get surprised

GiudGiud avatar Jun 23 '25 16:06 GiudGiud

Thanks for the review!

GiudGiud avatar Jul 01 '25 01:07 GiudGiud