#include <lac/sparse_matrix.h>
#include <lac/vector_memory.h>
#include <grid/tria.h>
-#include <dofs/dof_handler.h>
#include <grid/grid_generator.h>
+#include <grid/grid_out.h>
+#include <grid/grid_refinement.h>
#include <grid/tria_accessor.h>
#include <grid/tria_iterator.h>
+#include <fe/fe_values.h>
+#include <dofs/dof_handler.h>
#include <dofs/dof_accessor.h>
#include <dofs/dof_tools.h>
-#include <fe/fe_values.h>
#include <numerics/data_out.h>
-#include <grid/grid_out.h>
-#include <grid/grid_refinement.h>
// This is the first new file. It
// declares the MappingQ1 class that
// pre-knowledge of the actual
// polynomial degree 1.
#include <fe/mapping_q1.h>
-
// Here the discontinuous finite
// elements are defined. They are
// used as all other finite elements.
#include <fe/fe_dgq.h>
-
// We are going to use the simplest
// possible solver, called richardson
// iteration, that represents a simple
// discretizations.
#include <lac/solver_richardson.h>
#include <lac/precondition_block.h>
-
// We are going to use gradients as
// refinement indicator.
#include <numerics/derivative_approximation.h>
-
-
// Finally we do some time comparison
// using the ``Timer'' class.
#include <base/timer.h>
values[i]=0;
}
+
// The flow field is chosen to be
// circular, anticlockwise, and with
// the origin as midpoint.
}
}
+
// Hence the inflow boundary of the
// unit square [0,1]^2 are the right
// and the lower boundaries. We
}
}
+
// @sect3{Class: DGTransportEquation}
//
// Next we define the equation-
BoundaryValues<dim> boundary_function;
};
+
// @sect4{Function: assemble_cell_term}
//
// The ``assemble_cell_term''
}
}
+
// @sect4{Function: assemble_boundary_term}
//
// The ``assemble_boundary_term''
}
}
+
// @sect4{Function: assemble_face_term1}
//
// The ``assemble_face_term1''
}
}
+
// @sect4{Function: assemble_face_term2}
//
// Now we look at the
};
-
// Now for the implementation of the
// main class. Constructor and
// destructor follow the same
};
-
template <int dim>
void DGMethod<dim>::setup_system ()
{