OpenMP C example problems
ark_brusselator1D_omp
This problem is mathematically identical to the one-dimensional reaction-diffusion brusselator model, ark_brusselator1D. As before, we investigate a time-dependent system of partial differential equations with 3 components, \(Y = [u,\, v,\, w]^T\) that satisfy the equations,
\[\begin{split}\frac{\partial u}{\partial t} &= d_u \frac{\partial^2 u}{\partial
x^2} + a - (w+1) u + v u^2, \\
\frac{\partial v}{\partial t} &= d_v \frac{\partial^2 v}{\partial
x^2} + w u - v u^2, \\
\frac{\partial w}{\partial t} &= d_w \frac{\partial^2 w}{\partial
x^2} + \frac{b-w}{\varepsilon} - w u.\end{split}\]
We integrate for \(t \in [0, 10]\), and \(x \in [0, 1]\), with initial conditions
\[\begin{split}u(0,x) &= a + \frac{1}{10} \sin(\pi x),\\
v(0,x) &= \frac{b}{a} + \frac{1}{10}\sin(\pi x),\\
w(0,x) &= b + \frac{1}{10}\sin(\pi x),\end{split}\]
and with stationary boundary conditions, i.e.
\[\begin{split}\frac{\partial u}{\partial t}(t,0) &= \frac{\partial u}{\partial t}(t,1) = 0,\\
\frac{\partial v}{\partial t}(t,0) &= \frac{\partial v}{\partial t}(t,1) = 0,\\
\frac{\partial w}{\partial t}(t,0) &= \frac{\partial w}{\partial t}(t,1) = 0.\end{split}\]
Numerical method
The numerical method is identical to the previous implementation, except that we now use SUNDIALS’ OpenMP-enabled vector kernel module, NVECTOR_OPENMP, and have similarly threaded the supplied right-hand side and banded Jacobian construction functions.