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

Solidify writableCoupledValue API #22563

Closed
dschwen opened this issue Nov 1, 2022 · 2 comments · Fixed by #23504
Closed

Solidify writableCoupledValue API #22563

dschwen opened this issue Nov 1, 2022 · 2 comments · Fixed by #23504
Labels
T: task An enhancement to the software.

Comments

@dschwen
Copy link
Member

dschwen commented Nov 1, 2022

Reason

External library routines called from UserObjects can potentially produce a lot of data that needs to go into auxiliary variable fields. writableCoupledValue provides a way to write those fields without temporarily storing the data in maps and assigning them through AuxKernels.

Design

A few additional checks will be required to make this a solid API.

  • Only one object should be allowed to get a writable variable reference for a given Variable.
  • Dependency resolution should take this API into account. An object that calls writableCoupledValue should register the variable as a provided quantity, and user objects that request a variable should mark it as a required property. The complication here is that we need to ignore any coupled (aux)variables in user objects that are simply updated through AuxKernels.
  • Ideally we'd check the variable type (elemental/nodal) to match the corresponding userobject type.

Impact

Simplify updating AuxVariables from calculations in UserObjects. Get rid of a lot of boiler plate code and simplify ease of use.

@dschwen dschwen added the T: task An enhancement to the software. label Nov 1, 2022
dschwen added a commit to dschwen/moose that referenced this issue Jan 31, 2023
@dschwen
Copy link
Member Author

dschwen commented Feb 1, 2023

Dependency resolution needs to be figured out here. For that MOOSE relies on InputParameters. Basically we'd need to declare coupled variables a written to in the input parameters if we want the execution order to be resolved such that variables written to by one object are available by the next object that would use them. This is a mess. Right now CoupleableMooseVariableDependencyIntermediateInterface puts all coupled variables into a list of needed objects for dependency resolution, however, variables that are written to are provided and should drive the dependency resolution in the opposite direction.

It's frankly a miracle to me that any of this currently works.

@dschwen
Copy link
Member Author

dschwen commented Feb 1, 2023

Why is coupling var1 and var2 in MultipleUpdateAux not causing the two SelfAux kernels in multi_update_var_test.i to get executed first? (and thus copying the solution into the dofs before MultipleUpdateAux gets a chance to overwrite them?!

dschwen added a commit to dschwen/moose that referenced this issue Feb 21, 2023
dschwen added a commit to dschwen/moose that referenced this issue Feb 21, 2023
dschwen added a commit to dschwen/moose that referenced this issue Feb 21, 2023
dschwen added a commit to dschwen/moose that referenced this issue Feb 21, 2023
dschwen added a commit to dschwen/moose that referenced this issue Feb 21, 2023
dschwen added a commit to dschwen/moose that referenced this issue Feb 21, 2023
dschwen added a commit to dschwen/moose that referenced this issue Feb 21, 2023
dschwen added a commit to dschwen/moose that referenced this issue Feb 21, 2023
dschwen added a commit to dschwen/moose that referenced this issue Feb 21, 2023
dschwen added a commit to dschwen/moose that referenced this issue Feb 22, 2023
dschwen added a commit to dschwen/moose that referenced this issue Feb 22, 2023
dschwen added a commit to dschwen/moose that referenced this issue Feb 22, 2023
dschwen added a commit to dschwen/moose that referenced this issue Feb 22, 2023
dschwen added a commit to dschwen/moose that referenced this issue Feb 22, 2023
dschwen added a commit to dschwen/moose that referenced this issue Feb 22, 2023
dschwen added a commit to dschwen/moose that referenced this issue Feb 22, 2023
dschwen added a commit to dschwen/moose that referenced this issue Feb 22, 2023
dschwen added a commit to dschwen/moose that referenced this issue Feb 22, 2023
dschwen added a commit to dschwen/moose that referenced this issue Feb 22, 2023
dschwen added a commit to dschwen/moose that referenced this issue Feb 22, 2023
dschwen added a commit to dschwen/moose that referenced this issue Feb 22, 2023
dschwen added a commit to dschwen/moose that referenced this issue Feb 22, 2023
dschwen added a commit to dschwen/moose that referenced this issue Feb 22, 2023
dschwen added a commit to dschwen/moose that referenced this issue Feb 24, 2023
dschwen added a commit to dschwen/moose that referenced this issue Feb 24, 2023
dschwen added a commit to dschwen/moose that referenced this issue Feb 24, 2023
dschwen added a commit to dschwen/moose that referenced this issue Feb 27, 2023
dschwen added a commit to dschwen/moose that referenced this issue Feb 28, 2023
dschwen added a commit to dschwen/moose that referenced this issue Feb 28, 2023
dschwen added a commit to dschwen/moose that referenced this issue Feb 28, 2023
dschwen added a commit to dschwen/moose that referenced this issue Mar 2, 2023
dschwen added a commit to dschwen/moose that referenced this issue Mar 2, 2023
dschwen added a commit to dschwen/moose that referenced this issue Mar 2, 2023
dschwen added a commit to dschwen/moose that referenced this issue Mar 2, 2023
dschwen added a commit to dschwen/moose that referenced this issue Mar 2, 2023
dschwen added a commit to dschwen/moose that referenced this issue Mar 2, 2023
dschwen added a commit to dschwen/moose that referenced this issue Mar 2, 2023
dschwen added a commit to dschwen/moose that referenced this issue Mar 2, 2023
dschwen added a commit to dschwen/moose that referenced this issue Mar 2, 2023
dschwen added a commit to dschwen/moose that referenced this issue Mar 2, 2023
dschwen added a commit to dschwen/moose that referenced this issue Mar 2, 2023
dschwen added a commit to dschwen/moose that referenced this issue Mar 2, 2023
dschwen added a commit to dschwen/moose that referenced this issue Mar 2, 2023
dschwen added a commit to dschwen/moose that referenced this issue Mar 8, 2023
dschwen added a commit to dschwen/moose that referenced this issue Mar 8, 2023
dschwen added a commit to dschwen/moose that referenced this issue Mar 8, 2023
dschwen added a commit to dschwen/moose that referenced this issue Mar 8, 2023
dschwen added a commit to dschwen/moose that referenced this issue Mar 8, 2023
dschwen added a commit to dschwen/moose that referenced this issue Mar 8, 2023
dschwen added a commit to dschwen/moose that referenced this issue Mar 8, 2023
dschwen added a commit to dschwen/moose that referenced this issue Mar 8, 2023
dschwen added a commit to dschwen/moose that referenced this issue Mar 8, 2023
dschwen added a commit to dschwen/moose that referenced this issue Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: task An enhancement to the software.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant