2 #include "sll_working_precision.h"
16 sll_int32 :: degree2(3)
17 sll_int32 :: n_dofs2(3)
34 sll_int32,
intent( in ) :: n_cells(3)
35 sll_int32,
intent( in ) :: degree(3)
36 sll_int32,
optional,
intent( in ) :: degree2(3)
40 self%n_dofs(1) = n_cells(1)+degree(1)
41 self%n_total = product(self%n_dofs)
42 self%degree2 = degree2
43 self%n_dofs2 = n_cells
44 self%n_dofs2(1) = n_cells(1)+degree2(1)
45 self%n_total2 = product(self%n_dofs2)
47 allocate( self%particle_mass( product(self%degree+self%degree2+1), self%n_total))
48 self%particle_mass = 0._f64
50 self%n_rows = self%n_total
51 self%n_cols = self%n_total2
53 self%n_global_rows = self%n_rows
54 self%n_global_cols = self%n_cols
61 deallocate( self%particle_mass )
68 sll_real64,
intent( in ) :: x(:)
69 sll_real64,
intent( out ) :: y(:)
71 sll_int32 :: ind_i, ind_j, ind
72 sll_int32 :: i1, i2, i3, j1, j2, j3
75 do i3 = 1, self%n_dofs(3)
76 do i2 = 1, self%n_dofs(2)
77 do i1 = 1, self%degree(1)
80 do j3 = i3-self%degree2(3), i3+self%degree(3)
81 do j2 = i2-self%degree2(2), i2+self%degree(2)
82 ind = ind + self%degree(1)+1-i1
83 do j1 = 1, i1+self%degree2(1)
84 ind_j = j1 + modulo(j2-1,self%n_dofs2(2))*self%n_dofs2(1) + modulo(j3-1,self%n_dofs2(3))*self%n_dofs2(1)*self%n_dofs2(2)
85 y(ind_i) = y(ind_i) + &
86 self%sign * self%particle_mass( ind, ind_i) * x(ind_j)
93 do i1 = self%degree(1)+1, self%n_dofs(1)-self%degree(1)
96 do j3 = i3-self%degree2(3), i3+self%degree(3)
97 do j2 = i2-self%degree2(2), i2+self%degree(2)
98 do j1 = i1-self%degree(1), i1+self%degree2(1)
99 ind_j = j1 + modulo(j2-1,self%n_dofs2(2))*self%n_dofs2(1) + modulo(j3-1,self%n_dofs2(3))*self%n_dofs2(1)*self%n_dofs2(2)
100 y(ind_i) = y(ind_i) + &
101 self%sign * self%particle_mass( ind, ind_i) * x(ind_j)
108 do i1 = self%n_dofs(1)-self%degree(1)+1, self%n_dofs(1)
111 do j3 = i3-self%degree2(3), i3+self%degree(3)
112 do j2 = i2-self%degree2(2), i2+self%degree(2)
113 do j1 = i1-self%degree(1), self%n_dofs2(1)
114 ind_j = j1 + modulo(j2-1,self%n_dofs2(2))*self%n_dofs2(1) + modulo(j3-1,self%n_dofs2(3))*self%n_dofs2(1)*self%n_dofs2(2)
115 y(ind_i) = y(ind_i) + &
116 self%sign * self%particle_mass( ind, ind_i) * x(ind_j)
119 ind = ind + self%degree(1)-self%n_dofs(1)+i1
subroutine free_particle_mass_cl_3d_od(self)
subroutine print_info_particle_mass_cl_3d_od(self)
subroutine create_linear_operator_particle_mass_cl_3d_od(self, n_cells, degree, degree2)
subroutine dot_particle_mass_cl_3d_od(self, x, y)