On Thu, May 27, 2010 at 04:22:33PM +0100, Garth N. Wells wrote: > > > On 27/05/10 15:58, Anders Logg wrote: > >Wouldn't it work to just to this: > > > >v = v + (h/2.0*vnorm)*dot(velocity, grad(v)) > >U = 0.5*(u0 + u) > >F = v*(u - u0)*dx + 0.5*k*(v*dot(velocity, grad(U))*dx + c*dot(grad(v), > >grad(U))*dx) - k*v*f*dx > >a = lhs(F) > >L = rhs(F) > > > >That's my understanding of SUPG, but perhaps I've missed something? > > > > Looks like the same thing (I'd have to check). I prefer to > expressing the method as weighting the residual, e.g. Galerkin + > weighted residual.
I also think of it as weighting the residual, but with a modified test function v. The above looks like a weighted (weak) residual to me. The difference from your implementation is that you multiply the stabilization part of the test function with the strong residual for which the Laplacian (for P1 elements) is zero. In the above case, the stabilization also hits the nonzero integrated by parts grad-grad term. I don't know whether or not that is important. > The code I added can be made more compact using lhs/rhs, but I was > having some trouble and initially wanted to make a bare bones > implementation. ok. I might try to make some changes. I'd like to get a feeling for how SUPG works. -- Anders
signature.asc
Description: Digital signature
_______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : [email protected] Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp

