Update metric file to make it similar to the xyz file in io subroutine

development
Alex Selimov 4 years ago
parent fe3cc92bc0
commit 77ef2bd063

@ -46,7 +46,7 @@ module mode_metric
case('def_grad') case('def_grad')
allocate(met(9, np)) allocate(met(9, np))
case('microrotation') case('microrotation')
allocate(met(3,np)) allocate(met(4,np))
end select end select
!Now set the reference positions !Now set the reference positions
@ -174,6 +174,7 @@ module mode_metric
end do end do
end do end do
end do end do
met(4,ip) = norm2(met(1:3,ip))
end if end if
end if end if
end select end select
@ -222,14 +223,14 @@ module mode_metric
select case(metric_type) select case(metric_type)
case('def_grad') case('def_grad')
write(11,*) "type x y z F11 F12 F13 F21 F22 F23 F31 F32 F33" write(11,*) "type element x y z F11 F12 F13 F21 F22 F23 F31 F32 F33"
case('microrotation') case('microrotation')
write(11,*) "type x y z micro1 micro2 micro3" write(11,*) "type element x y z micro1 micro2 micro3 norm2(micro)"
end select end select
if(atom_num > 0) then if(atom_num > 0) then
do i = 1, atom_num do i = 1, atom_num
write(11,*) 0, type_atom(i), r_atom(:,i), met(:,tag_atom(i)) write(11,*) type_atom(i), 0, r_atom(:,i), met(:,tag_atom(i))
end do end do
end if end if
@ -237,7 +238,7 @@ module mode_metric
do i = 1, ele_num do i = 1, ele_num
do inod = 1, ng_node(lat_ele(i)) do inod = 1, ng_node(lat_ele(i))
do ibasis = 1, basisnum(lat_ele(i)) do ibasis = 1, basisnum(lat_ele(i))
write(11,*) 1, basis_type(ibasis,lat_ele(i)), r_node(:,ibasis,inod,i), & write(11,*) basis_type(ibasis,lat_ele(i)), 1, r_node(:,ibasis,inod,i), &
met(:, atom_num+(tag_ele(i)-1)*max_ng_node*max_basisnum + (inod-1)*max_basisnum + ibasis) met(:, atom_num+(tag_ele(i)-1)*max_ng_node*max_basisnum + (inod-1)*max_basisnum + ibasis)
end do end do
end do end do

Loading…
Cancel
Save