Skip to content

Commit

Permalink
- in option "-dislocation", fixed a bug in the creation of dislocatio…
Browse files Browse the repository at this point in the history
…n loops with a square shape.
  • Loading branch information
Pierre Hirel committed Sep 5, 2018
1 parent eaacfd7 commit afd24c7
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 18 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ CHANGELOG FOR ATOMSK
====================


Master (development)
--------------------
Beta 0.10.5 (05 Sept. 2018)
---------------------------
- in option "-dislocation", fixed a bug in the creation of dislocation loops with a square shape. Thanks to Yong Zhang, Monash University, Clayton, Australia, for pointing out this bug.


Beta 0.10.4 (03 Sept. 2018)
Expand Down
2 changes: 1 addition & 1 deletion src/include/comv.f90
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ MODULE comv
!* along with this program. If not, see <http://www.gnu.org/licenses/>. *
!**********************************************************************************
!
CHARACTER(LEN=24),PARAMETER:: version = 'Beta-0.10.4'
CHARACTER(LEN=24),PARAMETER:: version = 'Beta-0.10.5'
INTEGER:: nwarn, nerr !number of warnings/errors encountered during run
INTEGER,PARAMETER:: dp = SELECTED_REAL_KIND(15,307) !reals with 64-bits precision
!
Expand Down
38 changes: 23 additions & 15 deletions src/options/opt_disloc.f90
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ MODULE dislocation
!* (C) May 2010 - Pierre Hirel *
!* Université de Lille, Sciences et Technologies *
!* UMR CNRS 8207, UMET - C6, F-59655 Villeneuve D'Ascq, France *
!* pierre.hirel@univ-lille1.fr *
!* Last modification: P. Hirel - 24 April 2018 *
!* pierre.hirel@univ-lille.fr *
!* Last modification: P. Hirel - 05 Sept. 2018 *
!**********************************************************************************
!* This program is free software: you can redistribute it and/or modify *
!* it under the terms of the GNU General Public License as published by *
Expand Down Expand Up @@ -955,25 +955,33 @@ SUBROUTINE DISLOC_XYZ(H,P,S,disloctype,dislocline,dislocplane,b,nu,pos,SELECT,OR
a2 = 2
a3 = 3
END SELECT
ALLOCATE(xLoop(3,4))
ALLOCATE(xLoop(4,3))
xLoop(:,:) = 0.d0
xLoop(a1,1) = pos(1) - pos(4)
xLoop(a2,1) = pos(2) - pos(4)
xLoop(a3,1) = pos(3)
xLoop(a1,2) = pos(1) + pos(4)
xLoop(a2,2) = pos(2) - pos(4)
xLoop(a3,2) = pos(3)
xLoop(a1,3) = pos(1) + pos(4)
xLoop(a2,3) = pos(2) + pos(4)
xLoop(a3,3) = pos(3)
xLoop(a1,4) = pos(1) - pos(4)
xLoop(a2,4) = pos(2) + pos(4)
xLoop(a3,4) = pos(3)
xLoop(1,a1) = pos(1) - pos(4)
xLoop(1,a2) = pos(2) - pos(4)
xLoop(1,a3) = pos(3)
xLoop(2,a1) = pos(1) + pos(4)
xLoop(2,a2) = pos(2) - pos(4)
xLoop(2,a3) = pos(3)
xLoop(3,a1) = pos(1) + pos(4)
xLoop(3,a2) = pos(2) + pos(4)
xLoop(3,a3) = pos(3)
xLoop(4,a1) = pos(1) - pos(4)
xLoop(4,a2) = pos(2) + pos(4)
xLoop(4,a3) = pos(3)
ELSE
!Positive pos(4) => Generate points that belong to a circle of radius pos(4)
xLoop = LOOP_SEGMENTS( pos(1:3) , pos(4) , dislocline )
ENDIF
!
IF( verbosity==4 ) THEN
CALL ATOMSK_MSG(999,(/"Positions of points of the loop:"/),(/0.d0/))
DO i=1,SIZE(xLoop,1)
WRITE(msg,'(3(3X,f16.3))') xLoop(i,1), xLoop(i,2), xLoop(i,3)
CALL ATOMSK_MSG(999,(/TRIM(msg)/),(/0.d0/))
ENDDO
ENDIF
!
!Now xLoop should contain the positions of points defining the loop
!Check if some points are outside of the box
CALL COUNT_OUTBOX(H,xLoop,i)
Expand Down

0 comments on commit afd24c7

Please sign in to comment.