Try to reduce the problem. You may also compare with src/ts/examples/tutorials/ex11.c, which includes a finite-volume advection solver (with or without slope reconstruction/limiting).
Praveen C via petsc-users <[email protected]> writes: > Dear all > > I am trying to write a simple first order upwind FVM to solve linear > advection in 2d on triangular meshes using dmplex. > > Based on some suggestions in recent discussions, I cooked up this simple > example > > https://github.com/cpraveen/cfdlab/tree/master/petsc/dmplex_convect2d > > A gaussian profile must rotate around origin but in my code, there is some > errors developing in just one or two cells, see picture. > > I am looking for any suggestions/hints/tips on how to identify the problem. > Since I have never written a dmplex code before, I am not able to ask a > specific question. > > Thanks > praveen
