Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces two optimizations aimed at reducing computation time during modal analysis:
1. Precomputation of Partial Model Matrices
A portion of the model matrices (excluding contributions from bearing elements) is now precomputed during the instantiation of the Rotor object. Previously, this computation was repeated every time matrix build methods were called. This change avoids redundant calculations and improves efficiency.
2. Globalization of the circle Variable in the Orbit Class
The circle variable in the
Orbitclass has been refactored to a global constant. This eliminates the need to recalculate theCIRCLEarray upon each instantiation of anOrbitobject, further reducing unnecessary overhead.The following test was performed by varying the values of
nandfreq:The results are summarized in the table below. The optimized version achieved up to 37% reduction in execution time, with an average improvement of approximately 30% across different configurations.