module GridMethod.TaskData

open TaskModel
open System

// General form
// Equation:
//    u'(t)(x, t) = κ * u''(x)(x, t) + f(x, t)
//    κ > 0, 0 < x < a, 0 < t < T
// Initial conditions:
//    u(x, 0) = µ(x), 0 <= x <= a
//    u(0, t) = µ_1(t), 0 <= t <= T
//    u(a, t) = µ_2(t), 0 <= t <= T

let κ = 1.0 / (Math.E ** 2.0)

let µ x = 6.0 * Math.Sin(Math.PI * x)

let equationData = { κ = κ; f = fun _ _ -> 0.0 }

let initialData =
    { a = 1.0
      T = 1.0
      µ = µ
      µ_1 = fun _ -> 0.0
      µ_2 = fun _ -> 0.0 }

let taskData =
    { Equation = equationData
      InitialConditions = initialData }
