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
73 safe_allocate(this%regions(1:this%nregions+1))
74 if (this%is_cmplx)
then
75 safe_allocate(this%zprojectors(1:this%npoints, 1:nprojs))
77 safe_allocate(this%dprojectors(1:this%npoints, 1:nprojs))
79 safe_allocate(this%scal(1:nprojs))
81 if (has_mix_matrix)
then
82 if (this%is_cmplx)
then
83 safe_allocate(this%zmix(1:nprojs, 1:nprojs, 1:4))
85 safe_allocate(this%dmix(1:nprojs, 1:nprojs))
95 type(projector_matrix_t),
intent(inout) :: this
99 safe_deallocate_a(this%regions)
100 safe_deallocate_a(this%dprojectors)
101 safe_deallocate_a(this%zprojectors)
102 safe_deallocate_a(this%scal)
103 safe_deallocate_a(this%dmix)
104 safe_deallocate_a(this%zmix)
106 nullify(this%position)
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.