SDG 3rd biweekly report
Qingyu Qu

Review of the past two weeks

In the last two weeks, the main work has focused on the refactoring of the implemented solvers, some progress can be summarized as follows:

  1. Make the API of implemented solvers more consistent and easy to use. For example, the most block diagonal matrices solving in setting up collocation matrix is now simply AlmostBlockDiagonals.factor and AlmostBlockDiagonals.substitution.

  2. The matrices and vector indices are no longer the awkward integer-to-integer slicing but with a more intuitive and easy-to-read style.

  3. The user interface has been changed to user friendly style which we are already very familiar with:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
global function fsub(du, u, t)
e = 2.7
du[1] = (1+u[2]-sin(t))*u[4] + cos(t)
du[2] = cos(t)
du[3] = u[4]
du[4] = (u[1]-sin(t))*(u[4]-e^t)
end

global function dfsub(df, u, t)
e = 2.7
df[1,1] = 0
df[1,2] = u[4]
df[1,3] = 0
df[1,4] = 1+u[2]-sin(t)

df[2,1] = 0
df[2,2] = 0
df[2,3] = 0
df[2,4] = 0

df[3,1] = 0
df[3,2] = 0
df[3,3] = 0
df[3,4] = 1

df[4,1] = u[4]-e^t
df[4,2] = 0
df[4,3] = 0
df[4,4] = u[1]-sin(t)
end

global function gsub(res, u, p, t)
res[1] = u[1] # t==0.0
res[2] = u[3] - 1 # t == 0.0
res[3] = u[2] - sin(1.0) # t == 1.0
end

global function dgsub(dres, u, p, t)
dres[1] = [1.0, 0.0, 0.0] #corresponding dg
dres[2] = [0.0, 0.0, 1.0]
dres[3] = [0.0, 1.0, 0.0]
end

(The boundary conditions and derivative of boundary conditions need further modification to be able to directly plug into the existing SciMLBase.jl and DiffEqBase.jl).

The overall computing flow can be summarized as follows:

pk83iM6.png

More TODOs:

  1. According to the above computing flow graph, refactor the whole solving process and utilize the init-cache-solve-cache process in MIRK solvers.

  2. Continue to refactor the solver, especially the collocation equations setting up part.

  3. Try the implemented solver on different examples and see if there are any improvements we need to complete.