~/devreads

#partial differential equations

6 posts

26 Apr 2020

Dominic Steinitz 1 min read

This is a short example of taking a stochastic system, using Fokker-Planck to convert it to a PDES and using SUNDIALS to solve a 2D partial differential equation in Haskell via the hmatrix-sundials library. The example is taken from the C examples that come with the SUNDIALS source. Here’s the full blog.

haskellnumerical methodsnumericspartial differential equations

18 Apr 2017

Dominic Steinitz 19 min read

Introduction Tribbles originate from the planet Iota Geminorum IV and, according to Dr. McCoy, are born pregnant. No further details are given but we can follow Gurtin and MacCamy (1974) and perhaps recover some of what happens on the Enterprise. Of course, age-dependent population models are of more than fictional use and can be applied, for … Continue reading Trouble…

haskellnumerical methodspartial differential equationsuncategorized

10 Feb 2014

Dominic Steinitz 19 min read

Introduction Suppose we have a square thin plate of metal and we hold each of edges at a temperature which may vary along the edge but is fixed for all time. After some period depending on the conductivity of the metal, the temperature at every point on the plate will have stabilised. What is the … Continue reading Laplace’s Equation…

haskellnumerical methodspartial differential equations

10 Feb 2013

5 Jan 2013

Dominic Steinitz 5 min read

Can we get better performance for pricing financial options in Haskell? First let us translate our pricer using the Explicit Euler Method to use repa. {-# LANGUAGE FlexibleContexts, TypeOperators #-} {-# OPTIONS_GHC -Wall -fno-warn-name-shadowing -fno-warn-type-defaults #-} import Data.Array.Repa as Repa import Data.Array.Repa.Eval import Control.Monad r, sigma, k, t, xMax, deltaX, deltaT :: Double m, n, … Continue reading Option Pricing…

haskellpartial differential equations

22 Apr 2012

Dominic Steinitz 4 min read

We can solve our differential equation using the Implicit Euler method which is unconditionally stable. We can also take this opportunity to use the Vector Package rather than Arrays as it has a richer set of combinators and to tidy up the code to make the payoff explicit (thanks to suggestions by Ben Moseley). First … Continue reading The Implicit…

category theoryhaskellpartial differential equations