I see. So for igeom=1, the term: \sum_q^k \beta_q * u(t-q), q=k,...1 is computed. and then we update the geometry, and compute the matrix for mass, convection, div, etc.
I still have some questions about the char_conv function.
let's consider nbd=2, for which we need u(t-2dt), and u(t-dt), or we need the linear combination of two by the scheme shown in the paper, dt is constant, and we have mvbd.
tau=time-2*dt
1. the int_vel function evaluate the mass matrix at tau=time-2*dt, bm(tau).
2. the p0 which is the linear combination of u(t-2dt) and u(t-dt). While it is computed by multiply bmlag(1), and bm.
3. Initially, for ilag=nbd=2, p0=u(t-2dt)*bmlag(1)
4. for the RK4, the first step compute u1=p0/bm(tau), so u1=u(t-2dt)*bmlag(1)/bm(tau). This is confusing. If there is only one lag for mass matrix, is that for u(t-2dt)? and in that case shall we use the consistent mass matrix computed from int_vel, for tau? bmlag(1) = bm(tau)??
5. After all the loops, ilag =1, and the mass matrix is interpolated up to time, bm(time), then is bm is one time lag to bm(time), since it is multiplied to u(t-dt), and bm(time) is for current time.
6. We finally updated p0 is combined two terms after the convection. In that case, how should we get the mass matrix for the current p0, is that bm(time)?
7. After all, we update the geometry, and bm, is the new bm just equal to bm(time) we computed from int_vel, and can we use the new bm to get the new u from p0 we obtained from char_conv?
Thanks,
Chunheng.