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(:, :)
59 type(projector_matrix_t),
intent(out) :: this
60 integer,
intent(in) :: nprojs
61 type(submesh_t),
intent(in) :: sphere
62 logical,
intent(in) :: has_mix_matrix
63 logical,
optional,
intent(in) :: is_cmplx
67 this%npoints = sphere%np
69 this%nregions = sphere%num_regions
71 nullify(this%position)
75 safe_allocate(this%regions(1:this%nregions+1))
76 if (this%is_cmplx)
then
77 safe_allocate(this%zprojectors(1:this%npoints, 1:nprojs))
79 safe_allocate(this%dprojectors(1:this%npoints, 1:nprojs))
81 safe_allocate(this%scal(1:nprojs))
83 if (has_mix_matrix)
then
84 if (this%is_cmplx)
then
85 safe_allocate(this%zmix(1:nprojs, 1:nprojs, 1:4))
87 safe_allocate(this%dmix(1:nprojs, 1:nprojs))
97 type(projector_matrix_t),
intent(inout) :: this
101 safe_deallocate_a(this%regions)
102 safe_deallocate_a(this%dprojectors)
103 safe_deallocate_a(this%zprojectors)
104 safe_deallocate_a(this%scal)
105 safe_deallocate_a(this%dmix)
106 safe_deallocate_a(this%zmix)
108 nullify(this%position)
113 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.