Skip to content
This repository was archived by the owner on Jan 12, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
DiffEqDevMaterials
# DiffEqDevMaterials

Development materials, research notes, and examples for the SciML differential equations ecosystem.

This repository contains:

- **operators/**: Examples and tutorials for DiffEqOperators.jl, including solving PDEs (Heat equation, KdV equation, Bellman equations)
- **newton/**: Research notes on nonlinear systems arising from stiff equations
- **dae_adjoint/**: Derivation of semi-explicit DAE adjoint methods
- **nordsieck/**: Materials on Nordsieck form for multistep methods

These materials support the development of various SciML packages and provide deeper mathematical context for differential equation solving techniques.
6 changes: 4 additions & 2 deletions dae_adjoint/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Derivation of semi-explicit DAE adjoint
# Derivation of Semi-Explicit DAE Adjoint

The PDF is at output/main.pdf.
This document derives the adjoint sensitivity method for semi-explicit differential-algebraic equations (DAEs).

The PDF is available at `output/main.pdf`.
6 changes: 4 additions & 2 deletions newton/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# A Brief Note on the Nonlinear Systems Arise from Stiff Equations
# A Brief Note on the Nonlinear Systems that Arise from Stiff Equations

The PDF is at output/main.pdf.
This note explores the nonlinear systems that arise when solving stiff differential equations using implicit methods.

The PDF is available at `output/main.pdf`.
16 changes: 8 additions & 8 deletions operators/DiffEqOperators.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

In this tutorial we will explore the basic functionalities of PDEOperator which is used to obtain the discretizations of PDEs of appropriate derivative and approximation order.

So an operator API is as follows:-
So an operator API is as follows:

A = DerivativeOperator{T}
(
Expand All @@ -20,21 +20,21 @@ Taking a specific example

A = DerivativeOperator{Float64}(2,2,1/99,10,:Dirichlet,:Dirichlet; BC=(u[1],u[end]))

this is the time independent Dirichlet BC. You can also specify a time dependent Dirichlet BC as follows:-
this is the time-independent Dirichlet BC. You can also specify a time-dependent Dirichlet BC as follows:

A = DerivativeOperator{Float64}(2,2,1/99,10,:Dirichlet,:Dirichlet; bndry_fn=(t->(u[1]*cos(t)),u[end]))

We have generated an operator which produces the 2nd order approximation of the Laplacian. We can checkout the stencil as follows:-
We have generated an operator which produces the 2nd order approximation of the Laplacian. We can check out the stencil as follows:

julia> A.stencil_coefs
3-element SVector{3,Float64}:
1.0
-2.0
1.0

We can get the linear operator as a matrix as follows:-
We can get the linear operator as a matrix as follows:

julia> full(A)
julia> Matrix(A)
10×10 Array{Float64,2}:
-2.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
1.0 -2.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
Expand All @@ -50,7 +50,7 @@ We can get the linear operator as a matrix as follows:-
Note that we **don't** need to define the `BC` only for `:D0` and `:periodic` boundary conditions so you can ignore it.


Now coming to the main functionality of DiffEqOperators ie. taking finite difference discretizations of functions.
Now coming to the main functionality of DiffEqOperators, i.e., taking finite difference discretizations of functions.

julia> x = collect(0 : 1/99 : 1);
julia> u0 = x.^2 -x;
Expand All @@ -76,8 +76,8 @@ The derivative values at the boundaries are in accordance with the `Dirichlet` b

You can also take derivatives of matrices using `A*M` or `M*A` where the order of multiplication decides the axis along which we want to take derivatives.

julia> xarr = linspace(0,1,51)
julia> yarr = linspace(0,1,101)
julia> xarr = range(0, 1, length=51)
julia> yarr = range(0, 1, length=101)
julia> dx = xarr[2]-xarr[1]
julia> dy = yarr[2]-yarr[1]
julia> F = [x^2+y for x = xarr, y = yarr]
Expand Down
4 changes: 2 additions & 2 deletions operators/HeatEquation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Solving the Heat Equation using DiffEqOperators

In this tutorial we will solve the famous heat equation using the explicit discretization on a 2D `space x time` grid. The heat equation is:-
In this tutorial we will solve the famous heat equation using the explicit discretization on a 2D `space x time` grid. The heat equation is:

$$\frac{\partial u}{\partial t} - \frac{{\partial}^2 u}{\partial x^2} = 0$$

Expand All @@ -11,7 +11,7 @@ For this example we consider a Dirichlet boundary condition with the initial dis
julia> u0 = -(x - 0.5).^2 + 1/12;
julia> A = DerivativeOperator{Float64}(2,2,2pi/511,512,:Dirichlet,:Dirichlet;BC=(u0[1],u0[end]));

Now solving equation as an ODE we have:-
Now solving the equation as an ODE we have:

julia> prob1 = ODEProblem(A, u0, (0.,10.));
julia> sol1 = solve(prob1, dense=false, tstops=0:0.01:10);
Expand Down
8 changes: 4 additions & 4 deletions operators/KdV.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Solving the Heat Equation using DiffEqOperators
# Solving the KdV Equation using DiffEqOperators

In this tutorial we will try to solve the famous **KdV equation** which describes the motion of waves on shallow water surfaces.
The equation is commonly written as
The equation is commonly written as

$$\frac{\partial u}{\partial t} + \frac{{\partial}^3 u}{\partial t^3} - 6*u*\frac{\partial u}{\partial t} = 0$.
$$\frac{\partial u}{\partial t} + \frac{{\partial}^3 u}{\partial x^3} - 6u\frac{\partial u}{\partial x} = 0$$.

Lets consider the cosine wave as the initial waveform and evolve it using the equation with a [periodic boundary condition](https://journals.aps.org/prl/pdf/10.1103/PhysRevLett.15.240). This example is taken from [here](https://en.wikipedia.org/wiki/Korteweg%E2%80%93de_Vries_equation).

Expand All @@ -23,7 +23,7 @@ Now defining our DiffEqOperators
C = DerivativeOperator{Float64}(3,2,1/99,199,:periodic,:periodic);
```

Now call the ODE solver as follows:-
Now call the ODE solver as follows:

prob1 = ODEProblem(KdV, u0, (0.,5.));
sol1 = solve(prob1, dense=false, tstops=0:0.01:10);
Expand Down