You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""Adjusts physics coupling settings depending on current state of run."""
pass
Typically the placeholder methods on the Interface class are put there as hooks that are called while looping over the interface stack, and so the Interface class just implements a pass and child interfaces can implement their own. But looking through the ARMI codebase, it doesn't appear that this method is ever called. So what is it?
It turns out that this method is intended to be used in a very specific way which is associated with our internal equilibrium plugin. We have an equilibrium interface, and when it is being run we don't always want all of the interfaces to be executed in the normal way. So when the equilibrium interface runs, it calls to this updatePhysicsCouplingControl() method on all of the other interfaces, each of which has the opportunity to modify its behavior for the equilibrium calculation. This is a pretty weird design choice for quite a few reasons.
But aside from the strange design choice, this method name and docstring do not give any indication of what this method is actually used for. I have the following suggestions, in order of increasing complexity:
At the least, the docstring on the parent class should be updated to indicate that the method is called from within the equilibrium plugin.
In addition to updating the docstring, the method name should be updated to make it obvious what the method is intended to be used for. Maybe something like updatePhysicsCouplingControlForEquilibrium()?
It would make a lot of sense to move the calling of the method from within our internal equilibrium interface onto the operator in ARMI. Wrap it in something like if self.cs["runType"] == operators.RunTypes.EQUILIBRIUM
The text was updated successfully, but these errors were encountered:
The
Interface
class has a placeholder for a method calledupdatePhysicsCouplingControl()
:armi/armi/interfaces.py
Lines 648 to 650 in d0092e8
Typically the placeholder methods on the
Interface
class are put there as hooks that are called while looping over the interface stack, and so theInterface
class just implements apass
and child interfaces can implement their own. But looking through the ARMI codebase, it doesn't appear that this method is ever called. So what is it?It turns out that this method is intended to be used in a very specific way which is associated with our internal equilibrium plugin. We have an equilibrium interface, and when it is being run we don't always want all of the interfaces to be executed in the normal way. So when the equilibrium interface runs, it calls to this
updatePhysicsCouplingControl()
method on all of the other interfaces, each of which has the opportunity to modify its behavior for the equilibrium calculation. This is a pretty weird design choice for quite a few reasons.But aside from the strange design choice, this method name and docstring do not give any indication of what this method is actually used for. I have the following suggestions, in order of increasing complexity:
updatePhysicsCouplingControlForEquilibrium()
?if self.cs["runType"] == operators.RunTypes.EQUILIBRIUM
The text was updated successfully, but these errors were encountered: