11 #include "sll_assert.h"
12 #include "sll_memory.h"
13 #include "sll_working_precision.h"
16 sll_s_uniform_bsplines_eval_basis
55 sll_real64,
intent(in) :: x
65 sll_int32,
intent(in ) :: degree
66 sll_real64,
intent( out) :: mass_line(degree+1)
69 sll_int32 :: q, j, int, quad
70 sll_real64,
allocatable :: quad_xw(:,:), spline_val(:,:)
74 allocate(quad_xw(2, q))
75 allocate(spline_val( degree+1, q ))
81 call sll_s_uniform_bsplines_eval_basis( degree, quad_xw(1,j), spline_val(:,j) )
88 mass_line(j) = mass_line(j) + &
89 spline_val(int,quad) * spline_val(int-j+1,quad)*quad_xw(2,quad)
99 sll_int32,
intent(in ) :: degree
101 sll_real64,
intent( out) :: mass_line(:)
104 sll_int32 :: q, j, int, quad
105 sll_real64,
allocatable :: quad_xw(:,:), spline_val(:,:),spline_val_b(:,:)
109 allocate(quad_xw(2, q))
110 allocate(spline_val( degree+1, q ))
111 allocate(spline_val_b( degree+1, q ))
120 print*,
'fem_utilities:degree 0 not implemented'
133 mass_line(int) = mass_line(int) + &
134 spline_val(j,quad) * spline_val(int,quad) * quad_xw(2,quad)
141 spline_val_b(int,quad) =
sll_f_spline_pp_horner_1d( degree, spline%poly_coeffs_boundary_left(:,:,1), quad_xw(1,quad), int)
150 mass_line(int-j+1+q*(j-1)) = mass_line(int-j+1+q*(j-1)) + &
151 spline_val_b(j,quad) * spline_val_b(int,quad) * quad_xw(2,quad)
164 do j = degree, degree
167 mass_line(int+q*(j-1)) = mass_line(int+q*(j-1)) + &
168 spline_val(1,quad) * spline_val(int,quad) * quad_xw(2,quad)
176 spline_val_b(int,quad) =
sll_f_spline_pp_horner_1d( degree, spline%poly_coeffs_boundary_left(:,:,1), quad_xw(1,quad), int)
185 mass_line(int-j+1+q*(j-1)) = mass_line(int-j+1+q*(j-1)) + &
186 spline_val_b(j,quad) * spline_val_b(int,quad) * quad_xw(2,quad)
191 spline_val_b = 0._f64
194 spline_val_b(int,quad) =
sll_f_spline_pp_horner_1d( degree, spline%poly_coeffs_boundary_left(:,:,2), quad_xw(1,quad), int)
202 mass_line(int-j+1+q*j)=mass_line(int-j+1+q*j) + &
203 spline_val_b(j,quad) * spline_val_b(int,quad) * quad_xw(2,quad)
215 do j = degree, degree
218 mass_line(int+q*(j-1)) = mass_line(int+q*(j-1)) + &
219 spline_val(1,quad) * spline_val(int,quad) * quad_xw(2,quad)
225 print*,
"for chosen spline degree, no boundary mass_line is implemented"
235 sll_int32,
intent( in ) :: deg
238 sll_int32,
intent( in ) :: row
239 sll_int32,
intent( in ) :: n_cells
240 sll_real64,
intent( out) :: mass_line((7*deg**2-deg-2)/2)
242 sll_int32 :: q, j, int, ind1, quad, interval, ind4
243 sll_real64,
allocatable :: quad_xw(:,:),spline_val_b(:,:,:), spline_val(:,:)
249 print*,
'fem_utilities:degree 0 not implemented'
253 allocate(quad_xw(2, q))
254 allocate(spline_val( deg+1, q ))
255 allocate(spline_val_b( deg+1, q, 2*deg-1 ))
260 call sll_s_uniform_bsplines_eval_basis( deg, quad_xw(1,quad), spline_val(:, quad) )
264 do interval = 1, deg-1
267 spline_val_b(int,quad,interval) =
sll_f_spline_pp_horner_1d( deg, spline%poly_coeffs_boundary_left(:,:,interval), quad_xw(1,quad), int)
271 do interval = deg, 2*deg-1
272 spline_val_b(:,:,interval) = spline_val
277 else if(row>n_cells-deg+1 .and. row<= n_cells+deg)
then
283 do interval = 1, 2*deg-1
285 do j = interval, min(interval+deg,2*deg-1)
287 do int = interval, deg+interval
289 ind1 = int + ((j-1)*(2*deg+j))/2
290 else if( j > deg+1 .and. j < 2*deg)
then
291 ind1 = int + (j-deg-1)*2*deg + (3*deg**2+deg)/2
294 c = (real(ind4,f64)*quad_xw(1,quad)+real(row-1+ind4*(interval-1),f64))/real(n_cells,f64)
295 mass_line(ind1) = mass_line(ind1) + &
296 spline_val_b(j-interval+1,quad,interval) * spline_val_b(int+1-interval,quad,interval) * quad_xw(2,quad)*profile(c)
310 sll_int32,
intent(in ) :: deg
312 sll_real64,
intent( out) :: mass_line(2*deg+1)
313 sll_int32,
intent(in) :: row
314 sll_int32,
intent(in) :: n_cells
316 sll_int32 :: j, int, quad, q, ind2, ind3, ind4
317 sll_real64,
allocatable :: quad_xw(:,:), spline_val(:,:)
322 allocate(quad_xw(2, q))
323 allocate(spline_val( deg+1, q ))
328 call sll_s_uniform_bsplines_eval_basis( deg, quad_xw(1,quad), spline_val(:,quad) )
338 c = (quad_xw(1,quad)+ real( row-1+ind4-((row-1+ind4)/n_cells)*n_cells,f64 ))/real(n_cells,f64)
340 mass_line(deg+1-j)=mass_line(deg+1-j)+ &
341 spline_val(ind2,quad)*spline_val(ind3,quad)*quad_xw(2,quad)*profile(c)
351 c = (quad_xw(1,quad)+ real( row-1+ind4-((row-1+ind4)/n_cells)*n_cells,f64 ))/real(n_cells,f64)
353 mass_line(j+deg) = mass_line(j+deg) + &
354 spline_val(ind2,quad)*spline_val(ind3,quad)*quad_xw(2,quad)*profile(c)
366 sll_int32,
intent( in ) :: deg1
367 sll_int32,
intent( in ) :: deg2
371 sll_int32,
intent( in ) :: row
372 sll_int32,
intent( in ) :: n_cells
373 sll_real64,
intent( out) :: mass_line( (deg1+deg2)**2+(2*deg2+deg1-deg1**2)/2 )
375 sll_int32 :: q, j, k, int, ind1, quad, interval, ind4
376 sll_real64,
allocatable :: quad_xw(:,:),spline_val1(:,:), spline_val2(:,:)
377 sll_real64,
allocatable :: bspl_b1(:,:,:), bspl_b2(:,:,:)
382 allocate( quad_xw(2, q) )
383 allocate( spline_val1( deg1+1, q ) )
384 allocate( spline_val2( deg2+1, q ) )
386 allocate( bspl_b1(deg1+1, q, deg1+deg2) )
387 allocate( bspl_b2(deg2+1, q, deg1+deg2) )
393 call sll_s_uniform_bsplines_eval_basis( deg1, quad_xw(1,quad), spline_val1(:, quad) )
394 call sll_s_uniform_bsplines_eval_basis( deg2, quad_xw(1,quad), spline_val2(:, quad) )
397 do interval = 1, deg1-1
400 bspl_b1(j,k,interval) =
sll_f_spline_pp_horner_1d( deg1, spline1%poly_coeffs_boundary_left(:,:,interval), quad_xw(1,k), j)
405 do interval = 1, deg2
406 bspl_b1(:,:,interval)=spline_val1
409 do interval = deg1, deg1+deg2
410 bspl_b1(:,:,interval)=spline_val1
414 do interval = 1, deg2-1
417 bspl_b2(j,k,interval) =
sll_f_spline_pp_horner_1d( deg2, spline2%poly_coeffs_boundary_left(:,:,interval), quad_xw(1,k), j)
422 do interval = 1, deg1
423 bspl_b2(:,:,interval)=spline_val2
426 do interval = deg2, deg1+deg2
427 bspl_b2(:,:,interval)=spline_val2
431 if( row <= deg1+deg2 )
then
433 else if( row > n_cells - deg2 .and. row <= n_cells+deg1 )
then
439 do interval = 1, deg1+deg2
441 do j = interval, min(interval+deg1,deg1+deg2)
443 do int = interval, deg2+interval
445 ind1 = int + ((j-1)*(2*deg2+j))/2
446 else if( j > deg1+1 .and. j < deg1+deg2)
then
447 ind1 = int + (j-deg1-1)*(deg1+deg2) + (deg1*(2*deg2+deg1+1))/2
450 c = (real(ind4,f64)*quad_xw(1,quad)+real(row-1+ind4*(interval-1),f64))/real(n_cells,f64)
451 mass_line(ind1) = mass_line(ind1) + &
453 bspl_b1(j-interval+1, quad, interval)* &
454 bspl_b2(int-interval+1, quad, interval)* &
466 sll_int32,
intent(in ) :: deg1, deg2
468 sll_real64,
intent( out) :: mass_line(deg1+deg2+1)
469 sll_int32,
intent(in) :: cell
470 sll_int32,
intent(in) :: n_cells
472 sll_int32 :: q, j, int, k, l, limit, ind1, ind2, ind3, ind4
473 sll_real64,
allocatable :: quad_xw(:,:), spline_val_1(:,:), spline_val_2(:,:)
476 q = min(deg1+deg2+1,10)
478 allocate(quad_xw(2, q))
479 allocate(spline_val_1( deg1+1, q ))
480 allocate(spline_val_2( deg2+1, q ))
486 call sll_s_uniform_bsplines_eval_basis( deg1, quad_xw(1,k), spline_val_1(:,k) )
487 call sll_s_uniform_bsplines_eval_basis( deg2, quad_xw(1,k), spline_val_2(:,k) )
491 do j = 1, deg1+deg2+1
500 do int = j, min(limit, j+deg2)
511 k = 1 - (-1)**l * l/2 + modulo(l+1,2)*q
512 c = (quad_xw(1,k)+ real( cell-1+ind4-((cell-1+ind4)/n_cells)*n_cells,f64 ))/real(n_cells,f64)
515 mass_line(ind1)=mass_line(ind1)+ &
516 spline_val_1(ind2,k)*spline_val_2(ind3,k)*quad_xw(2,k)*profile(c)
526 sll_int32,
intent(in ) :: deg
527 sll_real64,
intent( out) :: mass_line(deg*2)
530 sll_int32 :: q, j, int, quad
531 sll_real64,
allocatable :: quad_xw(:,:), spline_val_0(:,:), spline_val_1(:,:)
535 allocate(quad_xw(2, q))
536 allocate(spline_val_0( deg+1, q ))
537 allocate(spline_val_1( deg, q ))
543 call sll_s_uniform_bsplines_eval_basis( deg, quad_xw(1,j), spline_val_0(:,j) )
544 call sll_s_uniform_bsplines_eval_basis( deg-1, quad_xw(1,j), spline_val_1(:,j) )
551 mass_line(j+deg-1) = mass_line(j+deg-1) + &
552 spline_val_0(int,quad) * spline_val_1(int-j+1,quad)*quad_xw(2,quad)
560 mass_line(j+deg) = mass_line(j+deg) + &
561 spline_val_0(int,quad) * spline_val_1(int-j,quad)*quad_xw(2,quad)
572 sll_int32,
intent( in ) :: n_cells
573 sll_int32,
intent( in ) :: degree
574 sll_real64,
intent( in ) :: mass_line(0:degree)
575 sll_real64,
intent( out ) :: eig_values_mass(n_cells)
583 eig_values_mass(k+1) = mass_line(0)
585 eig_values_mass(k+1) = eig_values_mass(k+1)+ &
586 mass_line(j) * 2.0_f64 * cos( factor*real(k*j,f64))
594 sll_int32,
intent( in ) :: n_cells
595 sll_int32,
intent( in ) :: degree
596 sll_real64,
intent( in ) :: mass(degree+1)
597 sll_real64,
intent( in ) :: invec(:)
598 sll_real64,
intent( out ) :: outvec(:)
601 sll_int32 :: row, column, ind
606 outvec(row) = mass(1)*invec(row)
608 outvec(row) = outvec(row) + mass(column+1)*(invec(row+column) + &
611 do column = row,degree
612 outvec(row) = outvec(row) + mass(column+1)*(invec(row+column) + &
613 invec(row-column+n_cells))
617 do row = degree+1, n_cells-degree
618 outvec(row) = mass(1)*invec(row)
619 do column = 1, degree
620 outvec(row) = outvec(row) + mass(column+1)*(invec(row+column) + &
626 do row = n_cells-degree+1, n_cells
627 outvec(row) = mass(1)*invec(row)
628 do column = 1,n_cells-row
629 outvec(row) = outvec(row) + mass(column+1)*(invec(row+column) + &
632 do column = n_cells-row+1,degree
633 outvec(row) = outvec(row) + mass(column+1)*(invec(row+column-n_cells) + &
644 sll_int32,
intent( in ) :: n_cells
645 sll_int32,
intent( in ) :: degree
646 sll_real64,
intent( in ) :: mass(degree*2)
647 sll_real64,
intent( in ) :: invec(:)
648 sll_real64,
intent( out ) :: outvec(:)
651 sll_int32 :: row, column, ind
657 do column=-row+1,degree
658 outvec(row) = outvec(row) + mass(degree+column)*invec(row+column)
660 do column = -degree+1,-row
661 outvec(row) = outvec(row) + mass(degree+column)*invec(row+column+n_cells)
665 do row = degree, n_cells-degree
666 do column = -degree+1, degree
667 outvec(row) = outvec(row) + mass(degree+column)*invec(row+column)
672 do row = n_cells-degree+1, n_cells
673 do column = -degree+1, n_cells-row
674 outvec(row) = outvec(row) + mass(degree+column)*invec(row+column)
676 do column = n_cells-row+1, degree
677 outvec(row) = outvec(row) + mass(degree+column)*invec(row+column-n_cells)
690 sll_int32,
intent(in) :: degree
691 sll_int32,
intent(in) :: ndofs
692 sll_real64,
intent(out) :: eig(ndofs)
697 sll_real64 :: spline_coeff(degree+1)
699 ni=1.0_f64/real(ndofs,f64)
701 if ( modulo( degree, 2) == 0 )
then
702 call sll_s_uniform_bsplines_eval_basis( degree, 0.5_f64, spline_coeff )
704 call sll_s_uniform_bsplines_eval_basis( degree, 0.0_f64, spline_coeff )
706 print*,
'spline_coeffs', spline_coeff
712 eig(k+1) = spline_coeff(degree+1)
714 eig(k+1) = eig(k+1) + cos(
sll_p_twopi*real(k*p,f64)*ni)*spline_coeff(degree+1-p)
717 eig(ndofs-k+1) = 0.0_f64
719 eig(ndofs-k+1) = eig(ndofs-k+1) - sin(
sll_p_twopi*real(k*p,f64)*ni)*spline_coeff(degree+1-p)
723 if ( modulo( ndofs, 2) == 0 )
then
724 eig(ndofs/2+1) = spline_coeff(degree+1)
726 eig(ndofs/2+1) = eig(ndofs/2+1) + cos(
sll_p_twopi*real(p,f64))*spline_coeff(degree+1-p)
734 sll_int32,
intent( in ) :: n_dofs
735 sll_real64,
intent( in ) :: delta_x
736 sll_real64,
intent( in ) :: in(:)
737 sll_real64,
intent( out ) :: out(:)
742 out(1) = ( in(1) - in(n_dofs) )/delta_x
744 out(i) = ( in(i) - in(i-1) )/delta_x
753 sll_int32,
intent( in ) :: n_dofs
754 sll_real64,
intent( in ) :: delta_x
755 sll_real64,
intent( in ) :: in(:)
756 sll_real64,
intent( out ) :: out(:)
761 out(i) = ( in(i) - in(i+1) )/delta_x
764 out(n_dofs) = ( in(n_dofs) - in(1) )/delta_x
772 sll_int32,
intent( in ) :: n_dofs(3)
773 sll_real64,
intent( in ) :: delta_x(3)
774 sll_real64,
intent( in ) :: field_in(:)
775 sll_real64,
intent( out ) :: field_out(:)
778 sll_int32 :: jump, jump_end
779 sll_int32 :: ind3d, ind1d
782 coef = 1.0_f64/ delta_x(1)
784 jump_end = 1-n_dofs(1)
790 field_out(ind3d) = coef * ( field_in(ind3d) - field_in(ind3d-jump_end) )
793 field_out(ind3d) = coef * ( field_in(ind3d) - field_in(ind3d-jump) )
798 coef = 1.0_f64/ delta_x(2)
800 jump_end = (1-n_dofs(2))*n_dofs(1)
807 field_out(ind3d) = coef * ( field_in(ind1d) - field_in(ind1d-jump_end) )
813 field_out(ind3d) = coef * ( field_in(ind1d) - field_in(ind1d-jump) )
818 coef = 1.0_f64/ delta_x(3)
819 jump = n_dofs(1)*n_dofs(2)
820 jump_end = (1-n_dofs(3))*n_dofs(1)*n_dofs(2)
827 field_out(ind3d) = coef * ( field_in(ind1d) - field_in(ind1d-jump_end) )
835 field_out(ind3d) = coef * ( field_in(ind1d) - field_in(ind1d-jump) )
846 sll_int32,
intent( in ) :: n_dofs(3)
847 sll_real64,
intent( in ) :: delta_x(3)
848 sll_real64,
intent( in ) :: field_in(:)
849 sll_real64,
intent( out ) :: field_out(:)
852 sll_int32 :: jump, jump_end
853 sll_int32 :: ind3d, ind1d
856 coef = 1.0_f64/ delta_x(1)
858 jump_end = 1-n_dofs(1)
866 coef * ( field_in(ind3d) - field_in(ind3d+jump) )
869 field_out(ind3d) = coef * ( field_in(ind3d) - field_in(ind3d+jump_end) )
873 coef = 1.0_f64/ delta_x(2)
875 jump_end = (1-n_dofs(2))*n_dofs(1)
884 field_out(ind1d) = field_out(ind1d) + &
885 coef * ( field_in(ind3d) - field_in(ind3d+jump) )
892 field_out(ind1d) = field_out(ind1d) + &
893 coef * ( field_in(ind3d) - field_in(ind3d+jump_end) )
897 coef = 1.0_f64/ delta_x(3)
898 jump = n_dofs(1)*n_dofs(2)
899 jump_end = (1-n_dofs(3))*n_dofs(1)*n_dofs(2)
908 field_out(ind1d) = field_out(ind1d) + &
909 coef * ( field_in(ind3d) - field_in(ind3d+jump) )
918 field_out(ind1d) = field_out(ind1d) + &
919 coef * ( field_in(ind3d) - field_in(ind3d+jump_end) )
928 sll_int32,
intent( in ) :: n_dofs(3)
929 sll_real64,
intent( in ) :: delta_x(3)
930 sll_real64,
intent( in ) :: field_in(:)
931 sll_real64,
intent( out ) :: field_out(:)
934 sll_real64 :: coef(2)
935 sll_int32 :: stride(2), jump(2), indp(2), n_total
936 sll_int32 :: i,j,k, ind3d, ind3d_1, ind3d_2
938 n_total = product(n_dofs)
942 coef(1) = 1.0_f64/ delta_x(2)
943 coef(2) = -1.0_f64/ delta_x(3)
945 stride(1) = n_dofs(1)
946 stride(2) = n_dofs(1)*n_dofs(2)
954 indp(2) = stride(2)*(n_dofs(3)-1)
956 indp(2) = - stride(2)
960 indp(1) = stride(1)*(n_dofs(2)-1)
962 indp(1) = - stride(1)
967 ind3d_1 = ind3d +indp(1)+jump(2)
968 ind3d_2 = ind3d +indp(2)+jump(1)
971 coef(1) * ( field_in( ind3d+jump(2) ) -&
972 field_in( ind3d_1 )) + &
973 coef(2) * ( field_in(ind3d+jump(1) ) - &
980 coef(1) = 1.0_f64/ delta_x(3)
981 coef(2) = -1.0_f64/ delta_x(1)
984 stride(1) = n_dofs(1)*n_dofs(2)
991 indp(1) = stride(1)*(n_dofs(3)-1)
993 indp(1) = - stride(1)
998 indp(2) = stride(2)*(n_dofs(1)-1)
1000 indp(2) = - stride(2)
1004 ind3d_1 = ind3d +indp(1)+jump(2)
1005 ind3d_2 = ind3d +indp(2)+jump(1)
1007 field_out(ind3d) = &
1008 coef(1) * ( field_in( ind3d+jump(2) ) -&
1009 field_in( ind3d_1 ) )+ &
1010 coef(2) * ( field_in(ind3d+jump(1) ) - &
1011 field_in( ind3d_2 ))
1017 coef(1) = 1.0_f64/ delta_x(1)
1018 coef(2) = -1.0_f64/ delta_x(2)
1021 stride(2) = n_dofs(1)
1023 jump(1) = -2*n_total
1029 indp(2) = stride(2)*(n_dofs(2)-1)
1031 indp(2) = - stride(2)
1035 indp(1) = stride(1)*(n_dofs(1)-1)
1037 indp(1) = - stride(1)
1041 ind3d_1 = ind3d +indp(1)+jump(2)
1042 ind3d_2 = ind3d +indp(2)+jump(1)
1044 field_out(ind3d) = &
1045 coef(1) * ( field_in( ind3d+jump(2) ) -&
1046 field_in( ind3d_1 ) )+ &
1047 coef(2) * ( field_in(ind3d+jump(1) ) - &
1048 field_in( ind3d_2 ) )
1058 sll_int32,
intent( in ) :: n_dofs(3)
1059 sll_real64,
intent( in ) :: delta_x(3)
1060 sll_real64,
intent( in ) :: field_in(:)
1061 sll_real64,
intent( out ) :: field_out(:)
1064 sll_real64 :: coef(2)
1065 sll_int32 :: stride(2), jump(2), indp(2), n_total
1066 sll_int32 :: i,j,k, ind3d, ind3d_1, ind3d_2
1068 n_total = product(n_dofs)
1071 coef(1) = -1.0_f64/ delta_x(2)
1072 coef(2) = 1.0_f64/ delta_x(3)
1074 stride(1) = n_dofs(1)
1075 stride(2) = n_dofs(1)*n_dofs(2)
1082 if (k == n_dofs(3))
then
1083 indp(2) = -stride(2)*(n_dofs(3)-1)
1088 if ( j== n_dofs(2))
then
1089 indp(1) = -stride(1)*(n_dofs(2)-1)
1096 ind3d_1 = ind3d +indp(1)+jump(2)
1097 ind3d_2 = ind3d +indp(2)+jump(1)
1099 field_out(ind3d) = &
1100 coef(1) * ( field_in( ind3d+jump(2) ) -&
1101 field_in( ind3d_1 )) + &
1102 coef(2) * ( field_in(ind3d+jump(1) ) - &
1103 field_in( ind3d_2 ))
1109 coef(1) = -1.0_f64/ delta_x(3)
1110 coef(2) = 1.0_f64/ delta_x(1)
1113 stride(1) = n_dofs(1)*n_dofs(2)
1119 if (k == n_dofs(3))
then
1120 indp(1) = -stride(1)*(n_dofs(3)-1)
1126 if ( i==n_dofs(1) )
then
1127 indp(2) = -stride(2)*(n_dofs(1)-1)
1133 ind3d_1 = ind3d +indp(1)+jump(2)
1134 ind3d_2 = ind3d +indp(2)+jump(1)
1136 field_out(ind3d) = &
1137 coef(1) * ( field_in( ind3d+jump(2) ) -&
1138 field_in( ind3d_1 ) )+ &
1139 coef(2) * ( field_in(ind3d+jump(1) ) - &
1140 field_in( ind3d_2 ))
1146 coef(1) = -1.0_f64/ delta_x(1)
1147 coef(2) = 1.0_f64/ delta_x(2)
1150 stride(2) = n_dofs(1)
1152 jump(1) = -2*n_total
1157 if (j == n_dofs(2))
then
1158 indp(2) = -stride(2)*(n_dofs(2)-1)
1163 if ( i==n_dofs(1) )
then
1164 indp(1) = -stride(1)*(n_dofs(1)-1)
1170 ind3d_1 = ind3d +indp(1)+jump(2)
1171 ind3d_2 = ind3d +indp(2)+jump(1)
1173 field_out(ind3d) = &
1174 coef(1) * ( field_in( ind3d+jump(2) ) -&
1175 field_in( ind3d_1 ) )+ &
1176 coef(2) * ( field_in(ind3d+jump(1) ) - &
1177 field_in( ind3d_2 ) )
Fortran module where set some physical and mathematical constants.
real(kind=f64), parameter, public sll_p_twopi
Gauss-Legendre integration.
real(kind=f64) function, dimension(2, 1:npoints), public sll_f_gauss_legendre_points_and_weights(npoints, a, b)
Returns a 2d array of size (2,npoints) containing gauss-legendre points and weights in the interval [...
Low level arbitrary degree splines.
Utilites for Maxwell solver's with spline finite elements.
subroutine, public sll_s_multiply_g(n_dofs, delta_x, field_in, field_out)
Multiply by dicrete gradient matrix (3d version)
subroutine, public sll_s_multiply_g_1d(n_dofs, delta_x, in, out)
Multiplication of the input vector in by the derivative matrix G.
subroutine, public sll_s_spline_fem_multiply_massmixed(n_cells, degree, mass, invec, outvec)
Multiplication of the mix mass matrix given by a mass line mass.
subroutine, public sll_s_spline_fem_multiply_mass(n_cells, degree, mass, invec, outvec)
Multiply the vector invec with the spline FEM mass matrix with mass line mass.
subroutine, public sll_s_spline_fem_mass_line_boundary_full(deg, profile, spline, row, n_cells, mass_line)
Function computing the boundary part for a mass matrix with clamped splines of degree (full version w...
subroutine, public sll_s_multiply_c(n_dofs, delta_x, field_in, field_out)
Multiply by discrete curl matrix.
subroutine, public sll_s_multiply_ct(n_dofs, delta_x, field_in, field_out)
Multiply by transpose of discrete curl matrix.
subroutine, public sll_s_spline_fem_mixedmass_line_full(deg1, deg2, profile, mass_line, cell, n_cells)
Helper function to find line of mass matrix ( N_i^p N_j^{p-1}))
subroutine, public sll_s_multiply_gt(n_dofs, delta_x, field_in, field_out)
Multiply by transpose of dicrete gradient matrix (3d version)
subroutine, public sll_s_multiply_gt_1d(n_dofs, delta_x, in, out)
Multiplication of the input vector in by the transposed derivative matrix G^T
subroutine, public sll_s_spline_fem_mass_line_boundary(degree, spline, mass_line)
Function computing the boundary part for a mass matrix with clamped splines of degree.
subroutine, public sll_s_spline_fem_interpolation_eigenvalues(degree, ndofs, eig)
Compute the eigenvalues of the interpolation matrix for splines of degree degree (with first grid poi...
subroutine, public sll_s_spline_fem_mixedmass_line_boundary(deg1, deg2, profile, spline1, spline2, row, n_cells, mass_line)
Function computing the boundary part for a mass matrix with clamped splines of degree (full version w...
subroutine, public sll_s_spline_fem_mixedmass_line(deg, mass_line)
Helper function to find line of mass matrix ( N_i^p N_j^{p-1}))
subroutine, public sll_s_spline_fem_mass_line(degree, mass_line)
Computes the mass line for a mass matrix with degree splines.
subroutine, public sll_s_spline_fem_mass_line_full(deg, profile, mass_line, row, n_cells)
Helper function to find line of mass matrix (full version without symmetry part)
subroutine, public sll_s_spline_fem_compute_mass_eig(n_cells, degree, mass_line, eig_values_mass)
Compute eigenvalues of mass matrix with given line mass_line.
real(kind=f64) function, public sll_f_spline_pp_horner_1d(degree, pp_coeffs, x, index)
Perform a 1d hornerschema on the pp_coeffs at index.
Module to select the kind parameter.
arbitrary degree 1d spline