-
Notifications
You must be signed in to change notification settings - Fork 89
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
base: develop
Are you sure you want to change the base?
Conversation
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.
philosophical question about whether we want to embed the operations in FieldSpecification
or rely on a function.
registerWrapper( viewKeyStruct::isScalingString(), &m_isScaling ). | ||
setApplyDefaultValue( 0 ). | ||
setInputFlag( InputFlags::OPTIONAL ). | ||
setDescription( "Boundary condition is a multiplicative scaling of the values already present." ); | ||
|
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.
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?
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.
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)
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.
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.
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 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.
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.
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?
…s for internal mesh
…S-DEV/GEOS into feature/aronson/inputScaling
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.