Skip to content

Conversation

@lmdiazangulo
Copy link
Collaborator

@lmdiazangulo lmdiazangulo commented Aug 27, 2025

Fixes capacitance and inductance matrices calcualtion for open problems. It was being calculated incorrectly. Now implementes Paul's formula 5.21

Copy link

Copilot AI left a 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)
Copy link

Copilot AI Aug 31, 2025

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').

Copilot uses AI. Check for mistakes.
Comment on lines 262 to 263
res.Invert();
res *= MU0_NATURAL * EPSILON0_NATURAL;
return res;
Copy link

Copilot AI Aug 31, 2025

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.

Copilot uses AI. Check for mistakes.
Comment on lines +283 to +284
// Comparison with Clayton Paul's book:
// Analysis of multiconductor transmision lines. 2007.
Copy link

Copilot AI Aug 31, 2025

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'.

Suggested change
// Comparison with Clayton Paul's book:
// Analysis of multiconductor transmision lines. 2007.
// Analysis of multiconductor transmission lines. 2007.

Copilot uses AI. Check for mistakes.
Comment on lines +754 to +755
// Comparison with Clayton Paul's book:
// Analysis of multiconductor transmision lines. 2007.
Copy link

Copilot AI Aug 31, 2025

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'.

Suggested change
// Comparison with Clayton Paul's book:
// Analysis of multiconductor transmision lines. 2007.
// Analysis of multiconductor transmission lines. 2007.

Copilot uses AI. Check for mistakes.
@lmdiazangulo lmdiazangulo merged commit 9838c9f into dev Sep 3, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants