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")
98 IF (
PRESENT(matrix_s))
THEN
99 CALL make_full_single(preconditioner_env, preconditioner_env%fm, &
100 matrix_h, matrix_s, energy_homo, energy_gap)
102 CALL make_full_single_ortho(preconditioner_env, preconditioner_env%fm, &
103 matrix_h, energy_homo, energy_gap)
108 IF (.NOT.
PRESENT(matrix_s)) &
109 cpabort(
"Type for S=1 not implemented")
110 CALL make_full_s_inverse(preconditioner_env, matrix_s)
114 IF (.NOT. (
PRESENT(matrix_s) .AND.
PRESENT(matrix_t))) &
115 cpabort(
"Type for S=1 not implemented")
116 CALL make_full_kinetic(preconditioner_env, matrix_t, matrix_s, energy_gap)
119 CALL make_full_single_inverse(preconditioner_env, mo_coeff, matrix_h, energy_gap, &
123 cpabort(
"Only PRECOND_SOLVER DEFAULT for the moment")
125 IF (
PRESENT(matrix_s))
THEN
126 CALL make_full_all(preconditioner_env, mo_coeff, matrix_h, matrix_s, &
127 eigenvalues_ot, energy_gap)
129 CALL make_full_all_ortho(preconditioner_env, mo_coeff, matrix_h, &
130 eigenvalues_ot, energy_gap)
134 cpabort(
"Type not implemented")
144 SUBROUTINE make_full_s_inverse(preconditioner_env, matrix_s)
148 CHARACTER(len=*),
PARAMETER :: routinen =
'make_full_s_inverse'
152 CALL timeset(routinen, handle)
154 cpassert(
ASSOCIATED(matrix_s))
156 IF (.NOT.
ASSOCIATED(preconditioner_env%sparse_matrix))
THEN
157 ALLOCATE (preconditioner_env%sparse_matrix)
159 CALL dbcsr_copy(preconditioner_env%sparse_matrix, matrix_s, name=
"full_kinetic")
161 CALL timestop(handle)
163 END SUBROUTINE make_full_s_inverse
173 SUBROUTINE make_full_kinetic(preconditioner_env, matrix_t, matrix_s, &
176 TYPE(
dbcsr_type),
POINTER :: matrix_t, matrix_s
177 REAL(kind=
dp) :: energy_gap
179 CHARACTER(len=*),
PARAMETER :: routinen =
'make_full_kinetic'
182 REAL(kind=
dp) :: shift
184 CALL timeset(routinen, handle)
186 cpassert(
ASSOCIATED(matrix_t))
187 cpassert(
ASSOCIATED(matrix_s))
189 IF (.NOT.
ASSOCIATED(preconditioner_env%sparse_matrix))
THEN
190 ALLOCATE (preconditioner_env%sparse_matrix)
192 CALL dbcsr_copy(preconditioner_env%sparse_matrix, matrix_t, name=
"full_kinetic")
194 shift = max(0.0_dp, energy_gap)
196 CALL dbcsr_add(preconditioner_env%sparse_matrix, matrix_s, &
197 alpha_scalar=1.0_dp, beta_scalar=shift)
199 CALL timestop(handle)
201 END SUBROUTINE make_full_kinetic
212 SUBROUTINE make_full_single(preconditioner_env, fm, matrix_h, matrix_s, &
213 energy_homo, energy_gap)
216 TYPE(
dbcsr_type),
POINTER :: matrix_h, matrix_s
217 REAL(kind=
dp) :: energy_homo, energy_gap
219 CHARACTER(len=*),
PARAMETER :: routinen =
'make_full_single'
221 INTEGER :: handle, i, n
222 REAL(kind=
dp),
DIMENSION(:),
POINTER :: evals
226 CALL timeset(routinen, handle)
228 NULLIFY (fm_struct_tmp, evals)
230 IF (
ASSOCIATED(fm))
THEN
239 context=preconditioner_env%ctxt, &
240 para_env=preconditioner_env%para_env)
242 CALL cp_fm_create(fm, fm_struct_tmp, name=
"preconditioner")
251 SELECT CASE (preconditioner_env%cholesky_use)
258 invert_tr=.false., uplo_tr=
"U", n_rows=n, n_cols=n, alpha=1.0_dp)
260 invert_tr=.false., uplo_tr=
"U", n_rows=n, n_cols=n, alpha=1.0_dp)
264 cpabort(
"cholesky type not implemented")
269 SELECT CASE (preconditioner_env%cholesky_use)
272 invert_tr=.false., uplo_tr=
"U", n_rows=n, n_cols=n, alpha=1.0_dp)
274 evals(i) = 1.0_dp/max(evals(i) - energy_homo, energy_gap)
280 evals(i) = 1.0_dp/max(evals(i) - energy_homo, energy_gap)
286 CALL parallel_gemm(
'N',
'T', n, n, n, 1.0_dp, fm, fm_h, 0.0_dp, fm_s)
293 CALL timestop(handle)
295 END SUBROUTINE make_full_single
305 SUBROUTINE make_full_single_ortho(preconditioner_env, fm, matrix_h, &
306 energy_homo, energy_gap)
310 REAL(kind=
dp) :: energy_homo, energy_gap
312 CHARACTER(len=*),
PARAMETER :: routinen =
'make_full_single_ortho'
314 INTEGER :: handle, i, n
315 REAL(kind=
dp),
DIMENSION(:),
POINTER :: evals
319 CALL timeset(routinen, handle)
320 NULLIFY (fm_struct_tmp, evals)
322 IF (
ASSOCIATED(fm))
THEN
331 context=preconditioner_env%ctxt, &
332 para_env=preconditioner_env%para_env)
334 CALL cp_fm_create(fm, fm_struct_tmp, name=
"preconditioner")
343 evals(i) = 1.0_dp/max(evals(i) - energy_homo, energy_gap)
347 CALL parallel_gemm(
'N',
'T', n, n, n, 1.0_dp, fm, fm_h, 0.0_dp, fm_s)
354 CALL timestop(handle)
356 END SUBROUTINE make_full_single_ortho
377 SUBROUTINE make_full_all(preconditioner_env, matrix_c0, matrix_h, matrix_s, c0_evals, energy_gap)
380 TYPE(
dbcsr_type),
POINTER :: matrix_h, matrix_s
381 REAL(kind=
dp),
DIMENSION(:) :: c0_evals
382 REAL(kind=
dp) :: energy_gap
384 CHARACTER(len=*),
PARAMETER :: routinen =
'make_full_all'
385 REAL(kind=
dp),
PARAMETER :: fudge_factor = 0.25_dp, &
386 lambda_base = 10.0_dp
388 INTEGER :: handle, k, n
389 REAL(kind=
dp) :: error_estimate, lambda
390 REAL(kind=
dp),
DIMENSION(:),
POINTER :: diag, norms, shifted_evals
392 TYPE(
cp_fm_type) :: matrix_hc0, matrix_left, matrix_s1, &
393 matrix_s2, matrix_sc0, matrix_shc0, &
397 CALL timeset(routinen, handle)
399 IF (
ASSOCIATED(preconditioner_env%fm))
THEN
401 DEALLOCATE (preconditioner_env%fm)
402 NULLIFY (preconditioner_env%fm)
406 context=preconditioner_env%ctxt, &
407 para_env=preconditioner_env%para_env)
408 ALLOCATE (preconditioner_env%fm)
409 CALL cp_fm_create(preconditioner_env%fm, fm_struct_tmp, name=
"preconditioner_env%fm")
411 CALL cp_fm_create(matrix_tmp, fm_struct_tmp, name=
"matrix_tmp")
413 ALLOCATE (preconditioner_env%full_evals(n))
414 ALLOCATE (preconditioner_env%occ_evals(k))
430 CALL cp_fm_create(matrix_sc0, matrix_c0%matrix_struct, name=
"sc0")
432 CALL cp_fm_create(matrix_hc0, matrix_c0%matrix_struct, name=
"hc0")
436 CALL cp_fm_create(matrix_shc0, matrix_c0%matrix_struct, name=
"shc0")
438 SELECT CASE (preconditioner_env%cholesky_use)
443 invert_tr=.false., uplo_tr=
"U", n_rows=n, n_cols=k, alpha=1.0_dp)
447 cpabort(
"cholesky type not implemented")
450 context=preconditioner_env%ctxt, &
451 para_env=preconditioner_env%para_env)
452 CALL cp_fm_create(matrix_s1, fm_struct_tmp, name=
"matrix_s1")
455 CALL parallel_gemm(
'T',
'N', k, k, n, 1.0_dp, matrix_shc0, matrix_shc0, 0.0_dp, matrix_s1)
458 error_estimate = maxval(sqrt(abs(diag - c0_evals**2)))
466 preconditioner_env%energy_gap = max(energy_gap, error_estimate*fudge_factor)
468 matrix_pre => preconditioner_env%fm
471 CALL parallel_gemm(
'N',
'T', n, n, k, -1.0_dp, matrix_hc0, matrix_sc0, 1.0_dp, matrix_tmp)
474 context=preconditioner_env%ctxt, &
475 para_env=preconditioner_env%para_env)
476 CALL cp_fm_create(matrix_left, fm_struct_tmp, name=
"matrix_left")
478 CALL parallel_gemm(
'T',
'N', k, n, n, 1.0_dp, matrix_c0, matrix_tmp, 0.0_dp, matrix_left)
480 CALL parallel_gemm(
'N',
'N', n, n, k, -1.0_dp, matrix_sc0, matrix_left, 1.0_dp, matrix_tmp)
483 ALLOCATE (shifted_evals(k))
484 lambda = lambda_base + error_estimate
485 shifted_evals = c0_evals - lambda
488 CALL parallel_gemm(
'N',
'T', n, n, k, 1.0_dp, matrix_hc0, matrix_sc0, 1.0_dp, matrix_tmp)
491 SELECT CASE (preconditioner_env%cholesky_use)
494 invert_tr=.false., uplo_tr=
"U", n_rows=n, n_cols=n, alpha=1.0_dp)
496 invert_tr=.false., uplo_tr=
"U", n_rows=n, n_cols=n, alpha=1.0_dp)
501 SELECT CASE (preconditioner_env%cholesky_use)
504 invert_tr=.false., uplo_tr=
"U", n_rows=n, n_cols=n, alpha=1.0_dp)
514 context=preconditioner_env%ctxt, &
515 para_env=preconditioner_env%para_env)
516 CALL cp_fm_create(matrix_s1, fm_struct_tmp, name=
"matrix_s1")
517 CALL cp_fm_create(matrix_s2, fm_struct_tmp, name=
"matrix_s2")
520 CALL parallel_gemm(
'T',
'N', k, k, n, 1.0_dp, matrix_sc0, matrix_tmp, 0.0_dp, matrix_s1)
522 WRITE (*, *)
"matrix norm deviation (should be close to zero): ", maxval(abs(abs(norms) - 1.0_dp))
529 preconditioner_env%occ_evals = c0_evals
531 preconditioner_env%full_evals(1:k) = c0_evals
538 DEALLOCATE (shifted_evals)
539 CALL timestop(handle)
541 END SUBROUTINE make_full_all
551 SUBROUTINE make_full_all_ortho(preconditioner_env, matrix_c0, matrix_h, c0_evals, energy_gap)
556 REAL(kind=
dp),
DIMENSION(:) :: c0_evals
557 REAL(kind=
dp) :: energy_gap
559 CHARACTER(len=*),
PARAMETER :: routinen =
'make_full_all_ortho'
560 REAL(kind=
dp),
PARAMETER :: fudge_factor = 0.25_dp, &
561 lambda_base = 10.0_dp
563 INTEGER :: handle, k, n
564 REAL(kind=
dp) :: error_estimate, lambda
565 REAL(kind=
dp),
DIMENSION(:),
POINTER :: diag, norms, shifted_evals
567 TYPE(
cp_fm_type) :: matrix_hc0, matrix_left, matrix_s1, &
568 matrix_s2, matrix_sc0, matrix_tmp
571 CALL timeset(routinen, handle)
573 IF (
ASSOCIATED(preconditioner_env%fm))
THEN
575 DEALLOCATE (preconditioner_env%fm)
576 NULLIFY (preconditioner_env%fm)
580 context=preconditioner_env%ctxt, &
581 para_env=preconditioner_env%para_env)
582 ALLOCATE (preconditioner_env%fm)
583 CALL cp_fm_create(preconditioner_env%fm, fm_struct_tmp, name=
"preconditioner_env%fm")
584 CALL cp_fm_create(matrix_tmp, fm_struct_tmp, name=
"matrix_tmp")
586 ALLOCATE (preconditioner_env%full_evals(n))
587 ALLOCATE (preconditioner_env%occ_evals(k))
595 CALL cp_fm_create(matrix_sc0, matrix_c0%matrix_struct, name=
"sc0")
597 CALL cp_fm_create(matrix_hc0, matrix_c0%matrix_struct, name=
"hc0")
602 context=preconditioner_env%ctxt, &
603 para_env=preconditioner_env%para_env)
604 CALL cp_fm_create(matrix_s1, fm_struct_tmp, name=
"matrix_s1")
607 CALL parallel_gemm(
'T',
'N', k, k, n, 1.0_dp, matrix_hc0, matrix_hc0, 0.0_dp, matrix_s1)
610 error_estimate = maxval(sqrt(abs(diag - c0_evals**2)))
617 preconditioner_env%energy_gap = max(energy_gap, error_estimate*fudge_factor)
619 matrix_pre => preconditioner_env%fm
623 CALL parallel_gemm(
'N',
'T', n, n, k, -1.0_dp, matrix_hc0, matrix_sc0, 1.0_dp, matrix_tmp)
626 context=preconditioner_env%ctxt, &
627 para_env=preconditioner_env%para_env)
628 CALL cp_fm_create(matrix_left, fm_struct_tmp, name=
"matrix_left")
630 CALL parallel_gemm(
'T',
'N', k, n, n, 1.0_dp, matrix_c0, matrix_tmp, 0.0_dp, matrix_left)
632 CALL parallel_gemm(
'N',
'N', n, n, k, -1.0_dp, matrix_sc0, matrix_left, 1.0_dp, matrix_tmp)
635 ALLOCATE (shifted_evals(k))
636 lambda = lambda_base + error_estimate
637 shifted_evals = c0_evals - lambda
640 CALL parallel_gemm(
'N',
'T', n, n, k, 1.0_dp, matrix_hc0, matrix_sc0, 1.0_dp, matrix_tmp)
649 context=preconditioner_env%ctxt, &
650 para_env=preconditioner_env%para_env)
651 CALL cp_fm_create(matrix_s1, fm_struct_tmp, name=
"matrix_s1")
652 CALL cp_fm_create(matrix_s2, fm_struct_tmp, name=
"matrix_s2")
655 CALL parallel_gemm(
'T',
'N', k, k, n, 1.0_dp, matrix_sc0, matrix_tmp, 0.0_dp, matrix_s1)
658 WRITE (*, *)
"matrix norm deviation (should be close to zero): ", maxval(abs(abs(norms) - 1.0_dp))
665 preconditioner_env%occ_evals = c0_evals
667 preconditioner_env%full_evals(1:k) = c0_evals
673 DEALLOCATE (shifted_evals)
675 CALL timestop(handle)
677 END SUBROUTINE make_full_all_ortho
696 SUBROUTINE make_full_single_inverse(preconditioner_env, matrix_c0, matrix_h, energy_gap, matrix_s)
700 REAL(kind=
dp) :: energy_gap
701 TYPE(
dbcsr_type),
OPTIONAL,
POINTER :: matrix_s
703 CHARACTER(len=*),
PARAMETER :: routinen =
'make_full_single_inverse'
705 INTEGER :: handle, k, n
706 REAL(kind=
dp) :: max_ev, min_ev, pre_shift
707 TYPE(arnoldi_env_type) :: arnoldi_env
709 TYPE(
dbcsr_type),
TARGET :: dbcsr_cthc, dbcsr_hc, dbcsr_sc, mo_dbcsr
711 CALL timeset(routinen, handle)
723 IF (.NOT.
ASSOCIATED(preconditioner_env%sparse_matrix))
THEN
724 ALLOCATE (preconditioner_env%sparse_matrix)
728 CALL dbcsr_copy(preconditioner_env%sparse_matrix, matrix_h)
732 IF (
PRESENT(matrix_s))
THEN
733 CALL dbcsr_multiply(
"N",
"N", 1.0_dp, matrix_s, mo_dbcsr, 0.0_dp, dbcsr_sc)
740 CALL dbcsr_multiply(
"N",
"N", 1.0_dp, matrix_h, mo_dbcsr, 0.0_dp, dbcsr_hc)
741 CALL dbcsr_multiply(
"T",
"N", 1.0_dp, mo_dbcsr, dbcsr_hc, 0.0_dp, dbcsr_cthc)
744 ALLOCATE (matrices(1))
745 matrices(1)%matrix => dbcsr_cthc
746 CALL setup_arnoldi_env(arnoldi_env, matrices, max_iter=20, threshold=1.0e-3_dp, selection_crit=2, &
747 nval_request=1, nrestarts=8, generalized_ev=.false., iram=.false.)
748 IF (
ASSOCIATED(preconditioner_env%max_ev_vector)) &
749 CALL set_arnoldi_initial_vector(arnoldi_env, preconditioner_env%max_ev_vector)
751 max_ev = real(get_selected_ritz_val(arnoldi_env, 1),
dp)
754 IF (.NOT.
ASSOCIATED(preconditioner_env%max_ev_vector))
ALLOCATE (preconditioner_env%max_ev_vector)
755 CALL get_selected_ritz_vector(arnoldi_env, 1, matrices(1)%matrix, preconditioner_env%max_ev_vector)
756 CALL deallocate_arnoldi_env(arnoldi_env)
757 DEALLOCATE (matrices)
762 CALL dbcsr_multiply(
"N",
"N", 2.0_dp, dbcsr_sc, dbcsr_cthc, 0.0_dp, dbcsr_hc)
763 CALL dbcsr_multiply(
"N",
"T", -1.0_dp, dbcsr_hc, dbcsr_sc, 1.0_dp, preconditioner_env%sparse_matrix)
767 IF (
PRESENT(matrix_s))
THEN
768 ALLOCATE (matrices(2))
769 matrices(1)%matrix => preconditioner_env%sparse_matrix
770 matrices(2)%matrix => matrix_s
771 CALL setup_arnoldi_env(arnoldi_env, matrices, max_iter=20, threshold=2.0e-2_dp, selection_crit=3, &
772 nval_request=1, nrestarts=21, generalized_ev=.true., iram=.false.)
774 ALLOCATE (matrices(1))
775 matrices(1)%matrix => preconditioner_env%sparse_matrix
776 CALL setup_arnoldi_env(arnoldi_env, matrices, max_iter=20, threshold=2.0e-2_dp, selection_crit=3, &
777 nval_request=1, nrestarts=8, generalized_ev=.false., iram=.false.)
779 IF (
ASSOCIATED(preconditioner_env%min_ev_vector)) &
780 CALL set_arnoldi_initial_vector(arnoldi_env, preconditioner_env%min_ev_vector)
784 min_ev = real(get_selected_ritz_val(arnoldi_env, 1),
dp)
787 IF (.NOT.
ASSOCIATED(preconditioner_env%min_ev_vector))
ALLOCATE (preconditioner_env%min_ev_vector)
788 CALL get_selected_ritz_vector(arnoldi_env, 1, matrices(1)%matrix, preconditioner_env%min_ev_vector)
789 CALL deallocate_arnoldi_env(arnoldi_env)
790 DEALLOCATE (matrices)
795 pre_shift = max(1.5_dp*(min_ev - max_ev), energy_gap)
796 IF (min_ev .LT. pre_shift)
THEN
797 pre_shift = pre_shift - min_ev
801 IF (
PRESENT(matrix_s))
THEN
802 CALL dbcsr_add(preconditioner_env%sparse_matrix, matrix_s, 1.0_dp, pre_shift)
812 CALL timestop(handle)
814 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_cholesky_restore(fm_matrix, neig, fm_matrixb, fm_matrixout, op, pos, transa)
...
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_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, use_sp)
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