% % advance phi and eta one time step by RK3. Space discretisation use one of following : % 1 : Godunov % 2 : LLF % 3 : LF % 4 : NORMAL % 5 : NLF % %*********************************************************************** % This code is written by Chiu-Yen Kao % Copyright is reserved !! function [phi,u,v] = advance(phi,f,u,v,runtime,dt) tol = 1e-7; phi_method = 1; global nxs nys nxe nye phi = enforceBC(phi); rhs1 = getRHS(phi,u,v); for i = nxs : nxe for j = nys : nye phi(i,j) = phi(i,j) + dt*rhs1(i,j); end end phi = enforceBC(phi); [u,v] = pp_to_uv(phi);