// @sect3{Include files}
// This program is based on step-7, step-20 and step-51,
// so most of the following header files are familiar. We
-// need the following:
+// need the following, of which only the one that
+// imports the FE_DGRaviartThomas class (namely, `deal.II/fe/fe_dg_vector.h`)
+// is really new; the FE_DGRaviartThomas implements the "broken" Raviart-Thomas
+// space discussed in the introduction:
#include <deal.II/base/quadrature.h>
#include <deal.II/base/quadrature_lib.h>
#include <deal.II/base/tensor_function.h>
#include <deal.II/fe/fe_face.h>
#include <deal.II/fe/component_mask.h>
#include <deal.II/numerics/vector_tools.h>
-#include <deal.II/numerics/matrix_tools.h>
#include <deal.II/numerics/data_out.h>
#include <deal.II/numerics/data_out_faces.h>
#include <deal.II/grid/grid_generator.h>
-#include <deal.II/grid/grid_tools.h>
-#include <deal.II/grid/grid_out.h>
-#include <deal.II/grid/grid_in.h>
#include <fstream>
#include <iostream>
//
// The structure of the class is not fundamentally different from that of
// previous tutorial programs, so there is little need to comment on the
- // details.
+ // details with one exception: The class has a member variable `fe_dgrt`
+ // that corresponds to the "broken" Raviart-Thomas space mentioned in the
+ // introduction. There is a matching `dof_handler_dgrt` that represents a
+ // global enumeration of a finite element field created from this element, and
+ // a vector `darcy_velocity` that holds nodal values for this field. We will
+ // use these three variables after solving for the pressure to compute a
+ // postprocessed velocity field for which we can then evaluate the error
+ // and which we can output for visualization.
template <int dim>
class WGDarcyEquation
{
FESystem<dim> fe;
DoFHandler<dim> dof_handler;
- FE_DGRaviartThomas<dim> fe_dgrt;
- DoFHandler<dim> dof_handler_dgrt;
-
AffineConstraints<double> constraints;
SparsityPattern sparsity_pattern;
Vector<double> solution;
Vector<double> system_rhs;
- Vector<double> darcy_velocity;
+ FE_DGRaviartThomas<dim> fe_dgrt;
+ DoFHandler<dim> dof_handler_dgrt;
+ Vector<double> darcy_velocity;
};
, dof_handler(triangulation)
, fe_dgrt(degree)
, dof_handler_dgrt(triangulation)
-
{}
{
try
{
- dealii::deallog.depth_console(2);
Step61::WGDarcyEquation<2> wg_darcy(0);
wg_darcy.run();
}