Added right hand rule check to orientation in mode_create
This commit is contained in:
parent
9702ec85e9
commit
1b82d98a4f
3 changed files with 52 additions and 8 deletions
|
@ -169,6 +169,7 @@ module mode_create
|
|||
integer :: ori_pos, i, j, arglen, stat
|
||||
character(len=100) :: textholder
|
||||
character(len=8) :: orient_string
|
||||
logical :: isortho, isrighthanded
|
||||
|
||||
|
||||
!Pull out all required positional arguments
|
||||
|
@ -224,8 +225,6 @@ module mode_create
|
|||
! end do
|
||||
end do
|
||||
|
||||
|
||||
|
||||
!If the duplicate command is passed then we extract the information on the new bounds.
|
||||
case('duplicate')
|
||||
if(dim_flag) STOP "Both duplicate and dim options cannot be used in mode_create"
|
||||
|
@ -286,6 +285,13 @@ module mode_create
|
|||
end select
|
||||
!Now normalize the orientation matrix
|
||||
orient = matrix_normal(orient,3)
|
||||
!Now check these to make sure they are right handed and orthogonal
|
||||
call check_right_ortho(orient, isortho, isrighthanded)
|
||||
if (.not.isortho) then
|
||||
stop "Directions in orient are not orthogonal"
|
||||
else if (.not.isrighthanded) then
|
||||
stop "Directions in orient are not righthanded"
|
||||
end if
|
||||
|
||||
!Set lattice_num to 1 and add the lattice_parameter to the elements module lattice paramter variable
|
||||
lattice_types = 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue