Skip to content
Permalink
Browse files

Fix unassigned variable bug in stress tensor for TB efield calculatio…

…ns. (#362)

* Fix unassigned variable bug in stress tensor for TB efield calculations.

* Prettify
  • Loading branch information...
juerghutter committed May 15, 2019
1 parent 33bce52 commit 1d3c4ef1f5785b497fcecf92822884af6e417b1d
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/efield_tb_methods.F
@@ -544,7 +544,7 @@ SUBROUTINE dfield_tb_berry(qs_env, ks_matrix, rho, mcharge, energy, calculate_fo
LOGICAL :: found, use_virial LOGICAL :: found, use_virial
REAL(KIND=dp) :: charge, dd, ener_field, fdir, omega REAL(KIND=dp) :: charge, dd, ener_field, fdir, omega
REAL(KIND=dp), DIMENSION(3) :: ci, cqi, dfilter, di, fieldpol, fij, & REAL(KIND=dp), DIMENSION(3) :: ci, cqi, dfilter, di, fieldpol, fij, &
forcea, hdi, kvec, qi, rab, ria, rib hdi, kvec, qi, rab, ria, rib
REAL(KIND=dp), DIMENSION(3, 3) :: hmat REAL(KIND=dp), DIMENSION(3, 3) :: hmat
REAL(KIND=dp), DIMENSION(:, :), POINTER :: ds_block, ks_block, p_block, s_block REAL(KIND=dp), DIMENSION(:, :), POINTER :: ds_block, ks_block, p_block, s_block
TYPE(atomic_kind_type), DIMENSION(:), POINTER :: atomic_kind_set TYPE(atomic_kind_type), DIMENSION(:), POINTER :: atomic_kind_set
@@ -678,7 +678,7 @@ SUBROUTINE dfield_tb_berry(qs_env, ks_matrix, rho, mcharge, energy, calculate_fo
IF (use_virial) THEN IF (use_virial) THEN
ria = particle_set(ia)%r ria = particle_set(ia)%r
ria = pbc(ria, cell) ria = pbc(ria, cell)
CALL virial_pair_force(virial%pv_virial, 1.0_dp, forcea*charge, ria) CALL virial_pair_force(virial%pv_virial, 1.0_dp, di*charge, ria)
END IF END IF
END DO END DO
END IF END IF

0 comments on commit 1d3c4ef

Please sign in to comment.
You can’t perform that action at this time.