2 #include "sll_working_precision.h"
19 sll_real64,
allocatable :: mass_line_0(:)
20 sll_real64,
allocatable :: mass_line_1(:)
21 sll_real64,
pointer :: m1(:,:), m2(:,:), m4(:,:)
38 sll_real64 :: mass_line_0(:)
39 sll_real64 :: mass_line_1(:)
40 sll_real64,
target :: m1(:,:)
41 sll_real64,
target :: m2(:,:)
42 sll_real64,
target :: m4(:,:)
51 allocate(self%mass_line_0(degree+1))
52 allocate(self%mass_line_1(degree))
53 self%mass_line_0=mass_line_0
54 self%mass_line_1=mass_line_1
60 self%n_global_rows = self%n_rows
61 self%n_global_cols = self%n_cols
67 deallocate(self%mass_line_0)
68 deallocate(self%mass_line_1)
77 sll_real64,
intent( in ) :: x(:)
78 sll_real64,
intent( out ) :: y(:)
80 sll_int32 :: row, column
81 sll_real64 :: scratch(self%n_dof+1)
86 y(row) = (self%mass_line_1(1)+0.5_f64*self%dt*self%m1(1,row))*x(row)
87 y(self%n_dof+row)= (self%mass_line_0(1)+0.5_f64*self%dt*self%m4(1,row))*x(self%n_dof+row)
89 scratch(row)=self%mass_line_1(1)*x(2*self%n_dof+row)
90 do column = 2, self%degree
92 self%mass_line_1(column) * &
93 (x(modulo(row+column-2,self%n_dof)+1) +&
94 x(modulo(row-column,self%n_dof)+1))+&
95 0.5_f64*self%dt*self%m1(column,row) * &
96 x(modulo(row+column-2,self%n_dof)+1)+&
97 0.5_f64*self%dt*self%m1(column,modulo(row-column,self%n_dof)+1) * &
98 x(modulo(row-column,self%n_dof)+1)
100 scratch(row)=scratch(row)+&
101 self%mass_line_1(column) * &
102 (x(2*self%n_dof+ modulo(row+column-2,self%n_dof)+1) +&
103 x(2*self%n_dof+ modulo(row-column,self%n_dof)+1))
105 do column = 2, self%degree+1
106 y(self%n_dof+row) = y(self%n_dof+row) +&
107 self%mass_line_0(column) * &
108 (x(self%n_dof+modulo(row+column-2,self%n_dof)+1) +&
109 x(self%n_dof+ modulo(row-column,self%n_dof)+1))+&
110 0.5_f64*self%dt*self%m4(column,row)*&
111 x(self%n_dof+modulo(row+column-2,self%n_dof)+1)+&
112 0.5_f64*self%dt*self%m4(column,modulo(row-column,self%n_dof)+1)*&
113 x(self%n_dof+modulo(row-column,self%n_dof)+1)
116 do column = 1, 2*self%degree
118 0.5_f64*self%dt*self%m2(7-column,modulo(column-4+row-1,self%n_dof)+1)*&
119 x(self%n_dof+modulo(row+column-self%degree-2,self%n_dof)+1)
121 y(row+self%n_dof) = y(row+self%n_dof) + &
122 0.5_f64*self%dt*self%m2(column,row) * &
123 x(modulo(row+column-self%degree-1,self%n_dof)+1)
127 scratch(self%n_dof+1)=scratch(1)
129 y(row+self%n_dof)= y(row+self%n_dof)-&
130 0.5_f64*self%dt/self%dx*(scratch(row)-scratch(row+1))
132 y(2*self%n_dof+row)=x(2*self%n_dof+row)+ &
133 0.5_f64*self%dt/self%dx*(x(self%n_dof+row)-x(self%n_dof+modulo(row-2,self%n_dof)+1))
module for abstract linear operator
subroutine free_ecsim(self)
subroutine print_info_ecsim(self)
subroutine dot_mono_r2r_ecsim(self, x, y)
subroutine create_linear_operator_ecsim(self, n_dof, degree, mass_line_0, mass_line_1, m1, m2, m4)
Utilites for Maxwell solver's with spline finite elements.
subroutine, public sll_s_spline_fem_mass_line(degree, mass_line)
Computes the mass line for a mass matrix with degree splines.
class for abstract linear operator