/* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* An implementation of the D1Q5 model for non-ideal systems */ #include #include #include "mygraph.h" #define xdim 100 double f0[xdim],f1[xdim],f2[xdim],f3[xdim],f4[xdim],n[xdim]; double n0=1, T0=0.33333333, Amp=0.01, omega=1; double pc=1, theta=0.1, nc=1, kappa=0.1; double ug[xdim],pg[xdim],tg[xdim]; int ugreq=0,pgreq=0,tgreq=0; int next=0,pause=1,done=0,Repeat=1,iterations; void init(){ int i; iterations=0; for (i=0;i