Hello I am looking for some example code that solves a heat equation or unsteady convection-diffusion equation using LDG method. Thanks
I'm not aware of any FEniCS/DOLFIN code for LDG method. There are not any in the demos distributed with DOLFIN.
So let me ask my doubt in brief. Say for heat equation
$$ \frac{\partial u}{\partial t} = \frac{\partial^2 u}{\partial x^2} $$
We write this as
$$ \frac{\partial u}{\partial t} = \frac{\partial \sigma}{\partial x} $$
$$ \sigma = \frac{\partial u}{\partial x} $$
When we do a DG discretization of these two equations, we get one algebraic equation. This equation can be solved on each element individually and $\sigma$ can be eliminated. Is it possible to eliminate $\sigma$ in fenics before solving for $u$ ?
You'd have to write your own assembler to eliminate $\sigma$ locally.