1D burger's equation with viscous term can be expreessed as:
We use finite element method (FEM) to solve the equation. Selecting test function
Define the flux
Then we integration by parts get the weak form:
$$\left(\frac{\partial u}{\partial t},\phi\right)-\left( F, \frac{\partial \phi}{\partial x}\right)+F^{*}\phi|{x{l}}^{x_{r}} = 0$$
And integration by parts agian return to strong form:
$$\left(\frac{\partial u}{\partial t},\phi\right)+\left(\frac{\partial}{\partial x} F,\phi\right)+(F^{*}-F^{u})\phi|{x{l}}^{x_{r}} = 0$$
- Eigen-3.4.0
- Boost-1.77.0
Both two third party libraries are c++ header-only library, only unzip the source code to the root path. the gamma function of boost is used, and the matrix and vector and the eigenvalues of eigen are used.
$ mkdir build
$ cd build
$ cmake ..
$ make
Or just use awesome IDE, for example Clion to compile and run the program.