The Elk Code
Loading...
Searching...
No Matches
genstress.f90
Go to the documentation of this file.
1
2
! Copyright (C) 2013 J. K. Dewhurst, S. Sharma and E. K. U. Gross.
3
! This file is distributed under the terms of the GNU General Public License.
4
! See the file COPYING for license details.
5
6
subroutine
genstress
7
use
modmain
8
use
modmpi
9
implicit none
10
! local variables
11
real
(8) et0
12
! store original parameters
13
avec0
(:,:)=
avec
(:,:)
14
tforce0
=
tforce
15
tforce
=.false.
16
! restore original symmetries
17
call
symmetry
18
! generate the strain tensors
19
call
genstrain
20
! zero the stress tensor components
21
stress
(:)=0.d0
22
! run the ground-state calculation
23
call
gndstate
24
! check for stop signal
25
if
(
tstop
)
goto
10
26
! subsequent calculations will read in the potential from STATE.OUT
27
trdstate
=.true.
28
! store the total energy
29
et0=
engytot
30
! loop over strain tensors
31
do
istrain
=1,
nstrain
32
if
(
mp_mpi
)
then
33
write
(*,
'("Info(genstress): strain tensor ",I1," of ",I1)'
)
istrain
,
nstrain
34
end if
35
! restore the lattice vectors
36
avec
(:,:)=
avec0
(:,:)
37
! run the ground-state calculation
38
call
gndstate
39
! check for stop signal
40
if
(
tstop
)
goto
10
41
! compute the stress tensor component
42
stress
(
istrain
)=(
engytot
-et0)/
deltast
43
end do
44
10
continue
45
! compute the maximum stress magnitude over all lattice vectors
46
stressmax
=maxval(abs(
stress
(1:
nstrain
)))
47
! restore original parameters
48
istrain
=0
49
avec
(:,:)=
avec0
(:,:)
50
tforce
=
tforce0
51
end subroutine
52
genstrain
subroutine genstrain
Definition
genstrain.f90:7
genstress
subroutine genstress
Definition
genstress.f90:7
gndstate
subroutine gndstate
Definition
gndstate.f90:10
modmain
Definition
modmain.f90:6
modmain::deltast
real(8) deltast
Definition
modmain.f90:1019
modmain::nstrain
integer nstrain
Definition
modmain.f90:1012
modmain::avec0
real(8), dimension(3, 3) avec0
Definition
modmain.f90:12
modmain::avec
real(8), dimension(3, 3) avec
Definition
modmain.f90:12
modmain::tstop
logical tstop
Definition
modmain.f90:1052
modmain::stress
real(8), dimension(9) stress
Definition
modmain.f90:1021
modmain::trdstate
logical trdstate
Definition
modmain.f90:682
modmain::istrain
integer istrain
Definition
modmain.f90:1014
modmain::stressmax
real(8) stressmax
Definition
modmain.f90:1025
modmain::engytot
real(8) engytot
Definition
modmain.f90:980
modmain::tforce
logical tforce
Definition
modmain.f90:986
modmain::tforce0
logical tforce0
Definition
modmain.f90:986
modmpi
Definition
modmpi.f90:6
modmpi::mp_mpi
logical mp_mpi
Definition
modmpi.f90:17
symmetry
subroutine symmetry
Definition
symmetry.f90:7
genstress.f90
Generated by
1.9.8