Line data Source code
1 : !--------------------------------------------------------------------------------------------------!
2 : ! CP2K: A general program to perform molecular dynamics simulations !
3 : ! Copyright 2000-2024 CP2K developers group <https://cp2k.org> !
4 : ! !
5 : ! SPDX-License-Identifier: GPL-2.0-or-later !
6 : !--------------------------------------------------------------------------------------------------!
7 :
8 : MODULE cp_dbcsr_api
9 : USE kinds, ONLY: dp, int_8
10 : USE dbcsr_api, ONLY: &
11 : dbcsr_add_prv => dbcsr_add, &
12 : dbcsr_add_block_node_prv => dbcsr_add_block_node, &
13 : dbcsr_add_on_diag_prv => dbcsr_add_on_diag, &
14 : dbcsr_binary_read_prv => dbcsr_binary_read, &
15 : dbcsr_binary_write_prv => dbcsr_binary_write, &
16 : dbcsr_checksum_prv => dbcsr_checksum, &
17 : dbcsr_clear_prv => dbcsr_clear, &
18 : dbcsr_clear_mempools, &
19 : dbcsr_complete_redistribute_prv => dbcsr_complete_redistribute, &
20 : convert_csr_to_dbcsr_prv => dbcsr_convert_csr_to_dbcsr, &
21 : convert_dbcsr_to_csr_prv => dbcsr_convert_dbcsr_to_csr, &
22 : dbcsr_convert_offsets_to_sizes, &
23 : dbcsr_convert_sizes_to_offsets, &
24 : dbcsr_copy_prv => dbcsr_copy, &
25 : dbcsr_create_prv => dbcsr_create, &
26 : dbcsr_csr_create, &
27 : dbcsr_csr_create_from_dbcsr_prv => dbcsr_csr_create_from_dbcsr, &
28 : dbcsr_csr_dbcsr_blkrow_dist, dbcsr_csr_destroy, dbcsr_csr_eqrow_floor_dist, &
29 : dbcsr_csr_p_type, dbcsr_csr_print_sparsity, dbcsr_csr_type, dbcsr_csr_write, &
30 : dbcsr_desymmetrize_prv => dbcsr_desymmetrize, &
31 : dbcsr_distribute_prv => dbcsr_distribute, &
32 : dbcsr_distribution_get_prv => dbcsr_distribution_get, &
33 : dbcsr_distribution_get_num_images, &
34 : dbcsr_distribution_hold_prv => dbcsr_distribution_hold, &
35 : dbcsr_distribution_new_prv => dbcsr_distribution_new, &
36 : dbcsr_distribution_release_prv => dbcsr_distribution_release, &
37 : dbcsr_distribution_type_prv => dbcsr_distribution_type, &
38 : dbcsr_dot_prv => dbcsr_dot, &
39 : dbcsr_filter_prv => dbcsr_filter, &
40 : dbcsr_finalize_prv => dbcsr_finalize, &
41 : dbcsr_finalize_lib, &
42 : dbcsr_frobenius_norm_prv => dbcsr_frobenius_norm, &
43 : dbcsr_func_dtanh, dbcsr_func_inverse, dbcsr_func_tanh, &
44 : dbcsr_function_of_elements_prv => dbcsr_function_of_elements, &
45 : dbcsr_gershgorin_norm_prv => dbcsr_gershgorin_norm, &
46 : dbcsr_get_block_diag_prv => dbcsr_get_block_diag, &
47 : dbcsr_get_block_p_prv => dbcsr_get_block_p, &
48 : dbcsr_get_data_p_prv => dbcsr_get_data_p, &
49 : dbcsr_get_data_size_prv => dbcsr_get_data_size, &
50 : dbcsr_get_data_type_prv => dbcsr_get_data_type, &
51 : dbcsr_get_default_config, &
52 : dbcsr_get_diag_prv => dbcsr_get_diag, &
53 : dbcsr_get_info_prv => dbcsr_get_info, &
54 : dbcsr_get_matrix_type_prv => dbcsr_get_matrix_type, &
55 : dbcsr_get_num_blocks_prv => dbcsr_get_num_blocks, &
56 : dbcsr_get_occupation_prv => dbcsr_get_occupation, &
57 : dbcsr_get_stored_coordinates_prv => dbcsr_get_stored_coordinates, &
58 : dbcsr_hadamard_product_prv => dbcsr_hadamard_product, &
59 : dbcsr_has_symmetry_prv => dbcsr_has_symmetry, &
60 : dbcsr_init_lib, &
61 : dbcsr_init_random_prv => dbcsr_init_random, &
62 : dbcsr_iterator_blocks_left_prv => dbcsr_iterator_blocks_left, &
63 : dbcsr_iterator_next_block_prv => dbcsr_iterator_next_block, &
64 : dbcsr_iterator_start_prv => dbcsr_iterator_start, &
65 : dbcsr_iterator_stop_prv => dbcsr_iterator_stop, &
66 : dbcsr_iterator_type_prv => dbcsr_iterator_type, &
67 : dbcsr_maxabs_prv => dbcsr_maxabs, &
68 : dbcsr_mp_grid_setup_prv => dbcsr_mp_grid_setup, &
69 : dbcsr_multiply_prv => dbcsr_multiply, &
70 : dbcsr_nblkcols_total_prv => dbcsr_nblkcols_total, &
71 : dbcsr_nblkrows_total_prv => dbcsr_nblkrows_total, &
72 : dbcsr_nfullcols_total_prv => dbcsr_nfullcols_total, &
73 : dbcsr_nfullrows_total_prv => dbcsr_nfullrows_total, &
74 : dbcsr_no_transpose, &
75 : dbcsr_norm_prv => dbcsr_norm, &
76 : dbcsr_norm_column, dbcsr_norm_frobenius, dbcsr_norm_maxabsnorm, &
77 : dbcsr_print_prv => dbcsr_print, &
78 : dbcsr_print_block_sum_prv => dbcsr_print_block_sum, &
79 : dbcsr_print_config, dbcsr_print_statistics, &
80 : dbcsr_put_block_prv => dbcsr_put_block, &
81 : dbcsr_release_prv => dbcsr_release, &
82 : dbcsr_replicate_all_prv => dbcsr_replicate_all, &
83 : dbcsr_reserve_all_blocks_prv => dbcsr_reserve_all_blocks, &
84 : dbcsr_reserve_block2d_prv => dbcsr_reserve_block2d, &
85 : dbcsr_reserve_blocks_prv => dbcsr_reserve_blocks, &
86 : dbcsr_reserve_diag_blocks_prv => dbcsr_reserve_diag_blocks, &
87 : dbcsr_reset_randmat_seed, dbcsr_run_tests, &
88 : dbcsr_scale_prv => dbcsr_scale, &
89 : dbcsr_scale_by_vector_prv => dbcsr_scale_by_vector, &
90 : dbcsr_set_prv => dbcsr_set, &
91 : dbcsr_set_config, &
92 : dbcsr_set_diag_prv => dbcsr_set_diag, &
93 : dbcsr_setname_prv => dbcsr_setname, &
94 : dbcsr_sum_replicated_prv => dbcsr_sum_replicated, &
95 : dbcsr_test_binary_io, dbcsr_test_mm, &
96 : dbcsr_trace_prv => dbcsr_trace, &
97 : dbcsr_transpose, &
98 : dbcsr_transposed_prv => dbcsr_transposed, &
99 : dbcsr_triu_prv => dbcsr_triu, &
100 : dbcsr_type_prv => dbcsr_type, &
101 : dbcsr_type_antisymmetric, dbcsr_type_complex_8, &
102 : dbcsr_type_complex_default, dbcsr_type_no_symmetry, dbcsr_type_real_8, &
103 : dbcsr_type_real_default, dbcsr_type_symmetric, &
104 : dbcsr_valid_index_prv => dbcsr_valid_index, &
105 : dbcsr_verify_matrix_prv => dbcsr_verify_matrix, &
106 : dbcsr_work_create_prv => dbcsr_work_create
107 :
108 : #include "../base/base_uses.f90"
109 :
110 : IMPLICIT NONE
111 : PRIVATE
112 :
113 : ! constants
114 : PUBLIC :: dbcsr_type_no_symmetry
115 : PUBLIC :: dbcsr_type_symmetric
116 : PUBLIC :: dbcsr_type_antisymmetric
117 : PUBLIC :: dbcsr_transpose
118 : PUBLIC :: dbcsr_no_transpose
119 : PUBLIC :: dbcsr_type_complex_8
120 : PUBLIC :: dbcsr_type_real_8
121 : PUBLIC :: dbcsr_type_complex_default
122 : PUBLIC :: dbcsr_type_real_default
123 :
124 : ! types
125 : PUBLIC :: dbcsr_type
126 : PUBLIC :: dbcsr_p_type
127 : PUBLIC :: dbcsr_distribution_type
128 : PUBLIC :: dbcsr_iterator_type
129 :
130 : ! lib init/finalize
131 : PUBLIC :: dbcsr_clear_mempools
132 : PUBLIC :: dbcsr_init_lib
133 : PUBLIC :: dbcsr_finalize_lib
134 : PUBLIC :: dbcsr_set_config
135 : PUBLIC :: dbcsr_get_default_config
136 : PUBLIC :: dbcsr_print_config
137 : PUBLIC :: dbcsr_reset_randmat_seed
138 : PUBLIC :: dbcsr_mp_grid_setup
139 : PUBLIC :: dbcsr_print_statistics
140 :
141 : ! create / release
142 : PUBLIC :: dbcsr_distribution_hold
143 : PUBLIC :: dbcsr_distribution_release
144 : PUBLIC :: dbcsr_distribution_new
145 : PUBLIC :: dbcsr_create
146 : PUBLIC :: dbcsr_init_p
147 : PUBLIC :: dbcsr_release
148 : PUBLIC :: dbcsr_release_p
149 : PUBLIC :: dbcsr_deallocate_matrix
150 :
151 : ! primitive matrix operations
152 : PUBLIC :: dbcsr_set
153 : PUBLIC :: dbcsr_add
154 : PUBLIC :: dbcsr_scale
155 : PUBLIC :: dbcsr_scale_by_vector
156 : PUBLIC :: dbcsr_transposed
157 : PUBLIC :: dbcsr_multiply
158 : PUBLIC :: dbcsr_copy
159 : PUBLIC :: dbcsr_desymmetrize
160 : PUBLIC :: dbcsr_add_on_diag
161 : PUBLIC :: dbcsr_get_block_diag
162 : PUBLIC :: dbcsr_set_diag
163 : PUBLIC :: dbcsr_get_diag
164 : PUBLIC :: dbcsr_filter
165 : PUBLIC :: dbcsr_trace
166 : PUBLIC :: dbcsr_dot
167 : PUBLIC :: dbcsr_complete_redistribute
168 : PUBLIC :: dbcsr_get_block_p
169 : PUBLIC :: dbcsr_clear
170 :
171 : ! block reservation
172 : PUBLIC :: dbcsr_reserve_diag_blocks
173 : PUBLIC :: dbcsr_reserve_block2d
174 : PUBLIC :: dbcsr_reserve_blocks
175 : PUBLIC :: dbcsr_reserve_all_blocks
176 :
177 : ! iterator
178 : PUBLIC :: dbcsr_iterator_start
179 : PUBLIC :: dbcsr_iterator_stop
180 : PUBLIC :: dbcsr_iterator_blocks_left
181 : PUBLIC :: dbcsr_iterator_next_block
182 :
183 : ! getters / setters
184 : PUBLIC :: dbcsr_get_info
185 : PUBLIC :: dbcsr_distribution_get
186 : PUBLIC :: dbcsr_setname
187 : PUBLIC :: dbcsr_get_matrix_type
188 : PUBLIC :: dbcsr_get_occupation
189 : PUBLIC :: dbcsr_nblkrows_total
190 : PUBLIC :: dbcsr_nblkcols_total
191 : PUBLIC :: dbcsr_get_num_blocks
192 : PUBLIC :: dbcsr_get_data_size
193 : PUBLIC :: dbcsr_has_symmetry
194 : PUBLIC :: dbcsr_nfullrows_total
195 : PUBLIC :: dbcsr_nfullcols_total
196 : PUBLIC :: dbcsr_get_stored_coordinates
197 : PUBLIC :: dbcsr_valid_index
198 : PUBLIC :: dbcsr_get_data_type
199 :
200 : ! work operations
201 : PUBLIC :: dbcsr_add_block_node
202 : PUBLIC :: dbcsr_put_block
203 : PUBLIC :: dbcsr_work_create
204 : PUBLIC :: dbcsr_verify_matrix
205 : PUBLIC :: dbcsr_get_data_p
206 : PUBLIC :: dbcsr_finalize
207 :
208 : ! replication
209 : PUBLIC :: dbcsr_replicate_all
210 : PUBLIC :: dbcsr_sum_replicated
211 : PUBLIC :: dbcsr_distribute
212 :
213 : ! misc
214 : PUBLIC :: dbcsr_distribution_get_num_images
215 : PUBLIC :: dbcsr_convert_offsets_to_sizes
216 : PUBLIC :: dbcsr_convert_sizes_to_offsets
217 : PUBLIC :: dbcsr_run_tests
218 : PUBLIC :: dbcsr_test_mm
219 :
220 : ! high level matrix functions
221 : PUBLIC :: dbcsr_norm_frobenius
222 : PUBLIC :: dbcsr_norm_maxabsnorm
223 : PUBLIC :: dbcsr_norm_column
224 : PUBLIC :: dbcsr_hadamard_product
225 : PUBLIC :: dbcsr_func_dtanh
226 : PUBLIC :: dbcsr_func_inverse
227 : PUBLIC :: dbcsr_func_tanh
228 : PUBLIC :: dbcsr_print
229 : PUBLIC :: dbcsr_print_block_sum
230 : PUBLIC :: dbcsr_checksum
231 : PUBLIC :: dbcsr_maxabs
232 : PUBLIC :: dbcsr_norm
233 : PUBLIC :: dbcsr_gershgorin_norm
234 : PUBLIC :: dbcsr_frobenius_norm
235 : PUBLIC :: dbcsr_init_random
236 : PUBLIC :: dbcsr_function_of_elements
237 : PUBLIC :: dbcsr_triu
238 :
239 : ! csr conversion
240 : PUBLIC :: dbcsr_csr_type
241 : PUBLIC :: dbcsr_csr_p_type
242 : PUBLIC :: dbcsr_convert_csr_to_dbcsr
243 : PUBLIC :: dbcsr_convert_dbcsr_to_csr
244 : PUBLIC :: dbcsr_csr_create_from_dbcsr
245 : PUBLIC :: dbcsr_csr_destroy
246 : PUBLIC :: dbcsr_csr_create
247 : PUBLIC :: dbcsr_csr_eqrow_floor_dist
248 : PUBLIC :: dbcsr_csr_dbcsr_blkrow_dist
249 : PUBLIC :: dbcsr_csr_print_sparsity
250 : PUBLIC :: dbcsr_csr_write
251 :
252 : ! binary io
253 : PUBLIC :: dbcsr_binary_write
254 : PUBLIC :: dbcsr_binary_read
255 : PUBLIC :: dbcsr_test_binary_io
256 :
257 : TYPE dbcsr_p_type
258 : TYPE(dbcsr_type), POINTER :: matrix => Null()
259 : END TYPE
260 :
261 : TYPE dbcsr_type
262 : TYPE(dbcsr_type_prv), PRIVATE :: prv = dbcsr_type_prv()
263 : END TYPE dbcsr_type
264 :
265 : TYPE dbcsr_distribution_type
266 : TYPE(dbcsr_distribution_type_prv), PRIVATE :: prv = dbcsr_distribution_type_prv()
267 : END TYPE dbcsr_distribution_type
268 :
269 : TYPE dbcsr_iterator_type
270 : TYPE(dbcsr_iterator_type_prv), PRIVATE :: prv = dbcsr_iterator_type_prv()
271 : END TYPE dbcsr_iterator_type
272 :
273 : INTERFACE dbcsr_add
274 : MODULE PROCEDURE dbcsr_add_d, dbcsr_add_z
275 : END INTERFACE
276 :
277 : INTERFACE dbcsr_add_on_diag
278 : MODULE PROCEDURE dbcsr_add_on_diag_d, dbcsr_add_on_diag_z
279 : END INTERFACE
280 :
281 : INTERFACE dbcsr_create
282 : MODULE PROCEDURE dbcsr_create_new, dbcsr_create_template
283 : END INTERFACE
284 :
285 : INTERFACE dbcsr_dot
286 : MODULE PROCEDURE dbcsr_dot_d, dbcsr_dot_z
287 : END INTERFACE
288 :
289 : INTERFACE dbcsr_get_block_p
290 : MODULE PROCEDURE dbcsr_get_block_p_d, dbcsr_get_block_p_z
291 : MODULE PROCEDURE dbcsr_get_2d_block_p_d, dbcsr_get_2d_block_p_z
292 : END INTERFACE
293 :
294 : INTERFACE dbcsr_get_data_p
295 : MODULE PROCEDURE dbcsr_get_data_d, dbcsr_get_data_z
296 : END INTERFACE
297 :
298 : INTERFACE dbcsr_get_diag
299 : MODULE PROCEDURE dbcsr_get_diag_d, dbcsr_get_diag_z
300 : END INTERFACE
301 :
302 : INTERFACE dbcsr_iterator_next_block
303 : MODULE PROCEDURE dbcsr_iterator_next_block_index
304 : MODULE PROCEDURE dbcsr_iterator_next_1d_block_d, dbcsr_iterator_next_1d_block_z
305 : MODULE PROCEDURE dbcsr_iterator_next_2d_block_d, dbcsr_iterator_next_2d_block_z
306 : END INTERFACE
307 :
308 : INTERFACE dbcsr_multiply
309 : MODULE PROCEDURE dbcsr_multiply_d, dbcsr_multiply_z
310 : END INTERFACE
311 :
312 : INTERFACE dbcsr_norm
313 : MODULE PROCEDURE dbcsr_norm_scalar, dbcsr_norm_vector
314 : END INTERFACE
315 :
316 : INTERFACE dbcsr_put_block
317 : MODULE PROCEDURE dbcsr_put_block_d, dbcsr_put_block_z
318 : MODULE PROCEDURE dbcsr_put_block2d_d, dbcsr_put_block2d_z
319 : END INTERFACE
320 :
321 : INTERFACE dbcsr_reserve_block2d
322 : MODULE PROCEDURE dbcsr_reserve_block2d_d, dbcsr_reserve_block2d_z
323 : END INTERFACE
324 :
325 : INTERFACE dbcsr_scale
326 : MODULE PROCEDURE dbcsr_scale_d, dbcsr_scale_z
327 : END INTERFACE
328 :
329 : INTERFACE dbcsr_scale_by_vector
330 : MODULE PROCEDURE dbcsr_scale_by_vector_d, dbcsr_scale_by_vector_z
331 : END INTERFACE
332 :
333 : INTERFACE dbcsr_set
334 : MODULE PROCEDURE dbcsr_set_d, dbcsr_set_z
335 : END INTERFACE
336 :
337 : INTERFACE dbcsr_set_diag
338 : MODULE PROCEDURE dbcsr_set_diag_d, dbcsr_set_diag_z
339 : END INTERFACE
340 :
341 : INTERFACE dbcsr_trace
342 : MODULE PROCEDURE dbcsr_trace_d, dbcsr_trace_z
343 : END INTERFACE
344 :
345 : CONTAINS
346 :
347 : ! **************************************************************************************************
348 : !> \brief ...
349 : ! **************************************************************************************************
350 306484 : SUBROUTINE dbcsr_init_p(matrix)
351 : TYPE(dbcsr_type), POINTER :: matrix
352 :
353 306484 : IF (ASSOCIATED(matrix)) THEN
354 13106 : CALL dbcsr_release(matrix)
355 13106 : DEALLOCATE (matrix)
356 : END IF
357 :
358 306484 : ALLOCATE (matrix)
359 306484 : END SUBROUTINE dbcsr_init_p
360 :
361 : ! **************************************************************************************************
362 : !> \brief ...
363 : ! **************************************************************************************************
364 220276 : SUBROUTINE dbcsr_release_p(matrix)
365 : TYPE(dbcsr_type), POINTER :: matrix
366 :
367 220276 : IF (ASSOCIATED(matrix)) THEN
368 219594 : CALL dbcsr_release(matrix)
369 219594 : DEALLOCATE (matrix)
370 : END IF
371 220276 : END SUBROUTINE dbcsr_release_p
372 :
373 : ! **************************************************************************************************
374 : !> \brief ...
375 : ! **************************************************************************************************
376 1131863 : SUBROUTINE dbcsr_deallocate_matrix(matrix)
377 : TYPE(dbcsr_type), POINTER :: matrix
378 1131863 : CALL dbcsr_release(matrix)
379 1131863 : IF (dbcsr_valid_index(matrix)) &
380 : CALL cp_abort(__LOCATION__, &
381 : 'You should not "deallocate" a referenced matrix. '// &
382 0 : 'Avoid pointers to DBCSR matrices.')
383 1131863 : DEALLOCATE (matrix)
384 1131863 : END SUBROUTINE dbcsr_deallocate_matrix
385 :
386 : ! **************************************************************************************************
387 : !> \brief ...
388 : ! **************************************************************************************************
389 : #:for nametype1, type1 in [('d', 'REAL(kind=dp)'), ('z', 'COMPLEX(kind=dp)')]
390 1981006 : SUBROUTINE dbcsr_add_${nametype1}$ (matrix_a, matrix_b, alpha_scalar, beta_scalar)
391 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix_a
392 : TYPE(dbcsr_type), INTENT(IN) :: matrix_b
393 : ${type1}$, INTENT(IN) :: alpha_scalar, beta_scalar
394 :
395 1981006 : CALL dbcsr_add_prv(matrix_a%prv, matrix_b%prv, alpha_scalar, beta_scalar)
396 1981006 : END SUBROUTINE dbcsr_add_${nametype1}$
397 : #:endfor
398 :
399 : ! **************************************************************************************************
400 : !> \brief ...
401 : ! **************************************************************************************************
402 0 : SUBROUTINE dbcsr_add_block_node(matrix, block_row, block_col, block)
403 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
404 : INTEGER, INTENT(IN) :: block_row, block_col
405 : REAL(KIND=dp), DIMENSION(:, :), POINTER :: block
406 :
407 0 : CALL dbcsr_add_block_node_prv(matrix%prv, block_row, block_col, block)
408 0 : END SUBROUTINE dbcsr_add_block_node
409 :
410 : ! **************************************************************************************************
411 : !> \brief ...
412 : ! **************************************************************************************************
413 : #:for nametype1, type1 in [('d', 'REAL(kind=dp)'), ('z', 'COMPLEX(kind=dp)')]
414 431530 : SUBROUTINE dbcsr_add_on_diag_${nametype1}$ (matrix, alpha_scalar)
415 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
416 : ${type1}$, INTENT(IN) :: alpha_scalar
417 :
418 431530 : CALL dbcsr_add_on_diag_prv(matrix%prv, alpha_scalar)
419 431530 : END SUBROUTINE dbcsr_add_on_diag_${nametype1}$
420 : #:endfor
421 :
422 : ! **************************************************************************************************
423 : !> \brief ...
424 : ! **************************************************************************************************
425 36 : SUBROUTINE dbcsr_binary_read(filepath, distribution, matrix_new)
426 : CHARACTER(len=*), INTENT(IN) :: filepath
427 : TYPE(dbcsr_distribution_type), INTENT(IN) :: distribution
428 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix_new
429 :
430 36 : CALL dbcsr_binary_read_prv(filepath, distribution%prv, matrix_new%prv)
431 36 : END SUBROUTINE dbcsr_binary_read
432 :
433 : ! **************************************************************************************************
434 : !> \brief ...
435 : ! **************************************************************************************************
436 278 : SUBROUTINE dbcsr_binary_write(matrix, filepath)
437 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
438 : CHARACTER(LEN=*), INTENT(IN) :: filepath
439 :
440 278 : CALL dbcsr_binary_write_prv(matrix%prv, filepath)
441 278 : END SUBROUTINE dbcsr_binary_write
442 :
443 : ! **************************************************************************************************
444 : !> \brief ...
445 : ! **************************************************************************************************
446 15448 : FUNCTION dbcsr_checksum(matrix, pos) RESULT(checksum)
447 : TYPE(dbcsr_type), INTENT(IN) :: matrix
448 : LOGICAL, INTENT(IN), OPTIONAL :: pos
449 : REAL(KIND=dp) :: checksum
450 :
451 15448 : checksum = dbcsr_checksum_prv(matrix%prv, pos=pos)
452 15448 : END FUNCTION dbcsr_checksum
453 :
454 : ! **************************************************************************************************
455 : !> \brief ...
456 : ! **************************************************************************************************
457 34754 : SUBROUTINE dbcsr_clear(matrix)
458 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
459 :
460 34754 : CALL dbcsr_clear_prv(matrix%prv)
461 34754 : END SUBROUTINE
462 :
463 : ! **************************************************************************************************
464 : !> \brief ...
465 : ! **************************************************************************************************
466 2053939 : SUBROUTINE dbcsr_complete_redistribute(matrix, redist)
467 : TYPE(dbcsr_type), INTENT(IN) :: matrix
468 : TYPE(dbcsr_type), INTENT(INOUT) :: redist
469 :
470 2053939 : CALL dbcsr_complete_redistribute_prv(matrix%prv, redist%prv)
471 2053939 : END SUBROUTINE dbcsr_complete_redistribute
472 :
473 : ! **************************************************************************************************
474 : !> \brief ...
475 : ! **************************************************************************************************
476 188 : SUBROUTINE dbcsr_convert_csr_to_dbcsr(dbcsr_mat, csr_mat)
477 : TYPE(dbcsr_type), INTENT(INOUT) :: dbcsr_mat
478 : TYPE(dbcsr_csr_type), INTENT(INOUT) :: csr_mat
479 :
480 188 : CALL convert_csr_to_dbcsr_prv(dbcsr_mat%prv, csr_mat)
481 188 : END SUBROUTINE dbcsr_convert_csr_to_dbcsr
482 :
483 : ! **************************************************************************************************
484 : !> \brief ...
485 : ! **************************************************************************************************
486 408 : SUBROUTINE dbcsr_convert_dbcsr_to_csr(dbcsr_mat, csr_mat)
487 : TYPE(dbcsr_type), INTENT(IN) :: dbcsr_mat
488 : TYPE(dbcsr_csr_type), INTENT(INOUT) :: csr_mat
489 :
490 408 : CALL convert_dbcsr_to_csr_prv(dbcsr_mat%prv, csr_mat)
491 408 : END SUBROUTINE dbcsr_convert_dbcsr_to_csr
492 :
493 : ! **************************************************************************************************
494 : !> \brief ...
495 : ! **************************************************************************************************
496 3747774 : SUBROUTINE dbcsr_copy(matrix_b, matrix_a, name, keep_sparsity, keep_imaginary)
497 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix_b
498 : TYPE(dbcsr_type), INTENT(IN) :: matrix_a
499 : CHARACTER(LEN=*), INTENT(IN), OPTIONAL :: name
500 : LOGICAL, INTENT(IN), OPTIONAL :: keep_sparsity, keep_imaginary
501 :
502 : CALL dbcsr_copy_prv(matrix_b%prv, matrix_a%prv, name=name, keep_sparsity=keep_sparsity, &
503 6545677 : keep_imaginary=keep_imaginary)
504 3747774 : END SUBROUTINE dbcsr_copy
505 :
506 : ! **************************************************************************************************
507 : !> \brief ...
508 : ! **************************************************************************************************
509 4251607 : SUBROUTINE dbcsr_create_new(matrix, name, dist, matrix_type, row_blk_size, col_blk_size, nze, &
510 : data_type, reuse_arrays, mutable_work)
511 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
512 : CHARACTER(len=*), INTENT(IN) :: name
513 : TYPE(dbcsr_distribution_type), INTENT(IN) :: dist
514 : CHARACTER, INTENT(IN) :: matrix_type
515 : INTEGER, DIMENSION(:), INTENT(INOUT), POINTER :: row_blk_size, col_blk_size
516 : INTEGER, INTENT(IN), OPTIONAL :: nze, data_type
517 : LOGICAL, INTENT(IN), OPTIONAL :: reuse_arrays, mutable_work
518 :
519 : CALL dbcsr_create_prv(matrix=matrix%prv, name=name, dist=dist%prv, matrix_type=matrix_type, &
520 : row_blk_size=row_blk_size, col_blk_size=col_blk_size, nze=nze, &
521 : data_type=data_type, reuse_arrays=reuse_arrays, &
522 4251607 : mutable_work=mutable_work)
523 4251607 : END SUBROUTINE dbcsr_create_new
524 :
525 : ! **************************************************************************************************
526 : !> \brief ...
527 : ! **************************************************************************************************
528 2122226 : SUBROUTINE dbcsr_create_template(matrix, name, template, dist, matrix_type, &
529 : row_blk_size, col_blk_size, nze, data_type, &
530 : reuse_arrays, mutable_work)
531 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
532 : CHARACTER(len=*), INTENT(IN), OPTIONAL :: name
533 : TYPE(dbcsr_type), INTENT(IN) :: template
534 : TYPE(dbcsr_distribution_type), INTENT(IN), &
535 : OPTIONAL :: dist
536 : CHARACTER, INTENT(IN), OPTIONAL :: matrix_type
537 : INTEGER, DIMENSION(:), INTENT(INOUT), OPTIONAL, &
538 : POINTER :: row_blk_size, col_blk_size
539 : INTEGER, INTENT(IN), OPTIONAL :: nze, data_type
540 : LOGICAL, INTENT(IN), OPTIONAL :: reuse_arrays, mutable_work
541 :
542 : CALL dbcsr_create_prv(matrix=matrix%prv, name=name, template=template%prv, dist=dist%prv, &
543 : matrix_type=matrix_type, &
544 : row_blk_size=row_blk_size, col_blk_size=col_blk_size, &
545 : nze=nze, data_type=data_type, reuse_arrays=reuse_arrays, &
546 4162352 : mutable_work=mutable_work)
547 2122226 : END SUBROUTINE dbcsr_create_template
548 :
549 : ! **************************************************************************************************
550 : !> \brief ...
551 : ! **************************************************************************************************
552 220 : SUBROUTINE dbcsr_csr_create_from_dbcsr(dbcsr_mat, csr_mat, dist_format, csr_sparsity, numnodes)
553 :
554 : TYPE(dbcsr_type), INTENT(IN) :: dbcsr_mat
555 : TYPE(dbcsr_csr_type), INTENT(OUT) :: csr_mat
556 : INTEGER :: dist_format
557 : TYPE(dbcsr_type), INTENT(IN), OPTIONAL :: csr_sparsity
558 : INTEGER, INTENT(IN), OPTIONAL :: numnodes
559 :
560 220 : IF (PRESENT(csr_sparsity)) THEN
561 : CALL dbcsr_csr_create_from_dbcsr_prv(dbcsr_mat%prv, csr_mat, dist_format, &
562 14 : csr_sparsity%prv, numnodes)
563 : ELSE
564 206 : CALL dbcsr_csr_create_from_dbcsr_prv(dbcsr_mat%prv, csr_mat, dist_format, numnodes=numnodes)
565 : END IF
566 220 : END SUBROUTINE dbcsr_csr_create_from_dbcsr
567 :
568 : ! **************************************************************************************************
569 : !> \brief ...
570 : ! **************************************************************************************************
571 1151093 : SUBROUTINE dbcsr_desymmetrize(matrix_a, matrix_b)
572 : TYPE(dbcsr_type), INTENT(IN) :: matrix_a
573 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix_b
574 :
575 1151093 : CALL dbcsr_desymmetrize_prv(matrix_a%prv, matrix_b%prv)
576 1151093 : END SUBROUTINE dbcsr_desymmetrize
577 :
578 : ! **************************************************************************************************
579 : !> \brief ...
580 : ! **************************************************************************************************
581 52616 : SUBROUTINE dbcsr_distribute(matrix)
582 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
583 :
584 52616 : CALL dbcsr_distribute_prv(matrix%prv)
585 52616 : END SUBROUTINE dbcsr_distribute
586 :
587 : ! **************************************************************************************************
588 : !> \brief ...
589 : ! **************************************************************************************************
590 6350091 : SUBROUTINE dbcsr_distribution_get(dist, row_dist, col_dist, nrows, ncols, has_threads, &
591 : group, mynode, numnodes, nprows, npcols, myprow, mypcol, &
592 : pgrid, subgroups_defined, prow_group, pcol_group)
593 : TYPE(dbcsr_distribution_type), INTENT(IN) :: dist
594 : INTEGER, DIMENSION(:), OPTIONAL, POINTER :: row_dist, col_dist
595 : INTEGER, INTENT(OUT), OPTIONAL :: nrows, ncols
596 : LOGICAL, INTENT(OUT), OPTIONAL :: has_threads
597 : INTEGER, INTENT(OUT), OPTIONAL :: group, mynode, numnodes, &
598 : nprows, npcols, myprow, mypcol
599 : INTEGER, DIMENSION(:, :), OPTIONAL, POINTER :: pgrid
600 : LOGICAL, INTENT(OUT), OPTIONAL :: subgroups_defined
601 : INTEGER, INTENT(OUT), OPTIONAL :: prow_group, pcol_group
602 :
603 : call dbcsr_distribution_get_prv(dist%prv, row_dist, col_dist, nrows, ncols, has_threads, &
604 : group, mynode, numnodes, nprows, npcols, myprow, mypcol, &
605 6350091 : pgrid, subgroups_defined, prow_group, pcol_group)
606 6350091 : END SUBROUTINE dbcsr_distribution_get
607 :
608 : ! **************************************************************************************************
609 : !> \brief ...
610 : ! **************************************************************************************************
611 844 : SUBROUTINE dbcsr_distribution_hold(dist)
612 : TYPE(dbcsr_distribution_type) :: dist
613 :
614 844 : CALL dbcsr_distribution_hold_prv(dist%prv)
615 844 : END SUBROUTINE dbcsr_distribution_hold
616 :
617 : ! **************************************************************************************************
618 : !> \brief ...
619 : ! **************************************************************************************************
620 3923233 : SUBROUTINE dbcsr_distribution_new(dist, template, group, pgrid, row_dist, col_dist, reuse_arrays)
621 : TYPE(dbcsr_distribution_type), INTENT(OUT) :: dist
622 : TYPE(dbcsr_distribution_type), INTENT(IN), &
623 : OPTIONAL :: template
624 : INTEGER, INTENT(IN), OPTIONAL :: group
625 : INTEGER, DIMENSION(:, :), OPTIONAL, POINTER :: pgrid
626 : INTEGER, DIMENSION(:), INTENT(INOUT), POINTER :: row_dist, col_dist
627 : LOGICAL, INTENT(IN), OPTIONAL :: reuse_arrays
628 :
629 : CALL dbcsr_distribution_new_prv(dist%prv, template%prv, group, pgrid, &
630 3923233 : row_dist, col_dist, reuse_arrays)
631 3923233 : END SUBROUTINE dbcsr_distribution_new
632 :
633 : ! **************************************************************************************************
634 : !> \brief ...
635 : ! **************************************************************************************************
636 3924077 : SUBROUTINE dbcsr_distribution_release(dist)
637 : TYPE(dbcsr_distribution_type) :: dist
638 :
639 3924077 : CALL dbcsr_distribution_release_prv(dist%prv)
640 3924077 : END SUBROUTINE dbcsr_distribution_release
641 :
642 : ! **************************************************************************************************
643 : !> \brief ...
644 : ! **************************************************************************************************
645 : #:for nametype1, type1 in [('d', 'REAL(kind=dp)'), ('z', 'COMPLEX(kind=dp)')]
646 1835546 : SUBROUTINE dbcsr_dot_${nametype1}$ (matrix_a, matrix_b, result)
647 : TYPE(dbcsr_type), INTENT(IN) :: matrix_a, matrix_b
648 : ${type1}$, INTENT(INOUT) :: result
649 :
650 1835546 : CALL dbcsr_dot_prv(matrix_a%prv, matrix_b%prv, result)
651 1835546 : END SUBROUTINE dbcsr_dot_${nametype1}$
652 : #:endfor
653 :
654 : ! **************************************************************************************************
655 : !> \brief ...
656 : ! **************************************************************************************************
657 544778 : SUBROUTINE dbcsr_filter(matrix, eps)
658 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
659 : REAL(dp), INTENT(IN) :: eps
660 :
661 544778 : CALL dbcsr_filter_prv(matrix%prv, eps)
662 544778 : END SUBROUTINE dbcsr_filter
663 :
664 : ! **************************************************************************************************
665 : !> \brief ...
666 : ! **************************************************************************************************
667 1794991 : SUBROUTINE dbcsr_finalize(matrix)
668 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
669 :
670 1794991 : CALL dbcsr_finalize_prv(matrix%prv)
671 1794991 : END SUBROUTINE dbcsr_finalize
672 :
673 : ! **************************************************************************************************
674 : !> \brief ...
675 : ! **************************************************************************************************
676 367350 : FUNCTION dbcsr_frobenius_norm(matrix) RESULT(norm)
677 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
678 : REAL(KIND=dp) :: norm
679 :
680 367350 : norm = dbcsr_frobenius_norm_prv(matrix%prv)
681 367350 : END FUNCTION dbcsr_frobenius_norm
682 :
683 : ! **************************************************************************************************
684 : !> \brief ...
685 : ! **************************************************************************************************
686 0 : SUBROUTINE dbcsr_function_of_elements(matrix, func, a0, a1, a2)
687 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
688 : INTEGER, INTENT(IN) :: func
689 : REAL(kind=dp), INTENT(IN), OPTIONAL :: a0, a1, a2
690 :
691 0 : CALL dbcsr_function_of_elements_prv(matrix%prv, func, a0, a1, a2)
692 0 : END SUBROUTINE dbcsr_function_of_elements
693 :
694 : ! **************************************************************************************************
695 : !> \brief ...
696 : ! **************************************************************************************************
697 7642 : FUNCTION dbcsr_gershgorin_norm(matrix) RESULT(norm)
698 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
699 : REAL(KIND=dp) :: norm
700 :
701 7642 : norm = dbcsr_gershgorin_norm_prv(matrix%prv)
702 7642 : END FUNCTION dbcsr_gershgorin_norm
703 :
704 : ! **************************************************************************************************
705 : !> \brief ...
706 : ! **************************************************************************************************
707 103600 : SUBROUTINE dbcsr_get_block_diag(matrix, diag)
708 : TYPE(dbcsr_type), INTENT(IN) :: matrix
709 : TYPE(dbcsr_type), INTENT(INOUT) :: diag
710 :
711 103600 : CALL dbcsr_get_block_diag_prv(matrix%prv, diag%prv)
712 103600 : END SUBROUTINE dbcsr_get_block_diag
713 :
714 : ! **************************************************************************************************
715 : !> \brief ...
716 : ! **************************************************************************************************
717 : #:for nametype1, type1 in [('d', 'REAL(kind=dp)'), ('z', 'COMPLEX(kind=dp)')]
718 218661 : SUBROUTINE dbcsr_get_block_p_${nametype1}$ (matrix, row, col, block, found, row_size, col_size)
719 : TYPE(dbcsr_type), INTENT(IN) :: matrix
720 : INTEGER, INTENT(IN) :: row, col
721 : ${type1}$, DIMENSION(:), POINTER :: block
722 : LOGICAL, INTENT(OUT) :: found
723 : INTEGER, INTENT(OUT), OPTIONAL :: row_size, col_size
724 :
725 218661 : CALL dbcsr_get_block_p_prv(matrix%prv, row, col, block, found, row_size, col_size)
726 218661 : END SUBROUTINE dbcsr_get_block_p_${nametype1}$
727 : #:endfor
728 :
729 : ! **************************************************************************************************
730 : !> \brief ...
731 : ! **************************************************************************************************
732 : #:for nametype1, type1 in [('d', 'REAL(kind=dp)'), ('z', 'COMPLEX(kind=dp)')]
733 183320169 : SUBROUTINE dbcsr_get_2d_block_p_${nametype1}$ (matrix, row, col, block, found, row_size, col_size)
734 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
735 : INTEGER, INTENT(IN) :: row, col
736 : ${type1}$, DIMENSION(:, :), POINTER :: block
737 : LOGICAL, INTENT(OUT) :: found
738 : INTEGER, INTENT(OUT), OPTIONAL :: row_size, col_size
739 :
740 183320169 : CALL dbcsr_get_block_p_prv(matrix%prv, row, col, block, found, row_size, col_size)
741 183320169 : END SUBROUTINE dbcsr_get_2d_block_p_${nametype1}$
742 : #:endfor
743 :
744 : ! **************************************************************************************************
745 : !> \brief ...
746 : ! **************************************************************************************************
747 : #:for nametype1, type1 in [('d', 'REAL(kind=dp)'), ('z', 'COMPLEX(kind=dp)')]
748 5103373 : FUNCTION dbcsr_get_data_${nametype1}$ (matrix, select_data_type, lb, ub) RESULT(res)
749 : TYPE(dbcsr_type), INTENT(IN) :: matrix
750 : ${type1}$, INTENT(IN) :: select_data_type
751 : ${type1}$, DIMENSION(:), POINTER :: res
752 : INTEGER, INTENT(IN), OPTIONAL :: lb, ub
753 :
754 5103373 : res => dbcsr_get_data_p_prv(matrix%prv, select_data_type, lb, ub)
755 5103373 : END FUNCTION dbcsr_get_data_${nametype1}$
756 : #:endfor
757 :
758 : ! **************************************************************************************************
759 : !> \brief ...
760 : ! **************************************************************************************************
761 92 : FUNCTION dbcsr_get_data_size(matrix) RESULT(data_size)
762 : TYPE(dbcsr_type), INTENT(IN) :: matrix
763 : INTEGER :: data_size
764 :
765 92 : data_size = dbcsr_get_data_size_prv(matrix%prv)
766 92 : END FUNCTION dbcsr_get_data_size
767 :
768 : ! **************************************************************************************************
769 : !> \brief ...
770 : ! **************************************************************************************************
771 1234385 : PURE FUNCTION dbcsr_get_data_type(matrix) RESULT(data_type)
772 : TYPE(dbcsr_type), INTENT(IN) :: matrix
773 : INTEGER :: data_type
774 :
775 1234385 : data_type = dbcsr_get_data_type_prv(matrix%prv)
776 1234385 : END FUNCTION dbcsr_get_data_type
777 :
778 : ! **************************************************************************************************
779 : !> \brief ...
780 : ! **************************************************************************************************
781 : #:for nametype1, type1 in [('d', 'REAL(kind=dp)'), ('z', 'COMPLEX(kind=dp)')]
782 2666 : SUBROUTINE dbcsr_get_diag_${nametype1}$ (matrix, diag)
783 : TYPE(dbcsr_type), INTENT(IN) :: matrix
784 : ${type1}$, DIMENSION(:), INTENT(OUT) :: diag
785 :
786 2666 : CALL dbcsr_get_diag_prv(matrix%prv, diag)
787 2666 : END SUBROUTINE dbcsr_get_diag_${nametype1}$
788 : #:endfor
789 :
790 : ! **************************************************************************************************
791 : !> \brief ...
792 : ! **************************************************************************************************
793 21229218 : SUBROUTINE dbcsr_get_info(matrix, nblkrows_total, nblkcols_total, &
794 : nfullrows_total, nfullcols_total, nblkrows_local, nblkcols_local, &
795 : nfullrows_local, nfullcols_local, my_prow, my_pcol, &
796 : local_rows, local_cols, proc_row_dist, proc_col_dist, &
797 : row_blk_size, col_blk_size, row_blk_offset, col_blk_offset, &
798 : distribution, name, matrix_type, data_type, group)
799 : TYPE(dbcsr_type), INTENT(IN) :: matrix
800 : INTEGER, INTENT(OUT), OPTIONAL :: nblkrows_total, nblkcols_total, nfullrows_total, &
801 : nfullcols_total, nblkrows_local, nblkcols_local, &
802 : nfullrows_local, nfullcols_local, my_prow, my_pcol
803 : INTEGER, DIMENSION(:), OPTIONAL, POINTER :: local_rows, local_cols, &
804 : proc_row_dist, proc_col_dist, &
805 : row_blk_size, col_blk_size, &
806 : row_blk_offset, col_blk_offset
807 : TYPE(dbcsr_distribution_type), INTENT(OUT), &
808 : OPTIONAL :: distribution
809 : CHARACTER(len=*), INTENT(OUT), OPTIONAL :: name
810 : CHARACTER, INTENT(OUT), OPTIONAL :: matrix_type
811 : INTEGER, INTENT(OUT), OPTIONAL :: data_type, group
812 :
813 : TYPE(dbcsr_distribution_type_prv) :: my_distribution
814 :
815 : CALL dbcsr_get_info_prv(matrix=matrix%prv, &
816 : nblkrows_total=nblkrows_total, &
817 : nblkcols_total=nblkcols_total, &
818 : nfullrows_total=nfullrows_total, &
819 : nfullcols_total=nfullcols_total, &
820 : nblkrows_local=nblkrows_local, &
821 : nblkcols_local=nblkcols_local, &
822 : nfullrows_local=nfullrows_local, &
823 : nfullcols_local=nfullcols_local, &
824 : my_prow=my_prow, &
825 : my_pcol=my_pcol, &
826 : local_rows=local_rows, &
827 : local_cols=local_cols, &
828 : proc_row_dist=proc_row_dist, &
829 : proc_col_dist=proc_col_dist, &
830 : row_blk_size=row_blk_size, &
831 : col_blk_size=col_blk_size, &
832 : row_blk_offset=row_blk_offset, &
833 : col_blk_offset=col_blk_offset, &
834 : distribution=my_distribution, &
835 : name=name, &
836 : matrix_type=matrix_type, &
837 : data_type=data_type, &
838 61032800 : group=group)
839 :
840 21229218 : IF (PRESENT(distribution)) distribution%prv = my_distribution
841 :
842 21229218 : END SUBROUTINE dbcsr_get_info
843 :
844 : ! **************************************************************************************************
845 : !> \brief ...
846 : ! **************************************************************************************************
847 1048498 : PURE FUNCTION dbcsr_get_matrix_type(matrix) RESULT(matrix_type)
848 : TYPE(dbcsr_type), INTENT(IN) :: matrix
849 : CHARACTER :: matrix_type
850 :
851 1048498 : matrix_type = dbcsr_get_matrix_type_prv(matrix%prv)
852 1048498 : END FUNCTION dbcsr_get_matrix_type
853 :
854 : ! **************************************************************************************************
855 : !> \brief ...
856 : ! **************************************************************************************************
857 61318 : PURE FUNCTION dbcsr_get_num_blocks(matrix) RESULT(num_blocks)
858 : TYPE(dbcsr_type), INTENT(IN) :: matrix
859 : INTEGER :: num_blocks
860 :
861 61318 : num_blocks = dbcsr_get_num_blocks_prv(matrix%prv)
862 61318 : END FUNCTION dbcsr_get_num_blocks
863 :
864 : ! **************************************************************************************************
865 : !> \brief ...
866 : ! **************************************************************************************************
867 226690 : FUNCTION dbcsr_get_occupation(matrix) RESULT(occupation)
868 : TYPE(dbcsr_type), INTENT(IN) :: matrix
869 : REAL(KIND=dp) :: occupation
870 :
871 226690 : occupation = dbcsr_get_occupation_prv(matrix%prv)
872 226690 : END FUNCTION dbcsr_get_occupation
873 :
874 : ! **************************************************************************************************
875 : !> \brief ...
876 : ! **************************************************************************************************
877 393339 : SUBROUTINE dbcsr_get_stored_coordinates(matrix, row, column, processor)
878 : TYPE(dbcsr_type), INTENT(IN) :: matrix
879 : INTEGER, INTENT(IN) :: row, column
880 : INTEGER, INTENT(OUT) :: processor
881 :
882 393339 : CALL dbcsr_get_stored_coordinates_prv(matrix%prv, row, column, processor)
883 393339 : END SUBROUTINE dbcsr_get_stored_coordinates
884 :
885 : ! **************************************************************************************************
886 : !> \brief ...
887 : ! **************************************************************************************************
888 57148 : SUBROUTINE dbcsr_hadamard_product(matrix_a, matrix_b, matrix_c, b_assume_value)
889 : TYPE(dbcsr_type), INTENT(IN) :: matrix_a, matrix_b
890 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix_c
891 : REAL(KIND=dp), INTENT(IN), OPTIONAL :: b_assume_value
892 :
893 57148 : CALL dbcsr_hadamard_product_prv(matrix_a%prv, matrix_b%prv, matrix_c%prv, b_assume_value)
894 57148 : END SUBROUTINE dbcsr_hadamard_product
895 :
896 : ! **************************************************************************************************
897 : !> \brief ...
898 : ! **************************************************************************************************
899 454665 : PURE FUNCTION dbcsr_has_symmetry(matrix) RESULT(has_symmetry)
900 : TYPE(dbcsr_type), INTENT(IN) :: matrix
901 : LOGICAL :: has_symmetry
902 :
903 454665 : has_symmetry = dbcsr_has_symmetry_prv(matrix%prv)
904 454665 : END FUNCTION dbcsr_has_symmetry
905 :
906 : ! **************************************************************************************************
907 : !> \brief ...
908 : ! **************************************************************************************************
909 236 : SUBROUTINE dbcsr_init_random(matrix, keep_sparsity)
910 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
911 : LOGICAL, OPTIONAL :: keep_sparsity
912 :
913 236 : CALL dbcsr_init_random_prv(matrix%prv, keep_sparsity=keep_sparsity)
914 236 : END SUBROUTINE dbcsr_init_random
915 :
916 : ! **************************************************************************************************
917 : !> \brief ...
918 : ! **************************************************************************************************
919 79471712 : PURE FUNCTION dbcsr_iterator_blocks_left(iterator) RESULT(blocks_left)
920 : TYPE(dbcsr_iterator_type), INTENT(IN) :: iterator
921 : LOGICAL :: blocks_left
922 :
923 79471712 : blocks_left = dbcsr_iterator_blocks_left_prv(iterator%prv)
924 79471712 : END FUNCTION dbcsr_iterator_blocks_left
925 :
926 : ! **************************************************************************************************
927 : !> \brief ...
928 : ! **************************************************************************************************
929 822895 : SUBROUTINE dbcsr_iterator_next_block_index(iterator, row, column, blk)
930 : TYPE(dbcsr_iterator_type), INTENT(INOUT) :: iterator
931 : INTEGER, INTENT(OUT) :: row, column, blk
932 :
933 822895 : CALL dbcsr_iterator_next_block_prv(iterator%prv, row=row, column=column, blk=blk)
934 822895 : END SUBROUTINE dbcsr_iterator_next_block_index
935 :
936 : ! **************************************************************************************************
937 : !> \brief ...
938 : ! **************************************************************************************************
939 : #:for nametype1, type1 in [('d', 'REAL(kind=dp)'), ('z', 'COMPLEX(kind=dp)')]
940 203670 : SUBROUTINE dbcsr_iterator_next_1d_block_${nametype1}$ (iterator, row, column, block, &
941 : block_number, row_size, col_size, &
942 : row_offset, col_offset)
943 : TYPE(dbcsr_iterator_type), INTENT(INOUT) :: iterator
944 : INTEGER, INTENT(OUT) :: row, column
945 : ${type1}$, DIMENSION(:), POINTER :: block
946 : INTEGER, INTENT(OUT), OPTIONAL :: block_number, row_size, col_size, &
947 : row_offset, col_offset
948 :
949 : CALL dbcsr_iterator_next_block_prv(iterator%prv, row, column, block, block_number, &
950 203670 : row_size, col_size, row_offset, col_offset)
951 203670 : END SUBROUTINE dbcsr_iterator_next_1d_block_${nametype1}$
952 : #:endfor
953 :
954 : ! **************************************************************************************************
955 : !> \brief ...
956 : ! **************************************************************************************************
957 : #:for nametype1, type1 in [('d', 'REAL(kind=dp)'), ('z', 'COMPLEX(kind=dp)')]
958 68733353 : SUBROUTINE dbcsr_iterator_next_2d_block_${nametype1}$ (iterator, row, column, block, &
959 : block_number, row_size, col_size, &
960 : row_offset, col_offset)
961 : TYPE(dbcsr_iterator_type), INTENT(INOUT) :: iterator
962 : INTEGER, INTENT(OUT) :: row, column
963 : ${type1}$, DIMENSION(:, :), POINTER :: block
964 : INTEGER, INTENT(OUT), OPTIONAL :: block_number, row_size, col_size, &
965 : row_offset, col_offset
966 :
967 : CALL dbcsr_iterator_next_block_prv(iterator%prv, row, column, block, block_number, &
968 68733353 : row_size, col_size, row_offset, col_offset)
969 68733353 : END SUBROUTINE dbcsr_iterator_next_2d_block_${nametype1}$
970 : #:endfor
971 :
972 : ! **************************************************************************************************
973 : !> \brief ...
974 : ! **************************************************************************************************
975 9977794 : SUBROUTINE dbcsr_iterator_start(iterator, matrix, shared, dynamic, dynamic_byrows, read_only)
976 : TYPE(dbcsr_iterator_type), INTENT(OUT) :: iterator
977 : TYPE(dbcsr_type), INTENT(IN) :: matrix
978 : LOGICAL, INTENT(IN), OPTIONAL :: shared, dynamic, dynamic_byrows, &
979 : read_only
980 :
981 : CALL dbcsr_iterator_start_prv(iterator%prv, matrix%prv, shared, dynamic, dynamic_byrows, &
982 9977794 : read_only)
983 9977794 : END SUBROUTINE dbcsr_iterator_start
984 :
985 : ! **************************************************************************************************
986 : !> \brief ...
987 : ! **************************************************************************************************
988 9977794 : SUBROUTINE dbcsr_iterator_stop(iterator)
989 : TYPE(dbcsr_iterator_type), INTENT(INOUT) :: iterator
990 :
991 9977794 : CALL dbcsr_iterator_stop_prv(iterator%prv)
992 9977794 : END SUBROUTINE dbcsr_iterator_stop
993 :
994 : ! **************************************************************************************************
995 : !> \brief ...
996 : ! **************************************************************************************************
997 28 : FUNCTION dbcsr_maxabs(matrix) RESULT(norm)
998 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
999 : REAL(KIND=dp) :: norm
1000 :
1001 28 : norm = dbcsr_maxabs_prv(matrix%prv)
1002 28 : END FUNCTION dbcsr_maxabs
1003 :
1004 : ! **************************************************************************************************
1005 : !> \brief ...
1006 : ! **************************************************************************************************
1007 130233 : SUBROUTINE dbcsr_mp_grid_setup(dist)
1008 : TYPE(dbcsr_distribution_type), INTENT(INOUT) :: dist
1009 :
1010 130233 : CALL dbcsr_mp_grid_setup_prv(dist%prv)
1011 130233 : END SUBROUTINE dbcsr_mp_grid_setup
1012 :
1013 : ! **************************************************************************************************
1014 : !> \brief ...
1015 : ! **************************************************************************************************
1016 : #:for nametype1, type1 in [('d', 'REAL(kind=dp)'), ('z', 'COMPLEX(kind=dp)')]
1017 3158068 : SUBROUTINE dbcsr_multiply_${nametype1}$ (transa, transb, alpha, matrix_a, matrix_b, beta, &
1018 : matrix_c, first_row, last_row, &
1019 : first_column, last_column, first_k, last_k, &
1020 : retain_sparsity, filter_eps, flop)
1021 : CHARACTER(LEN=1), INTENT(IN) :: transa, transb
1022 : ${type1}$, INTENT(IN) :: alpha
1023 : TYPE(dbcsr_type), INTENT(IN) :: matrix_a, matrix_b
1024 : ${type1}$, INTENT(IN) :: beta
1025 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix_c
1026 : INTEGER, INTENT(IN), OPTIONAL :: first_row, last_row, &
1027 : first_column, last_column, &
1028 : first_k, last_k
1029 : LOGICAL, INTENT(IN), OPTIONAL :: retain_sparsity
1030 : REAL(kind=dp), INTENT(IN), OPTIONAL :: filter_eps
1031 : INTEGER(int_8), INTENT(OUT), OPTIONAL :: flop
1032 :
1033 : CALL dbcsr_multiply_prv(transa, transb, alpha, matrix_a%prv, matrix_b%prv, beta, &
1034 : matrix_c%prv, first_row, last_row, first_column, last_column, &
1035 3158068 : first_k, last_k, retain_sparsity, filter_eps=filter_eps, flop=flop)
1036 3158068 : END SUBROUTINE dbcsr_multiply_${nametype1}$
1037 : #:endfor
1038 :
1039 : ! **************************************************************************************************
1040 : !> \brief ...
1041 : ! **************************************************************************************************
1042 8030 : FUNCTION dbcsr_nblkcols_total(matrix) RESULT(nblkcols_total)
1043 : TYPE(dbcsr_type), INTENT(IN) :: matrix
1044 : INTEGER :: nblkcols_total
1045 :
1046 8030 : nblkcols_total = dbcsr_nblkcols_total_prv(matrix%prv)
1047 8030 : END FUNCTION dbcsr_nblkcols_total
1048 :
1049 : ! **************************************************************************************************
1050 : !> \brief ...
1051 : ! **************************************************************************************************
1052 11690 : FUNCTION dbcsr_nblkrows_total(matrix) RESULT(nblkrows_total)
1053 : TYPE(dbcsr_type), INTENT(IN) :: matrix
1054 : INTEGER :: nblkrows_total
1055 :
1056 11690 : nblkrows_total = dbcsr_nblkrows_total_prv(matrix%prv)
1057 11690 : END FUNCTION dbcsr_nblkrows_total
1058 :
1059 : ! **************************************************************************************************
1060 : !> \brief ...
1061 : ! **************************************************************************************************
1062 42 : FUNCTION dbcsr_nfullcols_total(matrix) RESULT(nfullcols_total)
1063 : TYPE(dbcsr_type), INTENT(IN) :: matrix
1064 : INTEGER :: nfullcols_total
1065 :
1066 42 : nfullcols_total = dbcsr_nfullcols_total_prv(matrix%prv)
1067 42 : END FUNCTION dbcsr_nfullcols_total
1068 :
1069 : ! **************************************************************************************************
1070 : !> \brief ...
1071 : ! **************************************************************************************************
1072 940 : FUNCTION dbcsr_nfullrows_total(matrix) RESULT(nfullrows_total)
1073 : TYPE(dbcsr_type), INTENT(IN) :: matrix
1074 : INTEGER :: nfullrows_total
1075 :
1076 940 : nfullrows_total = dbcsr_nfullrows_total_prv(matrix%prv)
1077 940 : END FUNCTION dbcsr_nfullrows_total
1078 :
1079 : ! **************************************************************************************************
1080 : !> \brief ...
1081 : ! **************************************************************************************************
1082 12838 : SUBROUTINE dbcsr_norm_scalar(matrix, which_norm, norm_scalar)
1083 : TYPE(dbcsr_type), INTENT(INOUT), TARGET :: matrix
1084 : INTEGER, INTENT(IN) :: which_norm
1085 : REAL(dp), INTENT(OUT) :: norm_scalar
1086 :
1087 12838 : CALL dbcsr_norm_prv(matrix%prv, which_norm, norm_scalar)
1088 12838 : END SUBROUTINE dbcsr_norm_scalar
1089 :
1090 : ! **************************************************************************************************
1091 : !> \brief ...
1092 : ! **************************************************************************************************
1093 88 : SUBROUTINE dbcsr_norm_vector(matrix, which_norm, norm_vector)
1094 : TYPE(dbcsr_type), INTENT(INOUT), TARGET :: matrix
1095 : INTEGER, INTENT(IN) :: which_norm
1096 : REAL(dp), DIMENSION(:), INTENT(OUT) :: norm_vector
1097 :
1098 88 : CALL dbcsr_norm_prv(matrix%prv, which_norm, norm_vector)
1099 88 : END SUBROUTINE dbcsr_norm_vector
1100 :
1101 : ! **************************************************************************************************
1102 : !> \brief ...
1103 : ! **************************************************************************************************
1104 0 : SUBROUTINE dbcsr_print(matrix, nodata, matlab_format, variable_name, unit_nr)
1105 : TYPE(dbcsr_type), INTENT(IN) :: matrix
1106 : LOGICAL, INTENT(IN), OPTIONAL :: nodata, matlab_format
1107 : CHARACTER(*), INTENT(in), OPTIONAL :: variable_name
1108 : INTEGER, OPTIONAL :: unit_nr
1109 :
1110 0 : CALL dbcsr_print_prv(matrix%prv, nodata, matlab_format, variable_name, unit_nr)
1111 0 : END SUBROUTINE dbcsr_print
1112 :
1113 : ! **************************************************************************************************
1114 : !> \brief ...
1115 : ! **************************************************************************************************
1116 4 : SUBROUTINE dbcsr_print_block_sum(matrix, unit_nr)
1117 : TYPE(dbcsr_type), INTENT(IN) :: matrix
1118 : INTEGER, OPTIONAL :: unit_nr
1119 :
1120 4 : CALL dbcsr_print_block_sum_prv(matrix%prv, unit_nr)
1121 4 : END SUBROUTINE dbcsr_print_block_sum
1122 :
1123 : ! **************************************************************************************************
1124 : !> \brief ...
1125 : ! **************************************************************************************************
1126 : #:for nametype1, type1 in [('d', 'REAL(kind=dp)'), ('z', 'COMPLEX(kind=dp)')]
1127 173820 : SUBROUTINE dbcsr_put_block2d_${nametype1}$ (matrix, row, col, block, summation)
1128 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
1129 : INTEGER, INTENT(IN) :: row, col
1130 : ${type1}$, DIMENSION(:, :), INTENT(IN) :: block
1131 : LOGICAL, INTENT(IN), OPTIONAL :: summation
1132 :
1133 173820 : CALL dbcsr_put_block_prv(matrix%prv, row, col, block, summation=summation)
1134 173820 : END SUBROUTINE dbcsr_put_block2d_${nametype1}$
1135 : #:endfor
1136 :
1137 : ! **************************************************************************************************
1138 : !> \brief ...
1139 : ! **************************************************************************************************
1140 : #:for nametype1, type1 in [('d', 'REAL(kind=dp)'), ('z', 'COMPLEX(kind=dp)')]
1141 49744 : SUBROUTINE dbcsr_put_block_${nametype1}$ (matrix, row, col, block, summation)
1142 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
1143 : INTEGER, INTENT(IN) :: row, col
1144 : ${type1}$, DIMENSION(:), INTENT(IN) :: block
1145 : LOGICAL, INTENT(IN), OPTIONAL :: summation
1146 :
1147 49744 : CALL dbcsr_put_block_prv(matrix%prv, row, col, block, summation=summation)
1148 49744 : END SUBROUTINE dbcsr_put_block_${nametype1}$
1149 : #:endfor
1150 :
1151 : ! **************************************************************************************************
1152 : !> \brief ...
1153 : ! **************************************************************************************************
1154 7601161 : SUBROUTINE dbcsr_release(matrix)
1155 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
1156 :
1157 7601161 : CALL dbcsr_release_prv(matrix%prv)
1158 7601161 : END SUBROUTINE dbcsr_release
1159 :
1160 : ! **************************************************************************************************
1161 : !> \brief ...
1162 : ! **************************************************************************************************
1163 101022 : SUBROUTINE dbcsr_replicate_all(matrix)
1164 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
1165 :
1166 101022 : CALL dbcsr_replicate_all_prv(matrix%prv)
1167 101022 : END SUBROUTINE dbcsr_replicate_all
1168 :
1169 : ! **************************************************************************************************
1170 : !> \brief ...
1171 : ! **************************************************************************************************
1172 1595232 : SUBROUTINE dbcsr_reserve_all_blocks(matrix)
1173 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
1174 :
1175 1595232 : CALL dbcsr_reserve_all_blocks_prv(matrix%prv)
1176 1595232 : END SUBROUTINE dbcsr_reserve_all_blocks
1177 :
1178 : ! **************************************************************************************************
1179 : !> \brief ...
1180 : ! **************************************************************************************************
1181 : #:for nametype1, type1 in [('d', 'REAL(kind=dp)'), ('z', 'COMPLEX(kind=dp)')]
1182 49557 : SUBROUTINE dbcsr_reserve_block2d_${nametype1}$ (matrix, row, col, block)
1183 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
1184 : INTEGER, INTENT(IN) :: row, col
1185 : ${type1}$, DIMENSION(:, :), POINTER :: block
1186 :
1187 49557 : CALL dbcsr_reserve_block2d_prv(matrix%prv, row, col, block)
1188 49557 : END SUBROUTINE dbcsr_reserve_block2d_${nametype1}$
1189 : #:endfor
1190 :
1191 : ! **************************************************************************************************
1192 : !> \brief ...
1193 : ! **************************************************************************************************
1194 765660 : SUBROUTINE dbcsr_reserve_blocks(matrix, rows, cols)
1195 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
1196 : INTEGER, DIMENSION(:), INTENT(IN) :: rows, cols
1197 :
1198 765660 : CALL dbcsr_reserve_blocks_prv(matrix%prv, rows, cols)
1199 765660 : END SUBROUTINE dbcsr_reserve_blocks
1200 :
1201 : ! **************************************************************************************************
1202 : !> \brief ...
1203 : ! **************************************************************************************************
1204 40092 : SUBROUTINE dbcsr_reserve_diag_blocks(matrix)
1205 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
1206 :
1207 40092 : CALL dbcsr_reserve_diag_blocks_prv(matrix%prv)
1208 40092 : END SUBROUTINE dbcsr_reserve_diag_blocks
1209 :
1210 : ! **************************************************************************************************
1211 : !> \brief ...
1212 : ! **************************************************************************************************
1213 : #:for nametype1, type1 in [('d', 'REAL(kind=dp)'), ('z', 'COMPLEX(kind=dp)')]
1214 401661 : SUBROUTINE dbcsr_scale_${nametype1}$ (matrix, alpha_scalar)
1215 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
1216 : ${type1}$, INTENT(IN) :: alpha_scalar
1217 :
1218 401661 : CALL dbcsr_scale_prv(matrix%prv, alpha_scalar)
1219 401661 : END SUBROUTINE dbcsr_scale_${nametype1}$
1220 : #:endfor
1221 :
1222 : ! **************************************************************************************************
1223 : !> \brief ...
1224 : ! **************************************************************************************************
1225 : #:for nametype1, type1 in [('d', 'REAL(kind=dp)'), ('z', 'COMPLEX(kind=dp)')]
1226 159494 : SUBROUTINE dbcsr_scale_by_vector_${nametype1}$ (matrix, alpha, side)
1227 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
1228 : ${type1}$, DIMENSION(:), INTENT(IN), TARGET :: alpha
1229 : CHARACTER(LEN=*), INTENT(IN) :: side
1230 :
1231 159494 : CALL dbcsr_scale_by_vector_prv(matrix%prv, alpha, side)
1232 159494 : END SUBROUTINE dbcsr_scale_by_vector_${nametype1}$
1233 : #:endfor
1234 :
1235 : ! **************************************************************************************************
1236 : !> \brief ...
1237 : ! **************************************************************************************************
1238 : #:for nametype1, type1 in [('d', 'REAL(kind=dp)'), ('z', 'COMPLEX(kind=dp)')]
1239 4555401 : SUBROUTINE dbcsr_set_${nametype1}$ (matrix, alpha)
1240 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
1241 : ${type1}$, INTENT(IN) :: alpha
1242 :
1243 4555401 : CALL dbcsr_set_prv(matrix%prv, alpha)
1244 4555401 : END SUBROUTINE dbcsr_set_${nametype1}$
1245 : #:endfor
1246 :
1247 : ! **************************************************************************************************
1248 : !> \brief ...
1249 : ! **************************************************************************************************
1250 : #:for nametype1, type1 in [('d', 'REAL(kind=dp)'), ('z', 'COMPLEX(kind=dp)')]
1251 2934 : SUBROUTINE dbcsr_set_diag_${nametype1}$ (matrix, diag)
1252 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
1253 : ${type1}$, DIMENSION(:), INTENT(IN) :: diag
1254 :
1255 2934 : CALL dbcsr_set_diag_prv(matrix%prv, diag)
1256 2934 : END SUBROUTINE dbcsr_set_diag_${nametype1}$
1257 : #:endfor
1258 :
1259 : ! **************************************************************************************************
1260 : !> \brief ...
1261 : ! **************************************************************************************************
1262 4 : SUBROUTINE dbcsr_setname(matrix, newname)
1263 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
1264 : CHARACTER(len=*), INTENT(IN) :: newname
1265 :
1266 4 : CALL dbcsr_setname_prv(matrix%prv, newname)
1267 4 : END SUBROUTINE dbcsr_setname
1268 :
1269 : ! **************************************************************************************************
1270 : !> \brief ...
1271 : ! **************************************************************************************************
1272 52616 : SUBROUTINE dbcsr_sum_replicated(matrix)
1273 : TYPE(dbcsr_type), INTENT(inout) :: matrix
1274 :
1275 52616 : CALL dbcsr_sum_replicated_prv(matrix%prv)
1276 52616 : END SUBROUTINE dbcsr_sum_replicated
1277 :
1278 : ! **************************************************************************************************
1279 : !> \brief ...
1280 : ! **************************************************************************************************
1281 : #:for nametype1, type1 in [('d', 'REAL(kind=dp)'), ('z', 'COMPLEX(kind=dp)')]
1282 11619 : SUBROUTINE dbcsr_trace_${nametype1}$ (matrix, trace)
1283 : TYPE(dbcsr_type), INTENT(IN) :: matrix
1284 : ${type1}$, INTENT(OUT) :: trace
1285 :
1286 11619 : CALL dbcsr_trace_prv(matrix%prv, trace)
1287 11619 : END SUBROUTINE dbcsr_trace_${nametype1}$
1288 : #:endfor
1289 :
1290 : ! **************************************************************************************************
1291 : !> \brief ...
1292 : ! **************************************************************************************************
1293 175752 : SUBROUTINE dbcsr_transposed(transposed, normal, shallow_data_copy, transpose_distribution, &
1294 : use_distribution)
1295 : TYPE(dbcsr_type), INTENT(INOUT) :: transposed
1296 : TYPE(dbcsr_type), INTENT(IN) :: normal
1297 : LOGICAL, INTENT(IN), OPTIONAL :: shallow_data_copy, transpose_distribution
1298 : TYPE(dbcsr_distribution_type), INTENT(IN), &
1299 : OPTIONAL :: use_distribution
1300 :
1301 175752 : IF (PRESENT(use_distribution)) THEN
1302 : CALL dbcsr_transposed_prv(transposed%prv, normal%prv, shallow_data_copy=shallow_data_copy, &
1303 : transpose_distribution=transpose_distribution, &
1304 89026 : use_distribution=use_distribution%prv)
1305 : ELSE
1306 : CALL dbcsr_transposed_prv(transposed%prv, normal%prv, shallow_data_copy=shallow_data_copy, &
1307 86726 : transpose_distribution=transpose_distribution)
1308 : END IF
1309 175752 : END SUBROUTINE dbcsr_transposed
1310 :
1311 : ! **************************************************************************************************
1312 : !> \brief ...
1313 : ! **************************************************************************************************
1314 0 : SUBROUTINE dbcsr_triu(matrix)
1315 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
1316 :
1317 0 : CALL dbcsr_triu_prv(matrix%prv)
1318 0 : END SUBROUTINE dbcsr_triu
1319 :
1320 : ! **************************************************************************************************
1321 : !> \brief ...
1322 : ! **************************************************************************************************
1323 1319741 : PURE FUNCTION dbcsr_valid_index(matrix) RESULT(valid_index)
1324 : TYPE(dbcsr_type), INTENT(IN) :: matrix
1325 : LOGICAL :: valid_index
1326 :
1327 1319741 : valid_index = dbcsr_valid_index_prv(matrix%prv)
1328 1319741 : END FUNCTION dbcsr_valid_index
1329 :
1330 : ! **************************************************************************************************
1331 : !> \brief ...
1332 : ! **************************************************************************************************
1333 187878 : SUBROUTINE dbcsr_verify_matrix(matrix, verbosity, local)
1334 : TYPE(dbcsr_type), INTENT(IN) :: matrix
1335 : INTEGER, INTENT(IN), OPTIONAL :: verbosity
1336 : LOGICAL, INTENT(IN), OPTIONAL :: local
1337 :
1338 187878 : CALL dbcsr_verify_matrix_prv(matrix%prv, verbosity, local)
1339 187878 : END SUBROUTINE dbcsr_verify_matrix
1340 :
1341 : ! **************************************************************************************************
1342 : !> \brief ...
1343 : ! **************************************************************************************************
1344 13258 : SUBROUTINE dbcsr_work_create(matrix, nblks_guess, sizedata_guess, n, work_mutable)
1345 : TYPE(dbcsr_type), INTENT(INOUT) :: matrix
1346 : INTEGER, INTENT(IN), OPTIONAL :: nblks_guess, sizedata_guess, n
1347 : LOGICAL, INTENT(in), OPTIONAL :: work_mutable
1348 :
1349 13258 : CALL dbcsr_work_create_prv(matrix%prv, nblks_guess, sizedata_guess, n, work_mutable)
1350 13258 : END SUBROUTINE dbcsr_work_create
1351 :
1352 0 : END MODULE cp_dbcsr_api
|