18 deallocate_arnoldi_env,&
19 get_selected_ritz_val,&
20 get_selected_ritz_vector,&
21 set_arnoldi_initial_vector,&
55#include "./base/base_uses.f90"
61 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'preconditioner_makes'
80 energy_homo, eigenvalues_ot, energy_gap, &
84 TYPE(
dbcsr_type),
OPTIONAL,
POINTER :: matrix_s, matrix_t
86 REAL(kind=
dp) :: energy_homo
87 REAL(kind=
dp),
DIMENSION(:) :: eigenvalues_ot
88 REAL(kind=
dp) :: energy_gap
89 INTEGER :: my_solver_type
91 INTEGER :: precon_type
93 precon_type = preconditioner_env%in_use
94 SELECT CASE (precon_type)
97 cpabort(
"Only PRECOND_SOLVER DEFAULT for the moment")
99 IF (
PRESENT(matrix_s))
THEN
100 CALL make_full_single(preconditioner_env, preconditioner_env%fm, &
101 matrix_h, matrix_s, energy_homo, energy_gap)
103 CALL make_full_single_ortho(preconditioner_env, preconditioner_env%fm, &
104 matrix_h, energy_homo, energy_gap)
109 IF (.NOT.
PRESENT(matrix_s))
THEN
110 cpabort(
"Type for S=1 not implemented")
112 CALL make_full_s_inverse(preconditioner_env, matrix_s)
116 IF (.NOT. (
PRESENT(matrix_s) .AND.
PRESENT(matrix_t)))
THEN
117 cpabort(
"Type for S=1 not implemented")
119 CALL make_full_kinetic(preconditioner_env, matrix_t, matrix_s, energy_gap)
122 CALL make_full_single_inverse(preconditioner_env, mo_coeff, matrix_h, energy_gap, &
126 cpabort(
"Only PRECOND_SOLVER DEFAULT for the moment")
128 IF (
PRESENT(matrix_s))
THEN
129 CALL make_full_all(preconditioner_env, mo_coeff, matrix_h, matrix_s, &
130 eigenvalues_ot, energy_gap)
132 CALL make_full_all_ortho(preconditioner_env, mo_coeff, matrix_h, &
133 eigenvalues_ot, energy_gap)
137 cpabort(
"Type not implemented")
147 SUBROUTINE make_full_s_inverse(preconditioner_env, matrix_s)
151 CHARACTER(len=*),
PARAMETER :: routinen =
'make_full_s_inverse'
155 CALL timeset(routinen, handle)
157 cpassert(
ASSOCIATED(matrix_s))
159 IF (.NOT.
ASSOCIATED(preconditioner_env%sparse_matrix))
THEN
160 ALLOCATE (preconditioner_env%sparse_matrix)
162 CALL dbcsr_copy(preconditioner_env%sparse_matrix, matrix_s, name=
"full_kinetic")
164 CALL timestop(handle)
166 END SUBROUTINE make_full_s_inverse
176 SUBROUTINE make_full_kinetic(preconditioner_env, matrix_t, matrix_s, &
179 TYPE(
dbcsr_type),
POINTER :: matrix_t, matrix_s
180 REAL(kind=
dp) :: energy_gap
182 CHARACTER(len=*),
PARAMETER :: routinen =
'make_full_kinetic'
185 REAL(kind=
dp) :: shift
187 CALL timeset(routinen, handle)
189 cpassert(
ASSOCIATED(matrix_t))
190 cpassert(
ASSOCIATED(matrix_s))
192 IF (.NOT.
ASSOCIATED(preconditioner_env%sparse_matrix))
THEN
193 ALLOCATE (preconditioner_env%sparse_matrix)
195 CALL dbcsr_copy(preconditioner_env%sparse_matrix, matrix_t, name=
"full_kinetic")
197 shift = max(0.0_dp, energy_gap)
199 CALL dbcsr_add(preconditioner_env%sparse_matrix, matrix_s, &
200 alpha_scalar=1.0_dp, beta_scalar=shift)
202 CALL timestop(handle)
204 END SUBROUTINE make_full_kinetic
215 SUBROUTINE make_full_single(preconditioner_env, fm, matrix_h, matrix_s, &
216 energy_homo, energy_gap)
219 TYPE(
dbcsr_type),
POINTER :: matrix_h, matrix_s
220 REAL(kind=
dp) :: energy_homo, energy_gap
222 CHARACTER(len=*),
PARAMETER :: routinen =
'make_full_single'
224 INTEGER :: handle, i, n
225 REAL(kind=
dp),
DIMENSION(:),
POINTER :: evals
229 CALL timeset(routinen, handle)
231 NULLIFY (fm_struct_tmp, evals)
233 IF (
ASSOCIATED(fm))
THEN
242 context=preconditioner_env%ctxt, &
243 para_env=preconditioner_env%para_env)
245 CALL cp_fm_create(fm, fm_struct_tmp, name=
"preconditioner")
254 SELECT CASE (preconditioner_env%cholesky_use)
261 invert_tr=.false., uplo_tr=
"U", n_rows=n, n_cols=n, alpha=1.0_dp)
263 invert_tr=.false., uplo_tr=
"U", n_rows=n, n_cols=n, alpha=1.0_dp)
267 cpabort(
"cholesky type not implemented")
272 SELECT CASE (preconditioner_env%cholesky_use)
275 invert_tr=.false., uplo_tr=
"U", n_rows=n, n_cols=n, alpha=1.0_dp)
277 evals(i) = 1.0_dp/max(evals(i) - energy_homo, energy_gap)
283 evals(i) = 1.0_dp/max(evals(i) - energy_homo, energy_gap)
289 CALL parallel_gemm(
'N',
'T', n, n, n, 1.0_dp, fm, fm_h, 0.0_dp, fm_s)
296 CALL timestop(handle)
298 END SUBROUTINE make_full_single
308 SUBROUTINE make_full_single_ortho(preconditioner_env, fm, matrix_h, &
309 energy_homo, energy_gap)
313 REAL(kind=
dp) :: energy_homo, energy_gap
315 CHARACTER(len=*),
PARAMETER :: routinen =
'make_full_single_ortho'
317 INTEGER :: handle, i, n
318 REAL(kind=
dp),
DIMENSION(:),
POINTER :: evals
322 CALL timeset(routinen, handle)
323 NULLIFY (fm_struct_tmp, evals)
325 IF (
ASSOCIATED(fm))
THEN
334 context=preconditioner_env%ctxt, &
335 para_env=preconditioner_env%para_env)
337 CALL cp_fm_create(fm, fm_struct_tmp, name=
"preconditioner")
346 evals(i) = 1.0_dp/max(evals(i) - energy_homo, energy_gap)
350 CALL parallel_gemm(
'N',
'T', n, n, n, 1.0_dp, fm, fm_h, 0.0_dp, fm_s)
357 CALL timestop(handle)
359 END SUBROUTINE make_full_single_ortho
380 SUBROUTINE make_full_all(preconditioner_env, matrix_c0, matrix_h, matrix_s, c0_evals, energy_gap)
383 TYPE(
dbcsr_type),
POINTER :: matrix_h, matrix_s
384 REAL(kind=
dp),
DIMENSION(:) :: c0_evals
385 REAL(kind=
dp) :: energy_gap
387 CHARACTER(len=*),
PARAMETER :: routinen =
'make_full_all'
388 REAL(kind=
dp),
PARAMETER :: fudge_factor = 0.25_dp, &
389 lambda_base = 10.0_dp
391 INTEGER :: handle, k, n
392 REAL(kind=
dp) :: error_estimate, lambda
393 REAL(kind=
dp),
DIMENSION(:),
POINTER :: diag, norms, shifted_evals
395 TYPE(
cp_fm_type) :: matrix_hc0, matrix_left, matrix_s1, &
396 matrix_s2, matrix_sc0, matrix_shc0, &
400 CALL timeset(routinen, handle)
402 IF (
ASSOCIATED(preconditioner_env%fm))
THEN
404 DEALLOCATE (preconditioner_env%fm)
405 NULLIFY (preconditioner_env%fm)
409 context=preconditioner_env%ctxt, &
410 para_env=preconditioner_env%para_env)
411 ALLOCATE (preconditioner_env%fm)
412 CALL cp_fm_create(preconditioner_env%fm, fm_struct_tmp, name=
"preconditioner_env%fm")
414 CALL cp_fm_create(matrix_tmp, fm_struct_tmp, name=
"matrix_tmp")
416 ALLOCATE (preconditioner_env%full_evals(n))
417 ALLOCATE (preconditioner_env%occ_evals(k))
433 CALL cp_fm_create(matrix_sc0, matrix_c0%matrix_struct, name=
"sc0")
435 CALL cp_fm_create(matrix_hc0, matrix_c0%matrix_struct, name=
"hc0")
439 CALL cp_fm_create(matrix_shc0, matrix_c0%matrix_struct, name=
"shc0")
441 SELECT CASE (preconditioner_env%cholesky_use)
446 invert_tr=.false., uplo_tr=
"U", n_rows=n, n_cols=k, alpha=1.0_dp)
450 cpabort(
"cholesky type not implemented")
453 context=preconditioner_env%ctxt, &
454 para_env=preconditioner_env%para_env)
455 CALL cp_fm_create(matrix_s1, fm_struct_tmp, name=
"matrix_s1")
458 CALL parallel_gemm(
'T',
'N', k, k, n, 1.0_dp, matrix_shc0, matrix_shc0, 0.0_dp, matrix_s1)
461 error_estimate = maxval(sqrt(abs(diag - c0_evals**2)))
469 preconditioner_env%energy_gap = max(energy_gap, error_estimate*fudge_factor)
471 matrix_pre => preconditioner_env%fm
474 CALL parallel_gemm(
'N',
'T', n, n, k, -1.0_dp, matrix_hc0, matrix_sc0, 1.0_dp, matrix_tmp)
477 context=preconditioner_env%ctxt, &
478 para_env=preconditioner_env%para_env)
479 CALL cp_fm_create(matrix_left, fm_struct_tmp, name=
"matrix_left")
481 CALL parallel_gemm(
'T',
'N', k, n, n, 1.0_dp, matrix_c0, matrix_tmp, 0.0_dp, matrix_left)
483 CALL parallel_gemm(
'N',
'N', n, n, k, -1.0_dp, matrix_sc0, matrix_left, 1.0_dp, matrix_tmp)
486 ALLOCATE (shifted_evals(k))
487 lambda = lambda_base + error_estimate
488 shifted_evals = c0_evals - lambda
491 CALL parallel_gemm(
'N',
'T', n, n, k, 1.0_dp, matrix_hc0, matrix_sc0, 1.0_dp, matrix_tmp)
494 SELECT CASE (preconditioner_env%cholesky_use)
497 invert_tr=.false., uplo_tr=
"U", n_rows=n, n_cols=n, alpha=1.0_dp)
499 invert_tr=.false., uplo_tr=
"U", n_rows=n, n_cols=n, alpha=1.0_dp)
504 SELECT CASE (preconditioner_env%cholesky_use)
507 invert_tr=.false., uplo_tr=
"U", n_rows=n, n_cols=n, alpha=1.0_dp)
517 context=preconditioner_env%ctxt, &
518 para_env=preconditioner_env%para_env)
519 CALL cp_fm_create(matrix_s1, fm_struct_tmp, name=
"matrix_s1")
520 CALL cp_fm_create(matrix_s2, fm_struct_tmp, name=
"matrix_s2")
523 CALL parallel_gemm(
'T',
'N', k, k, n, 1.0_dp, matrix_sc0, matrix_tmp, 0.0_dp, matrix_s1)
525 WRITE (*, *)
"matrix norm deviation (should be close to zero): ", maxval(abs(abs(norms) - 1.0_dp))
532 preconditioner_env%occ_evals = c0_evals
534 preconditioner_env%full_evals(1:k) = c0_evals
541 DEALLOCATE (shifted_evals)
542 CALL timestop(handle)
544 END SUBROUTINE make_full_all
554 SUBROUTINE make_full_all_ortho(preconditioner_env, matrix_c0, matrix_h, c0_evals, energy_gap)
559 REAL(kind=
dp),
DIMENSION(:) :: c0_evals
560 REAL(kind=
dp) :: energy_gap
562 CHARACTER(len=*),
PARAMETER :: routinen =
'make_full_all_ortho'
563 REAL(kind=
dp),
PARAMETER :: fudge_factor = 0.25_dp, &
564 lambda_base = 10.0_dp
566 INTEGER :: handle, k, n
567 REAL(kind=
dp) :: error_estimate, lambda
568 REAL(kind=
dp),
DIMENSION(:),
POINTER :: diag, norms, shifted_evals
570 TYPE(
cp_fm_type) :: matrix_hc0, matrix_left, matrix_s1, &
571 matrix_s2, matrix_sc0, matrix_tmp
574 CALL timeset(routinen, handle)
576 IF (
ASSOCIATED(preconditioner_env%fm))
THEN
578 DEALLOCATE (preconditioner_env%fm)
579 NULLIFY (preconditioner_env%fm)
583 context=preconditioner_env%ctxt, &
584 para_env=preconditioner_env%para_env)
585 ALLOCATE (preconditioner_env%fm)
586 CALL cp_fm_create(preconditioner_env%fm, fm_struct_tmp, name=
"preconditioner_env%fm")
587 CALL cp_fm_create(matrix_tmp, fm_struct_tmp, name=
"matrix_tmp")
589 ALLOCATE (preconditioner_env%full_evals(n))
590 ALLOCATE (preconditioner_env%occ_evals(k))
598 CALL cp_fm_create(matrix_sc0, matrix_c0%matrix_struct, name=
"sc0")
600 CALL cp_fm_create(matrix_hc0, matrix_c0%matrix_struct, name=
"hc0")
605 context=preconditioner_env%ctxt, &
606 para_env=preconditioner_env%para_env)
607 CALL cp_fm_create(matrix_s1, fm_struct_tmp, name=
"matrix_s1")
610 CALL parallel_gemm(
'T',
'N', k, k, n, 1.0_dp, matrix_hc0, matrix_hc0, 0.0_dp, matrix_s1)
613 error_estimate = maxval(sqrt(abs(diag - c0_evals**2)))
620 preconditioner_env%energy_gap = max(energy_gap, error_estimate*fudge_factor)
622 matrix_pre => preconditioner_env%fm
626 CALL parallel_gemm(
'N',
'T', n, n, k, -1.0_dp, matrix_hc0, matrix_sc0, 1.0_dp, matrix_tmp)
629 context=preconditioner_env%ctxt, &
630 para_env=preconditioner_env%para_env)
631 CALL cp_fm_create(matrix_left, fm_struct_tmp, name=
"matrix_left")
633 CALL parallel_gemm(
'T',
'N', k, n, n, 1.0_dp, matrix_c0, matrix_tmp, 0.0_dp, matrix_left)
635 CALL parallel_gemm(
'N',
'N', n, n, k, -1.0_dp, matrix_sc0, matrix_left, 1.0_dp, matrix_tmp)
638 ALLOCATE (shifted_evals(k))
639 lambda = lambda_base + error_estimate
640 shifted_evals = c0_evals - lambda
643 CALL parallel_gemm(
'N',
'T', n, n, k, 1.0_dp, matrix_hc0, matrix_sc0, 1.0_dp, matrix_tmp)
652 context=preconditioner_env%ctxt, &
653 para_env=preconditioner_env%para_env)
654 CALL cp_fm_create(matrix_s1, fm_struct_tmp, name=
"matrix_s1")
655 CALL cp_fm_create(matrix_s2, fm_struct_tmp, name=
"matrix_s2")
658 CALL parallel_gemm(
'T',
'N', k, k, n, 1.0_dp, matrix_sc0, matrix_tmp, 0.0_dp, matrix_s1)
661 WRITE (*, *)
"matrix norm deviation (should be close to zero): ", maxval(abs(abs(norms) - 1.0_dp))
668 preconditioner_env%occ_evals = c0_evals
670 preconditioner_env%full_evals(1:k) = c0_evals
676 DEALLOCATE (shifted_evals)
678 CALL timestop(handle)
680 END SUBROUTINE make_full_all_ortho
699 SUBROUTINE make_full_single_inverse(preconditioner_env, matrix_c0, matrix_h, energy_gap, matrix_s)
703 REAL(kind=
dp) :: energy_gap
704 TYPE(
dbcsr_type),
OPTIONAL,
POINTER :: matrix_s
706 CHARACTER(len=*),
PARAMETER :: routinen =
'make_full_single_inverse'
708 INTEGER :: handle, k, n
709 REAL(kind=
dp) :: max_ev, min_ev, pre_shift
710 TYPE(arnoldi_env_type) :: arnoldi_env
712 TYPE(
dbcsr_type),
TARGET :: dbcsr_cthc, dbcsr_hc, dbcsr_sc, mo_dbcsr
714 CALL timeset(routinen, handle)
726 IF (.NOT.
ASSOCIATED(preconditioner_env%sparse_matrix))
THEN
727 ALLOCATE (preconditioner_env%sparse_matrix)
731 CALL dbcsr_copy(preconditioner_env%sparse_matrix, matrix_h)
735 IF (
PRESENT(matrix_s))
THEN
736 CALL dbcsr_multiply(
"N",
"N", 1.0_dp, matrix_s, mo_dbcsr, 0.0_dp, dbcsr_sc)
743 CALL dbcsr_multiply(
"N",
"N", 1.0_dp, matrix_h, mo_dbcsr, 0.0_dp, dbcsr_hc)
744 CALL dbcsr_multiply(
"T",
"N", 1.0_dp, mo_dbcsr, dbcsr_hc, 0.0_dp, dbcsr_cthc)
747 ALLOCATE (matrices(1))
748 matrices(1)%matrix => dbcsr_cthc
749 CALL setup_arnoldi_env(arnoldi_env, matrices, max_iter=20, threshold=1.0e-3_dp, selection_crit=2, &
750 nval_request=1, nrestarts=8, generalized_ev=.false., iram=.false.)
751 IF (
ASSOCIATED(preconditioner_env%max_ev_vector))
THEN
752 CALL set_arnoldi_initial_vector(arnoldi_env, preconditioner_env%max_ev_vector)
755 max_ev = real(get_selected_ritz_val(arnoldi_env, 1),
dp)
758 IF (.NOT.
ASSOCIATED(preconditioner_env%max_ev_vector))
ALLOCATE (preconditioner_env%max_ev_vector)
759 CALL get_selected_ritz_vector(arnoldi_env, 1, matrices(1)%matrix, preconditioner_env%max_ev_vector)
760 CALL deallocate_arnoldi_env(arnoldi_env)
761 DEALLOCATE (matrices)
766 CALL dbcsr_multiply(
"N",
"N", 2.0_dp, dbcsr_sc, dbcsr_cthc, 0.0_dp, dbcsr_hc)
767 CALL dbcsr_multiply(
"N",
"T", -1.0_dp, dbcsr_hc, dbcsr_sc, 1.0_dp, preconditioner_env%sparse_matrix)
771 IF (
PRESENT(matrix_s))
THEN
772 ALLOCATE (matrices(2))
773 matrices(1)%matrix => preconditioner_env%sparse_matrix
774 matrices(2)%matrix => matrix_s
775 CALL setup_arnoldi_env(arnoldi_env, matrices, max_iter=20, threshold=2.0e-2_dp, selection_crit=3, &
776 nval_request=1, nrestarts=21, generalized_ev=.true., iram=.false.)
778 ALLOCATE (matrices(1))
779 matrices(1)%matrix => preconditioner_env%sparse_matrix
780 CALL setup_arnoldi_env(arnoldi_env, matrices, max_iter=20, threshold=2.0e-2_dp, selection_crit=3, &
781 nval_request=1, nrestarts=8, generalized_ev=.false., iram=.false.)
783 IF (
ASSOCIATED(preconditioner_env%min_ev_vector))
THEN
784 CALL set_arnoldi_initial_vector(arnoldi_env, preconditioner_env%min_ev_vector)
789 min_ev = real(get_selected_ritz_val(arnoldi_env, 1),
dp)
792 IF (.NOT.
ASSOCIATED(preconditioner_env%min_ev_vector))
ALLOCATE (preconditioner_env%min_ev_vector)
793 CALL get_selected_ritz_vector(arnoldi_env, 1, matrices(1)%matrix, preconditioner_env%min_ev_vector)
794 CALL deallocate_arnoldi_env(arnoldi_env)
795 DEALLOCATE (matrices)
800 pre_shift = max(1.5_dp*(min_ev - max_ev), energy_gap)
801 IF (min_ev < pre_shift)
THEN
802 pre_shift = pre_shift - min_ev
806 IF (
PRESENT(matrix_s))
THEN
807 CALL dbcsr_add(preconditioner_env%sparse_matrix, matrix_s, 1.0_dp, pre_shift)
817 CALL timestop(handle)
819 END SUBROUTINE make_full_single_inverse
arnoldi iteration using dbcsr
subroutine, public arnoldi_ev(matrix, arnoldi_env)
Driver routine for different arnoldi eigenvalue methods the selection which one is to be taken is mad...
subroutine, public dbcsr_copy(matrix_b, matrix_a, name, keep_sparsity, keep_imaginary)
...
subroutine, public dbcsr_multiply(transa, transb, alpha, matrix_a, matrix_b, beta, matrix_c, first_row, last_row, first_column, last_column, first_k, last_k, retain_sparsity, filter_eps, flop)
...
subroutine, public dbcsr_get_info(matrix, nblkrows_total, nblkcols_total, nfullrows_total, nfullcols_total, nblkrows_local, nblkcols_local, nfullrows_local, nfullcols_local, my_prow, my_pcol, local_rows, local_cols, proc_row_dist, proc_col_dist, row_blk_size, col_blk_size, row_blk_offset, col_blk_offset, distribution, name, matrix_type, group)
...
subroutine, public dbcsr_release(matrix)
...
subroutine, public dbcsr_add(matrix_a, matrix_b, alpha_scalar, beta_scalar)
...
subroutine, public dbcsr_add_on_diag(matrix, alpha)
Adds the given scalar to the diagonal of the matrix. Reserves any missing diagonal blocks.
DBCSR operations in CP2K.
subroutine, public cp_dbcsr_sm_fm_multiply(matrix, fm_in, fm_out, ncol, alpha, beta)
multiply a dbcsr with a fm matrix
subroutine, public copy_dbcsr_to_fm(matrix, fm)
Copy a DBCSR matrix to a BLACS matrix.
subroutine, public cp_fm_to_dbcsr_row_template(matrix, fm_in, template)
Utility function to copy a specially shaped fm to dbcsr_matrix The result matrix will be the matrix i...
subroutine, public cp_dbcsr_m_by_n_from_template(matrix, template, m, n, sym)
Utility function to create an arbitrary shaped dbcsr matrix with the same processor grid as the templ...
Basic linear algebra operations for full matrices.
subroutine, public cp_fm_column_scale(matrixa, scaling)
scales column i of matrix a with scaling(i)
subroutine, public cp_fm_uplo_to_full(matrix, work, uplo)
given a triangular matrix according to uplo, computes the corresponding full matrix
subroutine, public cp_fm_triangular_invert(matrix_a, uplo_tr)
inverts a triangular matrix
subroutine, public cp_fm_triangular_multiply(triangular_matrix, matrix_b, side, transpose_tr, invert_tr, uplo_tr, unit_diag_tr, n_rows, n_cols, alpha)
multiplies in place by a triangular matrix: matrix_b = alpha op(triangular_matrix) matrix_b or (if si...
various cholesky decomposition related routines
subroutine, public cp_fm_cholesky_restore(fm_matrix, neig, fm_matrixb, fm_matrixout, op, pos, transa)
apply Cholesky decomposition op can be "SOLVE" (out = U^-1 * in) or "MULTIPLY" (out = U * in) pos can...
subroutine, public cp_fm_cholesky_decompose(matrix, n, info_out)
used to replace a symmetric positive def. matrix M with its cholesky decomposition U: M = U^T * U,...
subroutine, public cp_fm_cholesky_reduce(matrix, matrixb, itype)
reduce a matrix pencil A,B to normal form B has to be cholesky decomposed with cp_fm_cholesky_decompo...
used for collecting some of the diagonalization schemes available for cp_fm_type. cp_fm_power also mo...
subroutine, public choose_eigv_solver(matrix, eigenvectors, eigenvalues, info)
Choose the Eigensolver depending on which library is available ELPA seems to be unstable for small sy...
represent the structure of a full matrix
subroutine, public cp_fm_struct_create(fmstruct, para_env, context, nrow_global, ncol_global, nrow_block, ncol_block, descriptor, first_p_pos, local_leading_dimension, template_fmstruct, square_blocks, force_block)
allocates and initializes a full matrix structure
subroutine, public cp_fm_struct_release(fmstruct)
releases a full matrix structure
represent a full matrix distributed on many processors
subroutine, public cp_fm_get_diag(matrix, diag)
returns the diagonal elements of a fm
subroutine, public cp_fm_get_info(matrix, name, nrow_global, ncol_global, nrow_block, ncol_block, nrow_local, ncol_local, row_indices, col_indices, local_data, context, nrow_locals, ncol_locals, matrix_struct, para_env)
returns all kind of information about the full matrix
subroutine, public cp_fm_create(matrix, matrix_struct, name, nrow, ncol, set_zero)
creates a new full matrix with the given structure
Defines the basic variable types.
integer, parameter, public dp
basic linear algebra operations for full matrixes
computes preconditioners, and implements methods to apply them currently used in qs_ot
subroutine, public make_preconditioner_matrix(preconditioner_env, matrix_h, matrix_s, matrix_t, mo_coeff, energy_homo, eigenvalues_ot, energy_gap, my_solver_type)
...
keeps the information about the structure of a full matrix