Line data Source code
1 : !--------------------------------------------------------------------------------------------------!
2 : ! CP2K: A general program to perform molecular dynamics simulations !
3 : ! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
4 : ! !
5 : ! SPDX-License-Identifier: GPL-2.0-or-later !
6 : !--------------------------------------------------------------------------------------------------!
7 :
8 : ! **************************************************************************************************
9 : !> \brief Types to handle submatrices
10 : !> \par History
11 : !> 2013.01 created [Rustam Z Khaliullin]
12 : !> \author Rustam Z Khaliullin
13 : ! **************************************************************************************************
14 : MODULE domain_submatrix_types
15 : USE kinds, ONLY: dp
16 : USE message_passing, ONLY: mp_comm_type
17 : #include "./base/base_uses.f90"
18 :
19 : IMPLICIT NONE
20 :
21 : PRIVATE
22 :
23 : CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'domain_submatrix_types'
24 :
25 : INTEGER, PARAMETER, PUBLIC :: select_row_col = 1
26 : INTEGER, PARAMETER, PUBLIC :: select_row = 2
27 :
28 : PUBLIC :: domain_submatrix_type, domain_map_type
29 :
30 : ! submatrix storage with the meta-data necessary to convert
31 : ! the submatrix into the DBCSR format
32 : TYPE domain_submatrix_type
33 : INTEGER :: domain = 0
34 : REAL(KIND=dp), DIMENSION(:, :), ALLOCATABLE :: mdata
35 : INTEGER :: nbrows = 0
36 : INTEGER :: nbcols = 0
37 : INTEGER :: nrows = 0
38 : INTEGER :: ncols = 0
39 : INTEGER, DIMENSION(:), ALLOCATABLE :: dbcsr_row
40 : INTEGER, DIMENSION(:), ALLOCATABLE :: dbcsr_col
41 : INTEGER, DIMENSION(:), ALLOCATABLE :: size_brow
42 : INTEGER, DIMENSION(:), ALLOCATABLE :: size_bcol
43 : INTEGER :: nnodes = 0
44 : TYPE(mp_comm_type) :: group = mp_comm_type()
45 : END TYPE domain_submatrix_type
46 :
47 : TYPE domain_map_type
48 : INTEGER, DIMENSION(:), ALLOCATABLE :: index1
49 : INTEGER, DIMENSION(:, :), ALLOCATABLE :: pairs
50 : END TYPE domain_map_type
51 :
52 0 : END MODULE domain_submatrix_types
53 :
|