-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve function get_rotation_matrix (#11)
- Added docstring explaining the principles of constructing orthonormal local base for defining beam cross-section. - Now function throws an exception with a clear error message if user tries to construct rotation matrix where tangent is parallel to first beam section axis n1. - This commit closes PR #10.
- Loading branch information
Showing
3 changed files
with
51 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# This file is a part of JuliaFEM. | ||
# License is MIT: see https://github.com/JuliaFEM/FEMBeam.jl/blob/master/LICENSE | ||
|
||
## Rotation matrix test | ||
|
||
using FEMBeam | ||
using FEMBeam: get_rotation_matrix | ||
using FEMBase.Test | ||
|
||
# If tangent vector ``t`` is parallel to the first beam section axis ``n_1``, | ||
# local basis is not uniquely defined and error is thrown. | ||
|
||
X1 = [0.0, 0.0, 0.0] | ||
X2 = [1.0, 0.0, 0.0] | ||
n1 = [1.0, 0.0, 0.0] | ||
@test_throws Exception get_rotation_matrix(X1, X2, n1) |