Skip to content

Commit

Permalink
Fix unassigned variable bug in stress tensor for TB efield calculatio…
Browse files Browse the repository at this point in the history
…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 1d3c4ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/efield_tb_methods.F
Expand Up @@ -544,7 +544,7 @@ SUBROUTINE dfield_tb_berry(qs_env, ks_matrix, rho, mcharge, energy, calculate_fo
LOGICAL :: found, use_virial
REAL(KIND=dp) :: charge, dd, ener_field, fdir, omega
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(:, :), POINTER :: ds_block, ks_block, p_block, s_block
TYPE(atomic_kind_type), DIMENSION(:), POINTER :: atomic_kind_set
Expand Down Expand Up @@ -678,7 +678,7 @@ SUBROUTINE dfield_tb_berry(qs_env, ks_matrix, rho, mcharge, energy, calculate_fo
IF (use_virial) THEN
ria = particle_set(ia)%r
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 DO
END IF
Expand Down

0 comments on commit 1d3c4ef

Please sign in to comment.