Report Typos and Errors    
Semi-Lagrangian Library
Modular library for kinetic and gyrokinetic simulations of plasmas in fusion energy devices.
sll_k_make_cos_onegaussian_init.F90
Go to the documentation of this file.
1  read(file_id, cos_onegaussian)
2  allocate( params%kx(params%dims(1),params%n_cos) )
3  allocate( params%modnum(params%dims(1),params%n_cos) )
4  allocate( params%alpha(params%n_cos) )
5  allocate( params%phase_shift(params%n_cos) )
6  allocate( params%v_thermal(params%dims(2),1) )
7  allocate( params%v_mean(params%dims(2),1) )
8  allocate( params%normal(1) )
9  allocate( params%delta(1) )
10 
11  params%n_gaussians = 1
12  if ( params%n_cos == 1 ) then
13  params%kx(:,1) = kx
14  params%modnum(:,1) = modnum
15  else
16  params%kx = 0.0_f64
17  params%modnum = 0.0_f64
18  do j=1, params%n_cos
19  params%kx(j,j) = kx(j)
20  params%modnum(j,j) = modnum(j)
21  end do
22  end if
23  params%alpha = alpha
24  params%phase_shift=phase_shift
25  params%v_thermal(:,1) = v_thermal
26  params%v_mean(:,1) = v_mean
27 
28  params%normal = 1.0_f64/(sll_p_twopi**(0.5_f64*real(params%dims(2),f64))*&
29  product(params%v_thermal(:,1)))
30 
31  params%delta(1) = 1.0_f64
32 
33 end subroutine
    Report Typos and Errors