Skip to content

Instantly share code, notes, and snippets.

View MSeeker1340's full-sized avatar

Xingjian Guo MSeeker1340

View GitHub Profile
@MSeeker1340
MSeeker1340 / expv-example.jl
Created October 16, 2018 02:44
Solving linear ODE using `expv`
using OrdinaryDiffEq, ExponentialUtilities
using LinearAlgebra, SparseArrays
# Example: Use expv to solve constant-coefficient linear systems
# u' = ϵu_xx + u, u ∈ [0, 1], t ∈ [0, 1], Dirichlet BC
# The analytical solution is
# u(t) = exp(tA)u(0), A = L + I
# which we approximate with expv/expv_timestep
N = 100; T = 1.0
dx = 1 / (N + 1)
@MSeeker1340
MSeeker1340 / GSoC_2018_summary.md
Created August 13, 2018 13:42
GSoC 2018 Summary

During the summer, I contributed to multiple repositories under the JuliaDiffEq organization and completed the implementation of Exponential Runge-Kutta (ExpRK) integrators. My work can be roughly summarized into three parts: the exponential utilities, the integrators and sparse Jacobian support.

Exponential Utilities

The development of utility functions/types used by the exponential occurs on the first four weeks and is summarized by the following blog posts:

Near the end of GSoC, I also migrated the utilities to a separate package ExponentialUtilities under JuliaDiffEq.

@MSeeker1340
MSeeker1340 / Krylov Funmv.md
Last active May 18, 2018 15:40
Computing matrix-function-vector products using Krylov
include("Phi.jl")
using Phi: phim_alt, phimc

Arnoldi iteration

The Arnoldi iteratrion algorithm computes a basis for the Krylov subspace

@MSeeker1340
MSeeker1340 / Phi functions.md
Last active May 18, 2018 15:20
Numerical stability analysis of phi functions
include("Phi.jl")
using Phi
using PyPlot

Utilizing the Sidje formula

@MSeeker1340
MSeeker1340 / Phi functions.md
Created May 14, 2018 19:10
Prototype phi functions (scalar and matrix versions)

Phi functions

The phi functions can be defined using the recurrence relation

$$ \varphi_{k+1}(z) = \frac{\varphi_k(z) - \varphi_k(0)}{z},\quad \varphi_0(z) = e^z $$

The zero point values are $\varphi_k(0) = 1/k!$.

The recurrence relation naturally lends itself to a dynamic programming style implementation, where it is more efficient to calculate all $\varphi_i(z)$ for $0 \le i \le k$.