This PR introduces the utility class MNAStampUtils for MNA matrix stamping operations. It standardizes and reuses the stamping logic for 1-phase and 3-phase EMT, DP and SP R, L, C components. The motivation is to make the codebase more maintainable and reduce redundancy.
Additional Context
Issue Reference: These changes were discussed in issue #288 - Reuse conductance stamp code.
Future Plans: There are plans for future PRs to extend this approach to other components deriving from the MNASimPowerComp class. This might involve adding more variations of stamping functions to MNAStampUtils to accommodate different parameter lists or optimized logic for specific cases, such as components with a single terminal or symmetric phase impedances.
Summary
This PR introduces the utility class
MNAStampUtils
for MNA matrix stamping operations. It standardizes and reuses the stamping logic for 1-phase and 3-phase EMT, DP and SP R, L, C components. The motivation is to make the codebase more maintainable and reduce redundancy.Additional Context
MNASimPowerComp
class. This might involve adding more variations of stamping functions toMNAStampUtils
to accommodate different parameter lists or optimized logic for specific cases, such as components with a single terminal or symmetric phase impedances.