40 real(real64),
allocatable :: dprojectors(:, :)
41 complex(real64),
allocatable :: zprojectors(:, :)
42 real(real64),
allocatable :: scal(:)
46 integer,
allocatable :: regions(:)
47 real(real64),
allocatable :: dmix(:, :)
48 complex(real64),
allocatable :: zmix(:, :, :)
49 logical :: is_cmplx = .false.
51 integer,
pointer,
contiguous :: map(:)
52 real(real64),
pointer,
contiguous :: position(:, :)
55 real(real64),
allocatable :: sphere_weights(:)
62 type(projector_matrix_t),
intent(out) :: this
63 integer,
intent(in) :: nprojs
64 type(submesh_t),
intent(in) :: sphere
65 logical,
intent(in) :: has_mix_matrix
66 logical,
optional,
intent(in) :: is_cmplx
70 this%npoints = sphere%np
72 this%nregions = sphere%num_regions
74 nullify(this%position)
78 safe_allocate(this%regions(1:this%nregions+1))
79 if (this%is_cmplx)
then
80 safe_allocate(this%zprojectors(1:this%npoints, 1:nprojs))
82 safe_allocate(this%dprojectors(1:this%npoints, 1:nprojs))
84 safe_allocate(this%scal(1:nprojs))
86 if (has_mix_matrix)
then
87 if (this%is_cmplx)
then
88 safe_allocate(this%zmix(1:nprojs, 1:nprojs, 1:4))
90 safe_allocate(this%dmix(1:nprojs, 1:nprojs))
100 type(projector_matrix_t),
intent(inout) :: this
104 safe_deallocate_a(this%regions)
105 safe_deallocate_a(this%dprojectors)
106 safe_deallocate_a(this%zprojectors)
107 safe_deallocate_a(this%scal)
108 safe_deallocate_a(this%sphere_weights)
109 safe_deallocate_a(this%dmix)
110 safe_deallocate_a(this%zmix)
112 nullify(this%position)
117 this%is_cmplx = .false.
subroutine, public projector_matrix_deallocate(this)
subroutine, public projector_matrix_allocate(this, nprojs, sphere, has_mix_matrix, is_cmplx)
A set of projectors defined on a submesh.