Report Typos and Errors    
Semi-Lagrangian Library
Modular library for kinetic and gyrokinetic simulations of plasmas in fusion energy devices.
sll_m_time_composition.F90
Go to the documentation of this file.
1 ! Define coefficients for composition methods of symmetric and first order methods
2 !
4 !
5 
7 
8 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
9 #include "sll_memory.h"
10 #include "sll_working_precision.h"
11 
12  implicit none
13 
14  public :: &
16 
17  private
18 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
19 
22  sll_int32 :: order
23  sll_real64, dimension(:), allocatable :: gamma !coefficients, already symmetric
24  sll_int32 :: stages
25  contains
26  procedure, pass(this) :: init => time_composition_sym_sym
27 ! procedure, pass(this) :: coeff => comp_coeff_
29 
30 contains
31 
33 ! function time_composition_sym_sym_stages( order)
34 ! end function time_composition_sym_sym_stages
35 
38  subroutine time_composition_sym_sym(this, order, stages)
39  sll_int32, intent(in) :: order, stages
40  class(sll_t_comp_coeff_sym_sym), intent(inout) :: this
41  sll_int32 :: idx
42 
43  this%order = order
44  this%stages = stages
45 
46  allocate (this%gamma(1:stages))
47  SELECT CASE (order)
48  CASE (1)
49  this%gamma = 1.0_f64/stages
50 
51  !########################################
52  CASE (2)
53  SELECT CASE (stages)
54  CASE (3)
55  this%gamma(1) = 1.3512071919596576340476878089715_f64
56  this%gamma(2) = -1.7024143839193152680953756179429_f64
57  END SELECT
58 
59  !########################################
60  CASE (6)
61  SELECT CASE (stages)
62  CASE (7)
63  this%gamma(1) = 0.78451361047755726381949763_f64
64  this%gamma(2) = 0.23557321335935813368479318_f64
65  this%gamma(3) = -1.17767998417887100694641568_f64
66  this%gamma(4) = -1.31518632068391121888424973_f64
67  CASE (9)
68  this%gamma(1) = 0.39216144400731413927925056_f64
69  this%gamma(2) = 0.33259913678935943859974864_f64
70  this%gamma(3) = -0.70624617255763935980996482_f64
71  this%gamma(4) = 0.08221359629355080023149045_f64
72  this%gamma(5) = 0.79854399093482996339895035_f64
73  END SELECT
74 
75  !###################################################
76  CASE (8)
77  SELECT CASE (stages)
78  CASE (15)
79  this%gamma(1) = 0.74167036435061295344822780_f64
80  this%gamma(2) = -0.40910082580003159399730010_f64
81  this%gamma(3) = 0.19075471029623837995387626_f64
82  this%gamma(4) = -0.57386247111608226665638773_f64
83  this%gamma(5) = 0.29906418130365592384446354_f64
84  this%gamma(6) = 0.33462491824529818378495798_f64
85  this%gamma(7) = 0.31529309239676659663205666_f64
86  this%gamma(8) = -0.79688793935291635401978884_f64
87  CASE (17)
88  this%gamma(1) = 0.13020248308889008087881763_f64
89  this%gamma(2) = 0.56116298177510838456196441_f64
90  this%gamma(3) = -0.38947496264484728640807860_f64
91  this%gamma(4) = 0.15884190655515560089621075_f64
92  this%gamma(5) = -0.39590389413323757733623154_f64
93  this%gamma(6) = 0.18453964097831570709183254_f64
94  this%gamma(7) = 0.25837438768632204729397911_f64
95  this%gamma(8) = 0.29501172360931029887096624_f64
96  this%gamma(9) = -0.60550853383003451169892108_f64
97  END SELECT
98  !###################################################
99  CASE (10)
100  SELECT CASE (stages)
101  CASE (35)
102  this%gamma(1) = 0.07879572252168641926390768_f64
103  this%gamma(2) = 0.31309610341510852776481247_f64
104  this%gamma(3) = 0.02791838323507806610952027_f64
105  this%gamma(4) = -0.22959284159390709415121340_f64
106  this%gamma(5) = 0.13096206107716486317465686_f64
107  this%gamma(6) = -0.26973340565451071434460973_f64
108  this%gamma(7) = 0.07497334315589143566613711_f64
109  this%gamma(8) = 0.11199342399981020488957508_f64
110  this%gamma(9) = 0.36613344954622675119314812_f64
111  this%gamma(10) = -0.39910563013603589787862981_f64
112  this%gamma(11) = 0.10308739852747107731580277_f64
113  this%gamma(12) = 0.41143087395589023782070412_f64
114  this%gamma(13) = -0.00486636058313526176219566_f64
115  this%gamma(14) = -0.39203335370863990644808194_f64
116  this%gamma(15) = 0.05194250296244964703718290_f64
117  this%gamma(16) = 0.05066509075992449633587434_f64
118  this%gamma(17) = 0.04967437063972987905456880_f64
119  this%gamma(18) = 0.04931773575959453791768001_f64
120  END SELECT
121  END SELECT
122 
123 !symmetry
124  do idx = 1, stages/2 !fortran intrinsic ceiling
125  this%gamma(stages - (idx - 1)) = this%gamma(idx)
126  end do
127 
128  end subroutine time_composition_sym_sym
129 
130 end module sll_m_time_composition
131 
subroutine time_composition_sym_sym(this, order, stages)
returns available stages for composition of desired order
Symmetric Composition of Symmetric Methods.
    Report Typos and Errors