2 #include "sll_working_precision.h"
28 sll_int32,
intent( in ) :: n_cells(3)
29 sll_int32,
intent( in ) :: degree(3)
30 sll_int32,
optional,
intent( in ) :: degree2(3)
34 self%n_dofs(1) = n_cells(1)+degree(1)
35 self%n_total = product(self%n_dofs)
37 allocate( self%particle_mass( product(2*self%degree+1), self%n_total) )
38 self%particle_mass = 0._f64
39 self%n_rows = self%n_total
40 self%n_cols = self%n_total
42 self%n_global_rows = self%n_rows
43 self%n_global_cols = self%n_cols
50 deallocate( self%particle_mass )
57 sll_real64,
intent( in ) :: x(:)
58 sll_real64,
intent( out ) :: y(:)
60 sll_int32 :: ind_i, ind_j, ind
61 sll_int32 :: i1, i2, i3, j1, j2, j3
64 do i3 = 1, self%n_dofs(3)
65 do i2 = 1, self%n_dofs(2)
66 do i1 = 1, self%degree(1)
69 do j3 = i3-self%degree(3), i3+self%degree(3)
70 do j2 = i2-self%degree(2), i2+self%degree(2)
71 ind = ind + self%degree(1)+1-i1
72 do j1 = 1, i1+self%degree(1)
73 ind_j = j1 + modulo(j2-1,self%n_dofs(2))*self%n_dofs(1) + modulo(j3-1,self%n_dofs(3))*self%n_dofs(1)*self%n_dofs(2)
74 y(ind_i) = y(ind_i) + &
75 self%sign * self%particle_mass( ind, ind_i) * x(ind_j)
82 do i1 = self%degree(1)+1, self%n_dofs(1)-self%degree(1)
85 do j3 = i3-self%degree(3), i3+self%degree(3)
86 do j2 = i2-self%degree(2), i2+self%degree(2)
87 do j1 = i1-self%degree(1), i1+self%degree(1)
88 ind_j = j1 + modulo(j2-1,self%n_dofs(2))*self%n_dofs(1) + modulo(j3-1,self%n_dofs(3))*self%n_dofs(1)*self%n_dofs(2)
89 y(ind_i) = y(ind_i) + &
90 self%sign * self%particle_mass( ind, ind_i) * x(ind_j)
97 do i1 = self%n_dofs(1)-self%degree(1)+1, self%n_dofs(1)
100 do j3 = i3-self%degree(3), i3+self%degree(3)
101 do j2 = i2-self%degree(2), i2+self%degree(2)
102 do j1 = i1-self%degree(1), self%n_dofs(1)
103 ind_j = j1 + modulo(j2-1,self%n_dofs(2))*self%n_dofs(1) + modulo(j3-1,self%n_dofs(3))*self%n_dofs(1)*self%n_dofs(2)
104 y(ind_i) = y(ind_i) + &
105 self%sign * self%particle_mass( ind, ind_i) * x(ind_j)
108 ind = ind + self%degree(1)-self%n_dofs(1)+i1
subroutine print_info_particle_mass_cl_3d_diag(self)
subroutine free_particle_mass_cl_3d_diag(self)
subroutine create_linear_operator_particle_mass_cl_3d_diag(self, n_cells, degree, degree2)
subroutine dot_particle_mass_cl_3d_diag(self, x, y)