-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
Milestone
Description
The variable k is used in the Ksource update loop, with a specific instance here, despite not being a loop variable.
This is only possible since the indexing-variables are declared right at the top of execute(). In the previous two loops (Isource, Jsource), k is a loop variable so this is fine. However in the Ksource update loop only i and j are loop variables. It is only because k is globally scoped that the code compiles: but then we also notice that in this loop the value k is not changing, but is fixed to k = inputs.K1.index, and is still being used to fetch constants from the input matrices!