ikalash/Schwarz-4-Multiscale

indexing of "model"

Opened this issue · 2 comments

In pinn.py several functions index a single subdomains model (i.e. model0 ). The reason for this is because in the Schwarz loop in the driver, model_i is set by slicing the parent variable which holds all the models (model_om). because it uses a slice to set the values in model_i, model_i is a tuple of which the elements are lists, and thus must be indexed and cannot be called directly. Since the slice is for a single element the list size is 0. This seems to have been done to support the FD_update fxn in pinn.py as I currently do not see any need for this in the NN. I will leave as indexed for now as to not break the code with FD_update.

Hey @peterkrenek, would you like me to fix this, or are you planning on fixing this? If it's the former that's fine, but if it's the latter you would mark me as a "reviewer" of the pull request which will merge the fix, which I can then review (rather than assigning me to this issue).

@cwentland0 I just wanted to make you aware of why the indexing is happening. I didn't have plans to fix it at the moment as it would break the FD_1D_Update function which we are not focusing on at the moment so I figured it was best to leave as is. I can make some fixes however if we want to.