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_new(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)
82 use,
intrinsic :: iso_c_binding
84 integer :: hdim,verbose
86 type(bml_matrix_t),
intent(inout) :: a_bml
87 type(bml_matrix_t),
intent(in) :: zmat_bml
88 type(bml_matrix_t) :: aux_bml
89 type(bml_matrix_t),
intent(in) :: orthoa_bml
90 character(len=*) :: bml_type
92 if(verbose.eq.1)
write(*,*)
"In prg_deorthogonalize ..."
94 hdim = bml_get_n(orthoa_bml)
97 if(bml_get_n(a_bml).le.0)
then
98 call bml_zero_matrix(bml_type,bml_element_real,
dp,hdim,hdim,a_bml, &
99 bml_get_distribution_mode(orthoa_bml))
102 call bml_transpose_new(zmat_bml, aux_bml)
104 call bml_multiply(orthoa_bml, aux_bml, a_bml, 1.0_dp, 0.0_dp, threshold)
109 bml_get_distribution_mode(orthoa_bml) == bml_dmode_distributed)
then
114 call bml_multiply(zmat_bml, a_bml, aux_bml, 1.0_dp, 0.0_dp, threshold)
118 call bml_deallocate(a_bml)
119 a_bml%ptr = aux_bml%ptr
120 aux_bml%ptr = c_null_ptr
122 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()