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.
I've put together a high-level interface for doing output-based mesh adaptation on static problems using TACS and TMR.
The
pyTACSAdapt
class contains the "coarse" and "fine" models consisting of their TACS/TMR finite-element and geometry information. This class also provides a higher-level interface for conducting the primal analysis and doing adjoint-based error estimation and mesh adaptation via routines implemented in TMR.The adjoint-based error estimation in TMR for Quads is currently in working order, I have not yet updated the Oct implementation. One significant change made to the code was the method used for error localization from mesh nodes to the elements. Previously, a partition-of-unity basis was used to localize the error to the elements, which was implemented at the element level within TACS. I moved the adjoint-weighted residual computation to occur solely within TMR to avoid a lot of repeated code in the TACS elements. I removed the partition of unity basis, and now the error localization is simply a weighted sum of the nodal errors contained within each element, though there may be an issue with how dependent nodes are currently being accounted for which I'd like some feedback on.
Included here is a simple example that demonstrates
pyTACSAdapt
usage. Essentially, the user must provide a geometry input file, a callback function for loading the geometry and initializing the coarse model, a callback function for creating elements for the TACS assembler, and a callback function for setting up the static TACS problem. The example should walk through the steps of the adaptive analysis in a straightforward manner.Please let me know if you have any comments, questions, or suggestions on ways to improve this.