<h1>Results</h1>
-We run the program with a right hand side that will produce the solution
-$p = \sin(\pi x) \sin(\pi y)$ and with homogeneous Dirichlet
-boundary conditions in the domain $\Omega = (0,1)^2$. In addition, we choose
-the coefficient matrix in the differential operator $\mathbf{K}$ as the
-identity matrix. We test this setup using $\mbox{WG}(Q_0,Q_0;RT_{[0]})$,
-$\mbox{WG}(Q_1,Q_1;RT_{[1]})$ and $\mbox{WG}(Q_2,Q_2;RT_{[2]})$ element
-combinations. We will then visualize pressure values in interiors of cells
-and on faces. We want to see that the pressure maximum is around 1 and the minimum
-is around 0. With mesh refinement, the convergence rates of pressure,
-velocity and flux should then be around 1 for $\mbox{WG}(Q_0,Q_0;RT_{[0]})$ , 2
-for $\mbox{WG}(Q_1,Q_1;RT_{[1]})$, and 3 for $\mbox{WG}(Q_2,Q_2;RT_{[2]})$.
+We run the program with a right hand side that will produce the
+solution $p = \sin(\pi x) \sin(\pi y)$ and with homogeneous Dirichlet
+boundary conditions in the domain $\Omega = (0,1)^2$. In addition, we
+choose the coefficient matrix in the differential operator
+$\mathbf{K}$ as the identity matrix. We test this setup using
+$\mbox{WG}(Q_0,Q_0;RT_{[0]})$, $\mbox{WG}(Q_1,Q_1;RT_{[1]})$ and
+$\mbox{WG}(Q_2,Q_2;RT_{[2]})$ element combinations, which one can
+select by using the appropriate constructor argument for the
+`WGDarcyEquation` object in `main()`. We will then visualize pressure
+values in interiors of cells and on faces. We want to see that the
+pressure maximum is around 1 and the minimum is around 0. With mesh
+refinement, the convergence rates of pressure, velocity and flux
+should then be around 1 for $\mbox{WG}(Q_0,Q_0;RT_{[0]})$ , 2 for
+$\mbox{WG}(Q_1,Q_1;RT_{[1]})$, and 3 for
+$\mbox{WG}(Q_2,Q_2;RT_{[2]})$.
<h3>Test results on <i>WG(Q<sub>0</sub>,Q<sub>0</sub>;RT<sub>[0]</sub>)</i></h3>
class WGDarcyEquation
{
public:
- WGDarcyEquation();
+ WGDarcyEquation(const unsigned int degree);
void run();
private:
// functions, which will here include the ones used for the interior and
// interface pressures, $p^\circ$ and $p^\partial$.
template <int dim>
- WGDarcyEquation<dim>::WGDarcyEquation()
- : fe(FE_DGQ<dim>(0), 1, FE_FaceQ<dim>(0), 1)
+ WGDarcyEquation<dim>::WGDarcyEquation(const unsigned int degree)
+ : fe(FE_DGQ<dim>(degree), 1, FE_FaceQ<dim>(degree), 1)
, dof_handler(triangulation)
{}
template <int dim>
void WGDarcyEquation<dim>::assemble_system()
{
- const FE_RaviartThomas<dim> fe_rt(0);
+ const FE_RaviartThomas<dim> fe_rt(fe.base_element(0).degree);
const QGauss<dim> quadrature_formula(fe_rt.degree + 1);
const QGauss<dim - 1> face_quadrature_formula(fe_rt.degree + 1);
template <int dim>
void WGDarcyEquation<dim>::compute_velocity_errors()
{
- const FE_RaviartThomas<dim> fe_rt(0);
+ const FE_RaviartThomas<dim> fe_rt(fe.base_element(0).degree);
const QGauss<dim> quadrature_formula(fe_rt.degree + 1);
const QGauss<dim - 1> face_quadrature_formula(fe_rt.degree + 1);
try
{
dealii::deallog.depth_console(2);
- Step61::WGDarcyEquation<2> wg_darcy;
+ Step61::WGDarcyEquation<2> wg_darcy(0);
wg_darcy.run();
}
catch (std::exception &exc)