Skip to content
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

feat: add way for field specification to scale input data #3471

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

ryar9534
Copy link
Contributor

@ryar9534 ryar9534 commented Dec 2, 2024

This pr adds a way for fieldSpecifications in the xml to multiplicatively scale material data, rather than only set the value. The use case would be when someone wants to run multiple realizations of a problem, which has been requested by Total users. The current implementation works, but is certainly up for discussion.

Copy link
Member

@rrsettgast rrsettgast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

philosophical question about whether we want to embed the operations in FieldSpecification or rely on a function.

Comment on lines +86 to +90
registerWrapper( viewKeyStruct::isScalingString(), &m_isScaling ).
setApplyDefaultValue( 0 ).
setInputFlag( InputFlags::OPTIONAL ).
setDescription( "Boundary condition is a multiplicative scaling of the values already present." );

Copy link
Member

@rrsettgast rrsettgast Dec 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we specify an "operation type" here? So instead of m_isScaling specify something like m_operation. Then we could have some enum operations. Things that come to mind are equals, addition, scaling....also...it just occurred to me that this stuff could be achieved using a function? I would think this is the better place to embed operations on fields?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, when @CusiniM and I were talking we saw that there were a few ways to do it. This just made sense to me as a starting point, so we could all hopefully look at something that works before making a final decision of how to do it. (Of course, I need to make it work first)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I do recall the discussion in Pau on this. I think we were a little bit premature about the approach of just adding a BC multiply option. Using a function to define the operation will be quite nice as we could then use a table function and apply a table based variable scalar multiplier. We could also define a random function for generating a varying scalar that follows some distribution....of course....this might be more than we want to do.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that the table function way is nice, and thats what I recommended. I just dont know how users usually paint properties onto the mesh, and if that is easy to turn into a table. I figured I would give this a shot if it was easy.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use the "functions" and add a "ScalarFunction" so the users don't have to be bothered by specifying a table when they don't need that. What do you think? @CusiniM what do you think?

@ryar9534 ryar9534 self-assigned this Dec 5, 2024
@ryar9534 ryar9534 marked this pull request as ready for review December 6, 2024 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants