Report Typos and Errors    
Semi-Lagrangian Library
Modular library for kinetic and gyrokinetic simulations of plasmas in fusion energy devices.
sll_m_spline_fem_utilities_3d.F90
Go to the documentation of this file.
1 
8 
10  !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11 #include "sll_assert.h"
12 #include "sll_errors.h"
13 #include "sll_memory.h"
14 #include "sll_working_precision.h"
15 
16  use sll_m_matrix_csr, only: &
18 
19  use sll_m_low_level_bsplines, only: &
20  sll_s_uniform_bsplines_eval_basis
21 
24 
26 
27  use sll_m_mapping_3d, only: &
29 
30  implicit none
31 
32  public :: &
38 
39 
40  private
41  !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
42 
43  abstract interface
44  function sll_i_profile_function( x, component ) result(res)
46  sll_real64, intent(in) :: x(3)
47  sll_int32, optional, intent(in) :: component(:)
48  sll_real64 :: res
49  end function sll_i_profile_function
50  end interface
51 
52 contains
53 
55  subroutine sll_s_spline_fem_mass3d( n_cells, deg, component, matrix, profile, n_cells_min, n_cells_max)
56  sll_int32, intent( in ) :: n_cells(3)
57  sll_int32, intent( in ) :: deg(3)
58  sll_int32, intent( in ) :: component
59  type(sll_t_matrix_csr), intent( out ) :: matrix
60  procedure(sll_i_profile_function) :: profile
61  sll_int32, optional, intent( in ) :: n_cells_min(3)
62  sll_int32, optional, intent( in ) :: n_cells_max(3)
63  !local variables
64  sll_int32 :: i1, i2, i3, ind, k, begin(3), limit(3)
65  sll_int32 :: q(3)
66  sll_real64 :: mass_line( 1:(2*deg(1)+1)*(2*deg(2)+1)*(2*deg(3)+1))
67  sll_real64, allocatable :: xw_gauss_d1(:,:), xw_gauss_d2(:,:), xw_gauss_d3(:,:)
68  sll_real64, allocatable :: bspl_d1(:,:), bspl_d2(:,:), bspl_d3(:,:)
69 
70  q = 2*deg+1!max(2*deg-1,1) !number of quadrature points
71 
72  allocate( xw_gauss_d1(1:2, 1:q(1)) )
73  allocate( xw_gauss_d2(1:2, 1:q(2)) )
74  allocate( xw_gauss_d3(1:2, 1:q(3)) )
75  allocate( bspl_d1(1:deg(1)+1, 1:q(1)) )
76  allocate( bspl_d2(1:deg(2)+1, 1:q(2)) )
77  allocate( bspl_d3(1:deg(3)+1, 1:q(3)) )
78 
79  if( present(n_cells_min) .and. present(n_cells_max) )then
80  ind = 1+((n_cells_min(2)-1)*n_cells(1)+(n_cells_min(3)-1)*n_cells(2)*n_cells(1))*&
81  (2*deg(1)+1)*(2*deg(2)+1)*(2*deg(3)+1)
82  begin = n_cells_min
83  limit = n_cells_max
84  else
85  ind = 1
86  begin = 1
87  limit = n_cells
88  end if
89 
90  call sll_s_spline_fem_sparsity_mass3d( deg(:), n_cells, matrix )
91  bspl_d1 = 0._f64
92  ! take enough Gauss points so that projection is exact for splines of deg deg
93  ! rescale on [0,1] for compatibility with B-splines
94  xw_gauss_d1 = sll_f_gauss_legendre_points_and_weights( q(1), 0._f64, 1._f64 )
95  ! Compute bsplines at gauss_points
96  do k = 1, q(1)
97  call sll_s_uniform_bsplines_eval_basis( deg(1), xw_gauss_d1(1,k), bspl_d1(:, k) )
98  end do
99  bspl_d2 = 0._f64
100  xw_gauss_d2 = sll_f_gauss_legendre_points_and_weights( q(2), 0._f64, 1._f64 )
101  ! Compute bsplines at gauss_points
102  do k=1, q(2)
103  call sll_s_uniform_bsplines_eval_basis( deg(2), xw_gauss_d2(1,k), bspl_d2(:,k) )
104  end do
105  bspl_d3 = 0._f64
106  xw_gauss_d3 = sll_f_gauss_legendre_points_and_weights( q(3), 0._f64, 1._f64 )
107  ! Compute bsplines at gauss_points
108  do k = 1, q(3)
109  call sll_s_uniform_bsplines_eval_basis( deg(3), xw_gauss_d3(1,k), bspl_d3(:,k) )
110  end do
111  !loop over rows of the mass matrix to compute and assemble the massline
112  do i3 = begin(3), limit(3)
113  do i2 = begin(2), limit(2)
114  do i1 = 1, n_cells(1)
115  call sll_s_spline_fem_mass_line( q, deg, profile, [i1,i2,i3], n_cells, component, mass_line, xw_gauss_d1, xw_gauss_d2, xw_gauss_d3, bspl_d1, bspl_d2, bspl_d3 )
116  !scale with 1/n_cells
117  mass_line = mass_line/real(n_cells(1)*n_cells(2)*n_cells(3),f64)
118  call assemble_mass3d( deg(:), n_cells, mass_line(:), matrix, [i1,i2,i3], ind )
119  end do
120  end do
121  end do
122 
123  !SLL_ASSERT( ind == matrix%n_nnz+1 )
124 
125  end subroutine sll_s_spline_fem_mass3d
126 
127  !---------------------------------------------------------------------------!
129  subroutine sll_s_spline_fem_mass_line ( q, deg, profile, row, n_cells, component, mass_line, xw_gauss_d1, xw_gauss_d2, xw_gauss_d3, bspl_d1, bspl_d2, bspl_d3 )
130  sll_int32, intent( in ) :: q(3)
131  sll_int32, intent( in ) :: deg(3)
132  procedure(sll_i_profile_function) :: profile
133  sll_int32, intent( in ) :: row(3)
134  sll_int32, intent( in ) :: n_cells(3)
135  sll_int32, intent( in ) :: component
136  sll_real64, intent( out ) :: mass_line((2*deg(1)+1)*(2*deg(2)+1)*(2*deg(3)+1))
137  sll_real64, intent ( in ) :: xw_gauss_d1(2, q(1)), xw_gauss_d2(2, q(2)), xw_gauss_d3(2, q(3))
138  sll_real64, intent( in ) :: bspl_d1(deg(1)+1, q(1)), bspl_d2(deg(2)+1, q(2)), bspl_d3(deg(3)+1, q(3))
139  ! local variables
140  sll_int32 :: int1, int2, int3, j1, j2, j3, k1, k2, k3, l1, l2, l3
141  sll_real64 :: c(3)
142  sll_int32 :: limit(3), ind1(3), ind2(3), ind3(3), ind4(3)
143 
144  mass_line = 0._f64
145  !loop over massline entries in third dimension
146  do j3 = 1, 2*deg(3)+1
147  if(j3 <= deg(3))then
148  limit(3) = deg(3)
149  ind1(3) = deg(3)+1-j3 !position in massline
150  else
151  limit(3) = 2*deg(3)+1
152  ind1(3) = j3 !position in massline
153  end if
154  !loop over spline cells
155  do int3 = j3, limit(3)
156  if(j3 <= deg(3))then
157  ind2(3) = deg(3)+1-int3+j3 !spline1
158  ind3(3) = deg(3)+1-int3 !spline2
159  ind4(3) = int3-j3 !left cellborder
160  else
161  ind2(3) = int3-j3+1 !spline1
162  ind3(3) = int3-deg(3) !spline2
163  ind4(3) = deg(3)+j3-int3 !left cellborder
164  end if
165  !loop over massline entries in second dimension
166  do j2 = 1, 2*deg(2)+1
167  if(j2 <= deg(2))then
168  limit(2) = deg(2)
169  ind1(2) = deg(2)+1-j2
170  else
171  limit(2) = 2*deg(2)+1
172  ind1(2) = j2
173  end if
174  !loop over spline cells
175  do int2 = j2, limit(2)
176  if(j2 <= deg(2))then
177  ind2(2) = deg(2)+1-int2+j2 !spline1
178  ind3(2) = deg(2)+1-int2 !spline2
179  ind4(2) = int2-j2 !left cellborder
180  else
181  ind2(2) = int2-j2+1 !spline1
182  ind3(2) = int2-deg(2) !spline2
183  ind4(2) = deg(2)+j2-int2 !left cellborder
184  end if
185  !loop over massline entries in first dimension
186  do j1 = 1, 2*deg(1)+1
187  if(j1 <= deg(1))then
188  limit(1) = deg(1)
189  ind1(1) = deg(1)+1-j1
190  else
191  limit(1) = 2*deg(1)+1
192  ind1(1) = j1
193  end if
194  !loop over spline cells
195  do int1 = j1, limit(1)
196  if(j1 <= deg(1))then
197  ind2(1) = deg(1)+1-int1+j1 !spline1
198  ind3(1) = deg(1)+1-int1 !spline2
199  ind4(1) = int1-j1 !left cellborder
200  else
201  ind2(1) = int1-j1+1 !spline1
202  ind3(1) = int1-deg(1) !spline2
203  ind4(1) = deg(1)+j1-int1 !left cellborder
204  end if
205  ! loop over Gauss points
206  do l3 = 1, q(3)
207  k3 = 1 - (-1)**l3 * l3/2 + q(3)*(l3+1-2*((l3+1)/2) )!modulo(l3+1,2)
208  c(3) = (xw_gauss_d3(1,k3)+ real( row(3)-1+ind4(3)-((row(3)-1+ind4(3))/n_cells(3))*n_cells(3),f64 ))/real(n_cells(3),f64)
209  do l2 = 1, q(2)
210  k2 = 1 - (-1)**l2 * l2/2 + q(2)*(l2+1-2*((l2+1)/2) )!modulo(l2+1,2)
211  c(2) = (xw_gauss_d2(1,k2)+ real( row(2)-1+ind4(2)-((row(2)-1+ind4(2))/n_cells(2))*n_cells(2),f64 ))/real(n_cells(2),f64)
212  do l1 = 1, q(1)
213  k1 = 1 - (-1)**l1 * l1/2 + q(1)*(l1+1-2*((l1+1)/2) )!modulo(l1+1,2)
214  c(1) = (xw_gauss_d1(1,k1)+ real( row(1)-1+ind4(1)-((row(1)-1+ind4(1))/n_cells(1))*n_cells(1),f64 ))/real(n_cells(1),f64)
215  mass_line(ind1(1)+(ind1(2)-1)*(2*deg(1)+1)+(ind1(3)-1)*(2*deg(1)+1)*(2*deg(2)+1)) = &
216  mass_line(ind1(1)+(ind1(2)-1)*(2*deg(1)+1)+(ind1(3)-1)*(2*deg(1)+1)*(2*deg(2)+1)) + &
217  xw_gauss_d1(2,k1)* xw_gauss_d2(2,k2)* xw_gauss_d3(2,k3) *&
218  bspl_d1(ind2(1), k1)*&
219  bspl_d2(ind2(2), k2)*&
220  bspl_d3(ind2(3), k3)*&
221  bspl_d1(ind3(1), k1)*&
222  bspl_d2(ind3(2), k2)*&
223  bspl_d3(ind3(3), k3)*&
224  profile( c, [component] )
225  enddo
226  enddo
227  end do
228  end do
229  end do
230  end do
231  enddo
232  end do
233  end do
234 
235  end subroutine sll_s_spline_fem_mass_line
236 
237 
239  Subroutine sll_s_spline_fem_mixedmass3d( n_cells, deg1, deg2, component, matrix, profile, n_cells_min, n_cells_max )
240  sll_int32, intent( in ) :: n_cells(3)
241  sll_int32, intent( in ) :: deg1(3), deg2(3)
242  sll_int32, intent( in ) :: component(2)
243  procedure(sll_i_profile_function) :: profile
244  type(sll_t_matrix_csr), intent( out ) :: matrix
245  sll_int32, optional, intent( in ) :: n_cells_min(3)
246  sll_int32, optional, intent( in ) :: n_cells_max(3)
247  !local variables
248  sll_int32 :: i1, i2, i3, ind, k, begin(3), limit(3), q(3)
249  sll_real64 :: mass_line(1:(deg1(1)+deg2(1)+1)*(deg1(2)+deg2(2)+1)*(deg1(3)+deg2(3)+1))
250  sll_real64, allocatable :: xw_gauss_d1(:,:), xw_gauss_d2(:,:), xw_gauss_d3(:,:)
251  sll_real64, allocatable :: bspl_d1a(:,:), bspl_d2a(:,:), bspl_d3a(:,:)
252  sll_real64, allocatable :: bspl_d1b(:,:), bspl_d2b(:,:), bspl_d3b(:,:)
253 
254  !quadrature points
255  q = 2*max(deg1,deg2)+1!max(2*max(deg1,deg2), 1)
256 
257  if( present(n_cells_min) .and. present(n_cells_max) )then
258  ind = 1+((n_cells_min(2)-1)*n_cells(1)+(n_cells_min(3)-1)*n_cells(2)*n_cells(1))*&
259  (deg1(1)+deg2(1)+1)*(deg1(2)+deg2(2)+1)*(deg1(3)+deg2(3)+1)
260  begin = n_cells_min
261  limit = n_cells_max
262  else
263  ind = 1
264  begin = 1
265  limit = n_cells
266  end if
267 
268  call sll_s_spline_fem_sparsity_mixedmass3d( deg1(:), deg2(:), n_cells, matrix )
269  allocate( xw_gauss_d1(1:2, 1:q(1)) )
270  allocate( xw_gauss_d2(1:2, 1:q(2)) )
271  allocate( xw_gauss_d3(1:2, 1:q(3)) )
272  allocate( bspl_d1a(1:deg1(1)+1, 1:q(1)) )
273  allocate( bspl_d2a(1:deg1(2)+1, 1:q(2)) )
274  allocate( bspl_d3a(1:deg1(3)+1, 1:q(3)) )
275  allocate( bspl_d1b(1:deg2(1)+1, 1:q(1)) )
276  allocate( bspl_d2b(1:deg2(2)+1, 1:q(2)) )
277  allocate( bspl_d3b(1:deg2(3)+1, 1:q(3)) )
278 
279  bspl_d1a = 0._f64
280  bspl_d1b = 0._f64
281  ! take enough Gauss points so that projection is exact for splines of deg deg
282  ! rescale on [0,1] for compatibility with B-splines
283  xw_gauss_d1 = sll_f_gauss_legendre_points_and_weights( q(1), 0._f64, 1._f64 )
284  ! Compute bsplines at gauss_points
285  do k = 1, q(1)
286  call sll_s_uniform_bsplines_eval_basis( deg1(1),xw_gauss_d1(1,k), bspl_d1a(1:deg1(1)+1, k) )
287  call sll_s_uniform_bsplines_eval_basis( deg2(1),xw_gauss_d1(1,k), bspl_d1b(1:deg2(1)+1, k) )
288  end do
289  bspl_d2a=0._f64
290  bspl_d2b=0._f64
291  xw_gauss_d2 = sll_f_gauss_legendre_points_and_weights( q(2), 0._f64, 1._f64 )
292  ! Compute bsplines at gauss_points
293  do k=1, q(2)
294  call sll_s_uniform_bsplines_eval_basis( deg1(2),xw_gauss_d2(1,k), bspl_d2a(1:deg1(2)+1, k) )
295  call sll_s_uniform_bsplines_eval_basis( deg2(2),xw_gauss_d2(1,k), bspl_d2b(1:deg2(2)+1, k) )
296  end do
297  bspl_d3a = 0._f64
298  bspl_d3b = 0._f64
299  xw_gauss_d3 = sll_f_gauss_legendre_points_and_weights( q(3), 0._f64, 1._f64 )
300  ! Compute bsplines at gauss_points
301  do k = 1, q(3)
302  call sll_s_uniform_bsplines_eval_basis( deg1(3),xw_gauss_d3(1,k), bspl_d3a(1:deg1(3)+1, k) )
303  call sll_s_uniform_bsplines_eval_basis( deg2(3),xw_gauss_d3(1,k), bspl_d3b(1:deg2(3)+1, k) )
304  end do
305  !loop over rows of the mass matrix to compute and assemble the massline
306  do i3 = begin(3), limit(3)
307  do i2 = begin(2), limit(2)
308  do i1 = 1, n_cells(1)
309  call sll_s_spline_fem_mixedmass_line( q(:), deg1(:), deg2(:), profile, [i1,i2,i3], n_cells, component, mass_line(:), xw_gauss_d1, xw_gauss_d2, xw_gauss_d3, bspl_d1a, bspl_d2a, bspl_d3a, bspl_d1b, bspl_d2b, bspl_d3b )
310  !scale with delta_x=1/n_cells
311  mass_line = mass_line/real(n_cells(1)*n_cells(2)*n_cells(3),f64)
312  call assemble_mixedmass3d( deg1(:), deg2(:), n_cells, mass_line(:), matrix, [i1,i2,i3], ind )
313  end do
314  end do
315  end do
316 
317  ! SLL_ASSERT( ind == matrix%n_nnz+1 )
318 
319  deallocate( xw_gauss_d1 )
320  deallocate( xw_gauss_d2 )
321  deallocate( xw_gauss_d3 )
322  deallocate( bspl_d1a )
323  deallocate( bspl_d2a )
324  deallocate( bspl_d3a )
325  deallocate( bspl_d1b )
326  deallocate( bspl_d2b )
327  deallocate( bspl_d3b )
328 
329  end subroutine sll_s_spline_fem_mixedmass3d
330 
331 
332  ! Computes the mixed mass line for a mass matrix with \a degree splines
333  subroutine sll_s_spline_fem_mixedmass_line( q, deg1, deg2, profile, row, n_cells, component, mass_line, xw_gauss_d1, xw_gauss_d2, xw_gauss_d3, bspl_d1a, bspl_d2a, bspl_d3a, bspl_d1b, bspl_d2b, bspl_d3b )
334  sll_int32, intent( in ) :: q(3)
335  sll_int32, intent( in ) :: deg1(3), deg2(3)
336  procedure(sll_i_profile_function) :: profile
337  sll_int32, intent( in ) :: row(3)
338  sll_int32, intent( in ) :: n_cells(3)
339  sll_int32, intent( in ) :: component(2)
340  sll_real64, intent( out ) :: mass_line((deg1(1)+deg2(1)+1)*(deg1(2)+deg2(2)+1)*(deg1(3)+deg2(3)+1))
341 
342  sll_real64, intent( in ) :: xw_gauss_d1(2, q(1)), xw_gauss_d2(2, q(2)), xw_gauss_d3(2, q(3))
343  sll_real64, intent( in ) :: bspl_d1a(deg1(1)+1, q(1)), bspl_d2a(deg1(2)+1, q(2)), bspl_d3a(deg1(3)+1, q(3))
344  sll_real64, intent( in ) :: bspl_d1b(deg2(1)+1, q(1)), bspl_d2b(deg2(2)+1, q(2)), bspl_d3b(deg2(3)+1, q(3))
345  ! local variables
346  sll_int32 :: int1, int2, int3, j1, j2, j3, k1, k2, k3, l1, l2, l3
347  sll_real64 :: c(3)
348  sll_int32 :: limit(3), ind1(3), ind2(3), ind3(3), ind4(3)
349 
350  mass_line = 0._f64
351 
352  !loop over massline entries in third dimension
353  do j3 = 1, deg1(3)+deg2(3)+1
354  if(j3 <= deg2(3))then
355  limit(3) = deg2(3)
356  ind1(3) = deg2(3)+1-j3 !position in massline
357  else
358  limit(3) = deg1(3)+deg2(3)+1
359  ind1(3) = j3!position in massline
360  end if
361  ! loop over spline cells
362  do int3 = j3, min(limit(3), j3+deg2(3))
363  if(j3 <= deg2(3))then
364  ind2(3) = deg1(3)+1-int3+j3 !spline1
365  ind3(3) = deg2(3)+1-int3 !spline2
366  ind4(3) = int3-j3 !left cellborder
367  else
368  ind2(3) = limit(3)-int3+1 !spline1
369  ind3(3) = deg2(3)+1-int3+j3 !spline2
370  ind4(3) = int3-deg2(3)-1 !left cellborder
371  end if
372  !loop over massline entries in second dimension
373  do j2 = 1, deg1(2)+deg2(2)+1
374  if(j2 <= deg2(2))then
375  limit(2) = deg2(2)
376  ind1(2) = deg2(2)+1-j2
377  else
378  limit(2) = deg1(2)+deg2(2)+1
379  ind1(2) = j2
380  end if
381  ! loop over spline cells
382  do int2 = j2, min(limit(2), j2+deg2(2))
383  if(j2 <= deg2(2))then
384  ind2(2) = deg1(2)+1-int2+j2 !spline1
385  ind3(2) = deg2(2)+1-int2 !spline2
386  ind4(2) = int2-j2 !left cellborder
387  else
388  ind2(2) = limit(2)-int2+1 !spline1
389  ind3(2) = deg2(2)+1-int2+j2 !spline2
390  ind4(2) = int2-deg2(2)-1 !left cellborder
391  end if
392  !loop over massline entries in first dimension
393  do j1 = 1, deg1(1)+deg2(1)+1
394  if(j1 <= deg2(1))then
395  limit(1) = deg2(1)
396  ind1(1) = deg2(1)+1-j1
397  else
398  limit(1) = deg1(1)+deg2(1)+1
399  ind1(1) = j1
400  end if
401  ! loop over spline cells
402  do int1 = j1, min(limit(1), j1+deg2(1))
403  if(j1 <= deg2(1))then
404  ind2(1) = deg1(1)+1-int1+j1 !spline1
405  ind3(1) = deg2(1)+1-int1 !spline2
406  ind4(1) = int1-j1 !left cellborder
407  else
408  ind2(1) = limit(1)-int1+1 !spline1
409  ind3(1) = deg2(1)+1-int1+j1 !spline2
410  ind4(1) = int1-deg2(1)-1 !left cellborder
411  end if
412  ! loop over Gauss points
413  do l3 = 1, q(3)
414  k3 = 1 - (-1)**l3 * l3/2 + q(3)*(l3+1-2*((l3+1)/2) )!modulo(l3+1,2)
415  c(3) = (xw_gauss_d3(1,k3)+ real( row(3)-1+ind4(3)-((row(3)-1+ind4(3))/n_cells(3))*n_cells(3),f64 ))/real(n_cells(3),f64)
416  do l2 = 1, q(2)
417  k2 = 1 - (-1)**l2 * l2/2 + q(2)*(l2+1-2*((l2+1)/2) )!modulo(l2+1,2)
418  c(2) = (xw_gauss_d2(1,k2)+ real( row(2)-1+ind4(2)-((row(2)-1+ind4(2))/n_cells(2))*n_cells(2),f64 ))/real(n_cells(2),f64)
419  do l1 = 1, q(1)
420  k1 = 1 - (-1)**l1 * l1/2 + q(1)*(l1+1-2*((l1+1)/2) )!modulo(l1+1,2)
421  c(1) = (xw_gauss_d1(1,k1)+ real( row(1)-1+ind4(1)-((row(1)-1+ind4(1))/n_cells(1))*n_cells(1),f64 ))/real(n_cells(1),f64)
422 
423  mass_line(ind1(1)+(ind1(2)-1)*(deg1(1)+deg2(1)+1)+(ind1(3)-1)*(deg1(1)+deg2(1)+1)*(deg1(2)+deg2(2)+1)) = &
424  mass_line(ind1(1)+(ind1(2)-1)*(deg1(1)+deg2(1)+1)+(ind1(3)-1)*(deg1(1)+deg2(1)+1)*(deg1(2)+deg2(2)+1)) + &
425  xw_gauss_d1(2,k1)* xw_gauss_d2(2,k2)* xw_gauss_d3(2,k3) *&
426  bspl_d1a(ind2(1), k1)*&
427  bspl_d2a(ind2(2), k2)*&
428  bspl_d3a(ind2(3), k3)*&
429  bspl_d1b(ind3(1), k1)*&
430  bspl_d2b(ind3(2), k2)*&
431  bspl_d3b(ind3(3), k3)*&
432  profile( c, component )
433  enddo
434  enddo
435  end do
436  end do
437  end do
438  end do
439  enddo
440  end do
441  end do
442 
443 
444  end subroutine sll_s_spline_fem_mixedmass_line
445 
446 
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.
Module interfaces for coordinate transformation.
module for Compressed Sparse Row Matrix (CSR)
Helper for spline finite elements utilites.
subroutine, public assemble_mixedmass3d(deg1, deg2, n_cells, mass_line, matrix, row, ind)
Assemble the given row of the mixed mass matrix.
subroutine, public assemble_mass3d(deg, n_cells, mass_line, matrix, row, ind)
Assemble the given row of the 3d mass matrix.
subroutine, public sll_s_spline_fem_sparsity_mass3d(deg, n_cells, spmat)
Helper function to create sparsity pattern of the 3d mass matrix.
subroutine, public sll_s_spline_fem_sparsity_mixedmass3d(deg1, deg2, n_cells, spmat)
Helper function to create sparsity pattern of the 3d mass matrix.
Utilites for 3D Maxwell solvers with spline finite elements.
subroutine, public sll_s_spline_fem_mass3d(n_cells, deg, component, matrix, profile, n_cells_min, n_cells_max)
Set up 3d mass matrix for specific spline degrees and profile function.
subroutine, public sll_s_spline_fem_mixedmass3d(n_cells, deg1, deg2, component, matrix, profile, n_cells_min, n_cells_max)
Set up 3d mixed mass matrix for specific spline degree and profile function.
subroutine, public sll_s_spline_fem_mixedmass_line(q, deg1, deg2, profile, row, n_cells, component, mass_line, xw_gauss_d1, xw_gauss_d2, xw_gauss_d3, bspl_d1a, bspl_d2a, bspl_d3a, bspl_d1b, bspl_d2b, bspl_d3b)
subroutine, public sll_s_spline_fem_mass_line(q, deg, profile, row, n_cells, component, mass_line, xw_gauss_d1, xw_gauss_d2, xw_gauss_d3, bspl_d1, bspl_d2, bspl_d3)
Computes the mass line for a mass matrix with degree splines.
Module to select the kind parameter.
type collecting functions for analytical coordinate mapping
    Report Typos and Errors