idaes-pse icon indicating copy to clipboard operation
idaes-pse copied to clipboard

Fix PETSc scaling and unscaling

Open dallan-keylogic opened this issue 1 year ago • 0 comments
trafficstars

Presently, PETSc ignores the active attribute of scaling suffixes and scales/unscales the corresponding blocks anyway. It needs to be fixed to take this attribute into account and probably modified to look for scaling suffixes in more places than it looks now (either the component's parent block or the overall model) using Pyomo's suffix locator:

from pyomo.core.base.suffix import SuffixFinder

suffix_finder = SuffixFinder('scaling_factor', 1.0)
suffix_finder.find(component)

dallan-keylogic avatar May 13 '24 15:05 dallan-keylogic