[petsc-dev] gradients in DMPlexTS Riemann function

Adrian Croucher a.croucher at auckland.ac.nz
Mon Jun 9 23:11:30 CDT 2014


hi

How would one go about implementing a Riemann function in DMPlexTS that 
included a term based on the gradient of the solution?

Simple example: extending TS ex11 to include a diffusion term.

Would that be done by subtracting a gradient term from the flux in 
PhysicsRiemann_Advect()- e.g. a constant diffusion coefficient 
multiplied by the gradient of the solution across the interface, 
calculated simply by the difference between the solution values at the 
two cells, divided by the distance between their centroids?

It seems to me you would need to pass the face index into the Riemann 
function, to get access to the cells supporting the face and their 
centroid positions- but the way the Riemann function interface is 
currently set up doesn't appear to allow for that.

Or have I got the wrong idea about how one would go about implementing this?

- Adrian

-- 
Dr Adrian Croucher
Senior Research Fellow
Department of Engineering Science
University of Auckland, New Zealand
email: a.croucher at auckland.ac.nz
tel: +64 (0)9 923 4611




More information about the petsc-dev mailing list