-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up calculation of deformation gradients (#12341)
Reduced the use of `ElementVariables` in the context of calculating the deformation gradients. This improves local reasoning. Furthermore, the code was simplified significantly, which eases understanding. Other changes include: - Changed the signatures of members `CalculateDeformationGradient`: * They are no longer `virtual`, since no overrides were defined. * The return type has been changed to `Matrix` to return the result. * They no longer need a reference to data structure `ElementVariables`, since the result is now returned using the return type rather than a member of the output argument. * They have been made `const`, since no other members need to be modified. - Members `CalculateDeformationGradient` now only compute the deformation gradient itself, and no longer its determinant as well. To be on the safe side, the determinant is computed explicitly in a few places where it was not obvious whether the determinant is being used or not. - In several places, the use of `ElementVariables` had become redundant as a result of simplifying the code (i.e. after eliminating usages of members of `ElementVariables`). In most cases, we could use temporaries. - There is no need to explicitly check sizes before resizing a container: the `resize` operation of the container already takes care of that. - Removed two redundant calls to member `CalculateKinematics` (which only became apparent after carrying out the above changes). - Removed several comments that had no additional value.
- Loading branch information
Showing
7 changed files
with
28 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters