I want to solve a system of coupled nonlinear 1-D PDE $(\partial_{tt} + \alpha\partial_t)u_i(x,t)=\partial_{xx}(\sum_{j=1}^{j<i}ju_j(x,t)+i\sum_{j=i}^{n}u_j(x,t))-\sin(u_i(x,t))+f$, using method of lines and for this I defined a spatial grid of about $N\approx1000$ points. Since my PDE is second order both in time and space, the number of ODEs that I have to solve is about $2n*N$ which needs to be run for enough time to get the solutions. For this large system of coupled ODEs I used an ODE solver (tested both implicit and explicit) and although the fastest is ODE23, yet it takes a long time when my $\delta x=0.01$. Since I have access to a multicore system, I was wondering if I could solve this system in a scalable method. I do not think it is applicable using MATLAB or MATHEMATICA. What other options do I have?

% spatial grid
%intial condition
u0(1:n) = somdefunction (x)
%ode solver
% pde 
function ut = fun(t,u)
uxx = 4*del2(u(1:n),dx);
%boundary conditions
% pde
ut1(1:n) = u(n+1:2n);
ut2(1:n) = uxx - sin(u);
ut = (ut1;ut2);
  • 2
    $\begingroup$ Use CVODE solver within the SUNDIALS package $\endgroup$ – Maxim Umansky Apr 15 '16 at 4:12
  • $\begingroup$ @Mr. Sheikhzada: All documentation is available online, just google SUNDIALS. I cannot tell how long it would take to develop such a code, it depends on how fast you are with such things. But it would be way more than in MATLAB. $\endgroup$ – Maxim Umansky Apr 18 '16 at 23:52
  • $\begingroup$ @ Mr. Umansky, I tried to install the interface package for MATLAB, SudialsTB and since I want to take advantage of my workstation 6 cores, I need to implement the code in parallel. I was wondering if you have experience with how to install MPITB and other required packages. Thanks. $\endgroup$ – Ahmad Sheikhzada Apr 25 '16 at 16:23
  • $\begingroup$ @Mr. Sheikhzada: Sorry but I have no experience with MPITB. $\endgroup$ – Maxim Umansky Apr 25 '16 at 23:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.