G. Sadaka provide an examplein solving Wave Equation. Math equation is:
The problem definition in Sadaka’s code is:
problem tambour(uh,vh) = int2d(Th)(uh*vh + Grad(uh)'*Grad(vh)*(c*dt)^2*.5 )
+ int2d(Th)(Grad(uh0)'*Grad(vh)*(c*dt)^2*.5 )
- int2d(Th)(2.*uh1*vh - uh0*vh)
+ on(1,2,3,4,uh=0.);
I want to know why there is a int2d(Th)(Grad(uh0)'*Grad(vh)*(c*dt)^2*.5 )
term (the 2nd row). If we approximate u_tt
with (u-2*u_{t-1}+u_{t-2})/(dt)^2
and set u_{t-1}
to uh1
, u_{t-2}
to uh0
, then we can get the 1st and 3rd row but not the 2nd.