Skip to content
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

Fixing issue in AssembleMatType procedure #169

Merged
merged 10 commits into from
Jan 20, 2023

Conversation

timryanb
Copy link
Collaborator

@timryanb timryanb commented Jan 19, 2023

  • Our nightly benchmark tests caught a change in the modal analysis results of one of our pytacs examples (benchmarks can also be run locally using $testflo -b .)
  • I narrowed the problem down to this line of code in the assembleMatType procedure which was causing TACSFrequencyAnalysis to behave differently
  • The problem is that getMatType isn't an additive procedure (like addJacobian) so everytime the auxiliary element contribution is computed, it overwrites the element contribution
  • The fix to this was to always split out the auxelem matrix contribution and then scale (rather than conditionally doing so)
  • I also added a new modalProblem integration test case to catch this in the future

src/TACSAssembler.cpp Outdated Show resolved Hide resolved
@timryanb timryanb requested review from A-CGray and gjkennedy January 19, 2023 20:50
Comment on lines 373 to 374
# Make previous auxiliary loads are removed
self.assembler.setAuxElements(None)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for this addition?

Copy link
Collaborator Author

@timryanb timryanb Jan 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other TACS problems (StaticProblem/TranientProblem) may have set an AuxElem loads in a previous call. This line makes sure that AuxElems is empty at the begining of each ModalProblem analysis, since we have no use for them here. Setting this to None in Python is equivalent to setting it to NULL in c++

@timryanb timryanb merged commit 8488075 into smdogroup:master Jan 20, 2023
@timryanb timryanb deleted the assmb-mat-type-fix branch January 20, 2023 19:37
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.

2 participants