10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-06-28 08:02:33 +02:00
QuantumPackage/src/cipsi/selection_types.f90

40 lines
905 B
Fortran
Raw Normal View History

2019-01-25 11:39:31 +01:00
module selection_types
type selection_buffer
integer :: N, cur
integer(8) , pointer :: det(:,:,:)
double precision, pointer :: val(:)
double precision :: mini
endtype
2020-08-28 00:10:46 +02:00
type pt2_type
double precision, allocatable :: pt2(:)
2020-08-28 15:39:01 +02:00
double precision, allocatable :: rpt2(:)
2020-08-28 00:10:46 +02:00
double precision, allocatable :: variance(:)
2020-08-28 15:39:01 +02:00
double precision, allocatable :: overlap(:,:)
double precision, allocatable :: overlap_imag(:,:)
2020-08-28 00:10:46 +02:00
endtype
2020-08-28 15:39:01 +02:00
2020-08-29 01:15:48 +02:00
contains
integer function pt2_type_size(N,has_imag)
2020-08-29 01:15:48 +02:00
implicit none
integer, intent(in) :: N
logical, intent(in), optional :: has_imag
logical :: has_imag_tmp
if(present(has_imag)) then
has_imag_tmp = has_imag
else
has_imag_tmp = .False.
endif
if (has_imag_tmp) then
2020-09-11 17:39:58 +02:00
pt2_type_size = (3*n + 2*n*n)
else
pt2_type_size = (3*n + n*n)
endif
2020-08-29 01:15:48 +02:00
end function
2020-08-28 15:39:01 +02:00
2019-01-25 11:39:31 +01:00
end module