Conversation
Steven-Roberts
left a comment
There was a problem hiding this comment.
A couple minor comments, but overall looks good.
| 1. Constructor tests (smoke tests). | ||
| 2. Residual evaluation test (pick input variables to get easy to verify | ||
| residual values). | ||
| 3. Jacobian evaluation test (Enzyme generated Jacobian must match Jacobian | ||
| created using dependency tracking variables). | ||
| 4. Initialization test (initialize to arbitrary, easy to verify values). | ||
| 5. Initialize and evaluate residual test (initialization should ensure | ||
| residual evaluates to zero within prescribed tolerance). |
There was a problem hiding this comment.
It's not entirely clear what the difference between 1 and 4 are, as well as 2 and 5.
There was a problem hiding this comment.
1 is testing constructor (instantiation), while 4 checks setting the initial value (initialization).
2 is testing residual for arbitrary values of variables, preferably those that would catch numerical errors (i.e. avoid zeros and ones for variable values). 5 is checking that residual vector is zero after initialization, i.e. verifies that the component is initialized at a steady state. Initialization usually sets many variables to zero, so 5 may not be a complete check that residual function is correctly implemented.
I will try to explain this better in the checklist.
There was a problem hiding this comment.
I believe this is explained better in 6ca8a09. @Steven-Roberts, please take a look.
Co-authored-by: Steven Roberts <sroberts994@gmail.com>
Description
Add checklist for phasor dynamics component model development.
Proposed changes
Expand
GridKit/Model/PhasorDynamics/README.mdto include component model developer checklist.Checklist
-Wall -Wpedantic -Wconversion -Wextra.Further comments
Asking for more than usual reviews as we want to make sure the checklist is detailed and clear enough to everyone. Questions and feedback are appreciated.