Commit 7b60a246 authored by Gregor Michalicek's avatar Gregor Michalicek

Calculate film cell area via 2D determinant

The problem with the old approach was that the cell%amat(3,3) can
be very large and does not have to be related to cell%dVac.
parent 68dbc9c4
......@@ -360,7 +360,7 @@
IF (kpts%nkpt == 0) THEN ! set some defaults for the k-points
IF (input%film) THEN
cell%area = cell%omtil / vacuum%dvac
cell%area = ABS(cell%amat(1,1)*cell%amat(2,2)-cell%amat(1,2)*cell%amat(2,1))
kpts%nkpt = MAX(nint((3600/cell%area)/sym%nop2),1)
ELSE
kpts%nkpt = MAX(nint((216000/cell%omtil)/sym%nop),1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment