19 integer,
parameter ::
dp = kind(1.0d0)
38 integer,
intent(in) :: verbose
39 real(
dp),
intent(in) :: threshold
40 type(bml_matrix_t),
intent(inout) :: a_bml
41 type(bml_matrix_t),
intent(inout) :: zmat_bml
42 type(bml_matrix_t) :: aux_bml
43 type(bml_matrix_t),
intent(inout) :: orthoa_bml
44 character(len=*),
intent(in) :: bml_type
46 if(verbose.eq.1)
write(*,*)
"In prg_orthogonalize ..."
48 hdim= bml_get_n(a_bml)
49 mdim= bml_get_m(a_bml)
52 if(bml_get_n(orthoa_bml) .le. 0)
then
53 call bml_zero_matrix(bml_type,bml_element_real,
dp,hdim ,mdim,orthoa_bml, &
54 bml_get_distribution_mode(a_bml))
58 call bml_transpose(zmat_bml, aux_bml)
60 call bml_multiply(aux_bml, a_bml, orthoa_bml, 1.0_dp, 0.0_dp,threshold)
62 call bml_multiply(orthoa_bml, zmat_bml, aux_bml, 1.0_dp, 0.0_dp,threshold)
64 call bml_copy_new(aux_bml, orthoa_bml)
66 call bml_deallocate(aux_bml)
83 integer :: hdim,verbose
85 type(bml_matrix_t),
intent(inout) :: a_bml
86 type(bml_matrix_t),
intent(in) :: zmat_bml
87 type(bml_matrix_t) :: aux_bml
88 type(bml_matrix_t),
intent(in) :: orthoa_bml
89 character(len=*) :: bml_type
91 if(verbose.eq.1)
write(*,*)
"In prg_deorthogonalize ..."
93 hdim = bml_get_n(orthoa_bml)
96 if(bml_get_n(a_bml).le.0)
then
97 call bml_zero_matrix(bml_type,bml_element_real,
dp,hdim,hdim,a_bml, &
98 bml_get_distribution_mode(orthoa_bml))
101 call bml_transpose(zmat_bml, aux_bml)
103 call bml_multiply(orthoa_bml, aux_bml, a_bml, 1.0_dp, 0.0_dp, threshold)
108 bml_get_distribution_mode(orthoa_bml) == bml_dmode_distributed)
then
113 call bml_multiply(zmat_bml, a_bml, aux_bml, 1.0_dp, 0.0_dp, threshold)
116 call bml_copy_new(aux_bml, a_bml)
118 call bml_deallocate(aux_bml)
Module to prg_orthogonalize and prg_deorthogonalize any operator.
subroutine, public prg_deorthogonalize(orthoA_bml, zmat_bml, a_bml, threshold, bml_type, verbose)
This routine performs: .
subroutine, public prg_orthogonalize(A_bml, zmat_bml, orthoA_bml, threshold, bml_type, verbose)
This routine performs: .
subroutine, public prg_allgatherparallel(a)
integer function, public getnranks()