22#include "./base/base_uses.f90"
32 TYPE(dbcsr_p_type),
DIMENSION(:),
POINTER :: ptr_1d => null()
34 LOGICAL :: set_as_1d = .false.
49 IF (
ASSOCIATED(this%ptr_1d))
THEN
50 IF (
SIZE(this%ptr_2d, 2) /= 1) &
51 cpabort(
"Method not implemented for k-points")
82 IF (
ASSOCIATED(ptr_1d))
THEN
85 this%ptr_2d(1:n, 1:1) => ptr_1d
86 this%set_as_1d = .true.
103 IF (
ASSOCIATED(ptr_2d))
THEN
104 this%ptr_1d => ptr_2d(:, 1)
105 this%ptr_2d => ptr_2d
106 this%set_as_1d = .false.
108 this%ptr_1d => null()
109 this%ptr_2d => null()
121 IF (
ASSOCIATED(this%ptr_1d))
THEN
122 IF (this%set_as_1d)
THEN
128 NULLIFY (this%ptr_1d, this%ptr_2d)
DBCSR operations in CP2K.
Datatype to translate between k-points (2d) and gamma-point (1d) code.
type(dbcsr_p_type) function, dimension(:), pointer, public get_1d_pointer(this)
Smart getter, raises an error when called during a k-point calculation.
type(dbcsr_p_type) function, dimension(:, :), pointer, public get_2d_pointer(this)
Simple getter, needed because of PRIVATE.
subroutine, public kpoint_transitional_release(this)
Release the matrix set, using the right pointer.
subroutine, public set_1d_pointer(this, ptr_1d)
Assigns a 1D pointer.
subroutine, public set_2d_pointer(this, ptr_2d)
Assigns a 2D pointer.