-
Notifications
You must be signed in to change notification settings - Fork 2
Fixes capacitance calculation #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes the capacitance and inductance matrix calculations for open problems by implementing Paul's formula 5.21. The key changes include refactoring the matrix calculation logic and adding comprehensive test coverage for the new implementation.
- Refactors capacitance matrix calculation to separate generalized and standard matrix computations
- Implements Paul's formula 5.21 for converting generalized capacitance matrices to standard capacitance matrices
- Updates existing tests with more accurate tolerance values and adds new validation tests
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/Driver.h | Updates method signatures to separate generalized and standard capacitance matrix calculations |
| src/Driver.cpp | Implements Paul's formula 5.21 and refactors matrix calculation logic |
| test/DriverTest.cpp | Adds comprehensive test coverage and updates tolerance values for improved accuracy |
| .gitmodules | Changes submodule URLs from SSH to HTTPS format |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
| mfem::DenseMatrix Driver::getCFromGeneralizedC( | ||
| const mfem::DenseMatrix& gC, | ||
| const Model::Openness& opennness) |
Copilot
AI
Aug 31, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parameter name 'opennness' contains a spelling error. It should be 'openness' (one 'n').
| res.Invert(); | ||
| res *= MU0_NATURAL * EPSILON0_NATURAL; | ||
| return res; |
Copilot
AI
Aug 31, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The inductance matrix calculation is missing the multiplication by MU0_NATURAL * EPSILON0_NATURAL that was present in the original code. This will result in incorrect inductance values.
| // Comparison with Clayton Paul's book: | ||
| // Analysis of multiconductor transmision lines. 2007. |
Copilot
AI
Aug 31, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Word 'transmision' is misspelled. It should be 'transmission'.
| // Comparison with Clayton Paul's book: | |
| // Analysis of multiconductor transmision lines. 2007. | |
| // Analysis of multiconductor transmission lines. 2007. |
| // Comparison with Clayton Paul's book: | ||
| // Analysis of multiconductor transmision lines. 2007. |
Copilot
AI
Aug 31, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Word 'transmision' is misspelled. It should be 'transmission'.
| // Comparison with Clayton Paul's book: | |
| // Analysis of multiconductor transmision lines. 2007. | |
| // Analysis of multiconductor transmission lines. 2007. |
Fixes capacitance and inductance matrices calcualtion for open problems. It was being calculated incorrectly. Now implementes Paul's formula 5.21