1
// Copyright (C) 2005-2006 Anders Logg.
2
// Licensed under the GNU LGPL Version 2.1.
4
// First added: 2005-02-03
5
// Last changed: 2006-08-21
7
// This example demonstrates the solution of a complex-valued ODE:
9
// z'(t) = j*z(t) on (0,10]
12
// where j is the imaginary unit. The exact solution of this system
15
// z(t) = exp(j*t) = (cos(t), sin(t)).
19
using namespace dolfin;
21
class Exponential : public ComplexODE
25
Exponential() : ComplexODE(1, 10.0)
34
void f(const complex z[], real t, complex y[])
43
Exponential exponential;