(git:3add494)
dbt_index Module Reference

tensor index and mapping to DBM index More...

Functions/Subroutines

subroutine, public create_nd_to_2d_mapping (map, dims, map1_2d, map2_2d, base, col_major)
 Create all data needed to quickly map between nd index and 2d index. More...
 
subroutine, public destroy_nd_to_2d_mapping (map)
 
pure integer function, public ndims_mapping (map)
 
pure integer function, public ndims_mapping_row (map)
 how many tensor dimensions are mapped to matrix row More...
 
pure integer function, public ndims_mapping_column (map)
 how many tensor dimensions are mapped to matrix column More...
 
pure subroutine, public dbt_get_mapping_info (map, ndim_nd, ndim1_2d, ndim2_2d, dims_2d_i8, dims_2d, dims_nd, dims1_2d, dims2_2d, map1_2d, map2_2d, map_nd, base, col_major)
 get mapping info More...
 
pure integer(kind=int_8) function, public combine_tensor_index (ind_in, dims)
 transform nd index to flat index More...
 
pure integer function, public combine_pgrid_index (ind_in, dims)
 transform nd index to flat index More...
 
pure integer function, dimension(size(dims)), public split_tensor_index (ind_in, dims)
 transform flat index to nd index More...
 
pure integer function, dimension(size(dims)), public split_pgrid_index (ind_in, dims)
 transform flat index to nd index More...
 
pure integer(kind=int_8) function, dimension(2), public get_2d_indices_tensor (map, ind_in)
 transform nd index to 2d index, using info from index mapping. More...
 
pure integer function, dimension(2), public get_2d_indices_pgrid (map, ind_in)
 transform nd index to 2d index, using info from index mapping. More...
 
pure integer function, dimension(map%ndim_nd), public get_nd_indices_tensor (map, ind_in)
 transform 2d index to nd index, using info from index mapping. More...
 
pure integer function, dimension(map%ndim_nd), public get_nd_indices_pgrid (map, ind_in)
 transform 2d index to nd index, using info from index mapping. More...
 
pure integer function, dimension(size(order)), public dbt_inverse_order (order)
 Invert order. More...
 
subroutine, public permute_index (map_in, map_out, order)
 reorder tensor index (no data) More...
 

Detailed Description

tensor index and mapping to DBM index

Author
Patrick Seewald

Function/Subroutine Documentation

◆ create_nd_to_2d_mapping()

subroutine, public dbt_index::create_nd_to_2d_mapping ( type(nd_to_2d_mapping), intent(out)  map,
integer, dimension(:), intent(in)  dims,
integer, dimension(:), intent(in)  map1_2d,
integer, dimension(:), intent(in)  map2_2d,
integer, intent(in), optional  base,
logical, intent(in), optional  col_major 
)

Create all data needed to quickly map between nd index and 2d index.

Parameters
mapindex mapping data
dimsnd sizes
map1_2dwhich nd-indices map to first matrix index and in which order
map2_2dwhich nd-indices map to second matrix index and in which order
basebase index (1 for Fortran-style, 0 for C-style, default is 1)
col_majorwhether index should be column major order (.TRUE. for Fortran-style, .FALSE. for C-style, default is .TRUE.).
Author
Patrick Seewald

Definition at line 72 of file dbt_index.F.

Here is the caller graph for this function:

◆ destroy_nd_to_2d_mapping()

subroutine, public dbt_index::destroy_nd_to_2d_mapping ( type(nd_to_2d_mapping), intent(inout)  map)
Author
Patrick Seewald

Definition at line 114 of file dbt_index.F.

Here is the caller graph for this function:

◆ ndims_mapping()

pure integer function, public dbt_index::ndims_mapping ( type(nd_to_2d_mapping), intent(in)  map)
Author
Patrick Seewald

Definition at line 129 of file dbt_index.F.

◆ ndims_mapping_row()

pure integer function, public dbt_index::ndims_mapping_row ( type(nd_to_2d_mapping), intent(in)  map)

how many tensor dimensions are mapped to matrix row

Author
Patrick Seewald

Definition at line 140 of file dbt_index.F.

Here is the caller graph for this function:

◆ ndims_mapping_column()

pure integer function, public dbt_index::ndims_mapping_column ( type(nd_to_2d_mapping), intent(in)  map)

how many tensor dimensions are mapped to matrix column

Author
Patrick Seewald

Definition at line 150 of file dbt_index.F.

Here is the caller graph for this function:

◆ dbt_get_mapping_info()

pure subroutine, public dbt_index::dbt_get_mapping_info ( type(nd_to_2d_mapping), intent(in)  map,
integer, intent(out), optional  ndim_nd,
integer, intent(out), optional  ndim1_2d,
integer, intent(out), optional  ndim2_2d,
integer(kind=int_8), dimension(2), intent(out), optional  dims_2d_i8,
integer, dimension(2), intent(out), optional  dims_2d,
integer, dimension(ndims_mapping(map)), intent(out), optional  dims_nd,
integer, dimension(ndims_mapping_row(map)), intent(out), optional  dims1_2d,
integer, dimension(ndims_mapping_column(map)), intent(out), optional  dims2_2d,
integer, dimension(ndims_mapping_row(map)), intent(out), optional  map1_2d,
integer, dimension(ndims_mapping_column(map)), intent(out), optional  map2_2d,
integer, dimension(ndims_mapping(map)), intent(out), optional  map_nd,
integer, intent(out), optional  base,
logical, intent(out), optional  col_major 
)

get mapping info

Parameters
mapindex mapping data
ndim_ndnumber of dimensions
ndim1_2dnumber of dimensions that map to first 2d index
ndim2_2dnumber of dimensions that map to first 2d index
dims_2d2d dimensions
dims_ndnd dimensions
dims1_2ddimensions that map to first 2d index
dims2_2ddimensions that map to second 2d index
map1_2dindices that map to first 2d index
map2_2dindices that map to second 2d index
map_ndinverse of [map1_2d, map2_2d]
basebase index
col_majoris index in column major order
Author
Patrick Seewald

Definition at line 173 of file dbt_index.F.

Here is the caller graph for this function:

◆ combine_tensor_index()

pure integer(kind=int_8) function, public dbt_index::combine_tensor_index ( integer, dimension(:), intent(in)  ind_in,
integer, dimension(:), intent(in)  dims 
)

transform nd index to flat index

Parameters
ind_innd index
dimsnd dimensions
ind_outflat index
Author
Patrick Seewald

Definition at line 234 of file dbt_index.F.

Here is the caller graph for this function:

◆ combine_pgrid_index()

pure integer function, public dbt_index::combine_pgrid_index ( integer, dimension(:), intent(in)  ind_in,
integer, dimension(:), intent(in)  dims 
)

transform nd index to flat index

Parameters
ind_innd index
dimsnd dimensions
ind_outflat index
Author
Patrick Seewald

Definition at line 253 of file dbt_index.F.

Here is the caller graph for this function:

◆ split_tensor_index()

pure integer function, dimension(size(dims)), public dbt_index::split_tensor_index ( integer(kind=int_8), intent(in)  ind_in,
integer, dimension(:), intent(in)  dims 
)

transform flat index to nd index

Parameters
ind_inflat index
dimsnd dimensions
ind_outnd index
Author
Patrick Seewald

Definition at line 272 of file dbt_index.F.

Here is the caller graph for this function:

◆ split_pgrid_index()

pure integer function, dimension(size(dims)), public dbt_index::split_pgrid_index ( integer, intent(in)  ind_in,
integer, dimension(:), intent(in)  dims 
)

transform flat index to nd index

Parameters
ind_inflat index
dimsnd dimensions
ind_outnd index
Author
Patrick Seewald

Definition at line 295 of file dbt_index.F.

Here is the caller graph for this function:

◆ get_2d_indices_tensor()

pure integer(kind=int_8) function, dimension(2), public dbt_index::get_2d_indices_tensor ( type(nd_to_2d_mapping), intent(in)  map,
integer, dimension(map%ndim_nd), intent(in)  ind_in 
)

transform nd index to 2d index, using info from index mapping.

Parameters
mapindex mapping
ind_innd index
ind_out2d index
Author
Patrick Seewald

Definition at line 317 of file dbt_index.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_2d_indices_pgrid()

pure integer function, dimension(2), public dbt_index::get_2d_indices_pgrid ( type(nd_to_2d_mapping), intent(in)  map,
integer, dimension(map%ndim_nd), intent(in)  ind_in 
)

transform nd index to 2d index, using info from index mapping.

Parameters
mapindex mapping
ind_innd index
ind_out2d index
Author
Patrick Seewald

Definition at line 342 of file dbt_index.F.

Here is the call graph for this function:

◆ get_nd_indices_tensor()

pure integer function, dimension(map%ndim_nd), public dbt_index::get_nd_indices_tensor ( type(nd_to_2d_mapping), intent(in)  map,
integer(kind=int_8), dimension(2), intent(in)  ind_in 
)

transform 2d index to nd index, using info from index mapping.

Parameters
mapindex mapping
ind_in2d index
ind_outnd index
Author
Patrick Seewald

Definition at line 367 of file dbt_index.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_nd_indices_pgrid()

pure integer function, dimension(map%ndim_nd), public dbt_index::get_nd_indices_pgrid ( type(nd_to_2d_mapping), intent(in)  map,
integer, dimension(2), intent(in)  ind_in 
)

transform 2d index to nd index, using info from index mapping.

Parameters
mapindex mapping
ind_in2d index
ind_outnd index
Author
Patrick Seewald

Definition at line 395 of file dbt_index.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dbt_inverse_order()

pure integer function, dimension(size(order)), public dbt_index::dbt_inverse_order ( integer, dimension(:), intent(in)  order)

Invert order.

Author
Patrick Seewald

Definition at line 409 of file dbt_index.F.

Here is the caller graph for this function:

◆ permute_index()

subroutine, public dbt_index::permute_index ( type(nd_to_2d_mapping), intent(in)  map_in,
type(nd_to_2d_mapping), intent(out)  map_out,
integer, dimension(ndims_mapping(map_in)), intent(in)  order 
)

reorder tensor index (no data)

Author
Patrick Seewald

Definition at line 422 of file dbt_index.F.

Here is the call graph for this function: