3 #include "sll_assert.h"
31 real(
wp),
allocatable :: qp_temp(:, :, :)
32 real(
wp),
allocatable :: l(:, :, :)
51 integer,
intent(in) :: n1
52 integer,
intent(in) :: n2
53 integer,
intent(in) :: p1
54 integer,
intent(in) :: p2
55 real(wp),
intent(in) :: L(:, :, :)
62 sll_assert(
size(l, 1) == 2)
63 sll_assert(
size(l, 2) == n2)
64 sll_assert(
size(l, 3) == 3)
67 allocate (self%L(
size(l, 1),
size(l, 2),
size(l, 3)), source=l)
68 allocate (self%Qp_temp(
size(l, 1),
size(l, 2),
size(l, 3)))
79 integer :: i1, i2, j1, j2, k1, k2, ip, jp, ll
81 associate(n1 => self%n1, &
87 self%Qp_temp(:, :, :) = 0.0_wp
88 qp%block1%A(:, :) = 0.0_wp
89 qp%block2%A(:, :, :) = 0.0_wp
90 qp%block3%A(:, :, :) = 0.0_wp
103 else if (j1 > n1)
then
110 else if (j2 > n2)
then
115 if (i1 <= 2 .and. j1 <= 2)
then
116 self%Qp_temp(i1, i2, ll) = self%Qp_temp(i1, i2, ll) + ql%A(k1, k2, i1, i2)*self%L(j1, j2, ll)
118 else if (i1 <= 2 .and. j1 <= 2 + p1)
then
119 qp%block2%A(ll, j1 - 2, j2) = qp%block2%A(ll, j1 - 2, j2) + self%L(i1, i2, ll)*ql%A(k1, k2, i1, i2)
121 else if (i1 <= 2 + p1 .and. j1 <= 2)
then
122 qp%block3%A(i1 - 2, i2, ll) = qp%block3%A(i1 - 2, i2, ll) + ql%A(k1, k2, i1, i2)*self%L(j1, j2, ll)
135 qp%block1%A(ip, jp) = qp%block1%A(ip, jp) + self%L(i1, i2, ip)*self%Qp_temp(i1, i2, jp)
142 qp%block4%A(:, :, :, :) = 0.0_wp
147 j1 = modulo(i1 - 1 + k1, n1 - 2)
148 ll = modulo(i1 + 1 + k1, n1)
149 if (ll == 2 + j1) qp%block4%A(k1, k2, i1, i2) = ql%A(k1, k2, i1 + 2, i2)
162 real(wp),
intent(in) :: V(:, :)
163 type(sll_t_vector_space_c1_block),
intent(inout) :: Vp
165 integer :: i1, i2, ll
167 associate(n1 => self%n1, &
173 sll_assert(
size(v, 1) == n1)
174 sll_assert(
size(v, 2) == n2)
175 sll_assert(
size(vp%vd%array) == 3)
176 sll_assert(
size(vp%vs%array, 1) == n1 - 2 + 2*p1)
177 sll_assert(
size(vp%vs%array, 2) == n2 + 2*p2)
179 vp%vd%array(:) = 0.0_wp
183 vp%vd%array(ll) = vp%vd%array(ll) + self%L(i1, i2, ll)*v(i1, i2)
190 vp%vs%array(i1 - 2, i2) = v(i1, i2)
201 type(sll_t_vector_space_c1_block),
intent(inout) :: Vp
202 real(wp),
intent(inout) :: V(:)
204 integer :: i, i1, i2, j, j1, j2, ll
206 associate(n1 => self%n1, &
212 sll_assert(
size(vp%vd%array) == 3)
213 sll_assert(
size(vp%vs%array, 1) == n1 - 2 + 2*p1)
214 sll_assert(
size(vp%vs%array, 2) == n2 + 2*p2)
215 sll_assert(
size(v) == n1*n2)
222 v(i) = v(i) + self%L(i1, i2, ll)*vp%vd%array(ll)
230 v(2*n2 + j) = vp%vs%array(j1, j2)
242 deallocate (self%Qp_temp)
subroutine s_ellipt_2d_fem_sps_stencil_new_projector__free(self)
subroutine s_ellipt_2d_fem_sps_stencil_new_projector__init(self, n1, n2, p1, p2, L)
subroutine s_ellipt_2d_fem_sps_stencil_new_projector__change_basis_matrix(self, Ql, Qp)
subroutine s_ellipt_2d_fem_sps_stencil_new_projector__change_basis_vecinv(self, Vp, V)
subroutine s_ellipt_2d_fem_sps_stencil_new_projector__change_basis_vector(self, V, Vp)
Vector space for wrapping 2D Fortran real arrays.
Module to select the kind parameter.
integer, parameter, public f64
f64 is the kind type for 64-bit reals (double precision)