/*---------------------------- dof.h ---------------------------*/
#include <vector>
-#include <fe/fe.h>
#include <base/exceptions.h>
template <int dim> class Triangulation;
+template <int dim> class FiniteElementBase;
+
class dVector;
class dSMatrix;
class dSMatrixStruct;
* don't need them after calling this
* function, or if so store them.
*/
- void distribute_dofs (const FiniteElement<dim> &);
+ void distribute_dofs (const FiniteElementBase<dim> &);
/**
* Renumber the degrees of freedom according
* Return a constant reference to the
* selected finite element object.
*/
- const FiniteElement<dim> & get_selected_fe () const;
+ const FiniteElementBase<dim> & get_selected_fe () const;
/**
* Return a constant reference to the
* Reserve enough space in the
* #levels[]# objects to store the
* numbers of the degrees of freedom
- * needed for the given element.
+ * needed for the given element. The
+ * given element is that one which
+ * was selected when calling
+ * #distribute_dofs# the last time.
*/
- void reserve_space (const FiniteElement<dim> &);
+ void reserve_space ();
/**
* Distribute dofs on the given cell,
* with new dofs starting with index
* #next_free_dof#. Return the next
- * unused index number.
+ * unused index number. The finite
+ * element used is the one given to
+ * #distribute_dofs#, which is copied
+ * to #selected_fe#.
+ *
*/
int distribute_dofs_on_cell (active_cell_iterator &cell,
- const FiniteElement<dim> &fe,
unsigned int next_free_dof);
/**
/**
* Store a copy of the finite element given
* latest for the distribution of dofs. In
- * fact, since the FE class itself has not
- * much functionality, this object only
+ * fact, since the FE base class itself has
+ * not much functionality, this object only
* stores numbers such as the number of
- * dofs per line etc. Calling any of the
- * more specific functions will result in
- * an error about calling a pure virtual
- * function.
+ * dofs per line, but also restriction
+ * and prolongation matrices, etc.
*/
- FiniteElement<dim> *selected_fe;
+ const FiniteElementBase<dim> *selected_fe;
/**
* Store the number of dofs created last
Specialisation of \Ref{Boundary}<dim>, which places the new point right
into the middle of the given points. The middle is defined as the
arithmetic mean of the points.
+
+ This class does not really describe a boundary in the usual sense. By
+ placing new points in teh middle of old ones, it rather assumes that the
+ boundary of the domain is given by the polygon/polyhedron defined by the
+ boundary of the initial coarse triangulation.
*/
template <int dim>
class StraightBoundary : public Boundary<dim> {
dVector &rhs_vector,
const Quadrature<dim> &quadrature,
const FiniteElement<dim> &fe,
- const UpdateFields &update_flags,
+ const UpdateFlags &update_flags,
const Boundary<dim> &boundary);
/**
* FEValues object need to be reinitialized
* on each cell.
*/
- const UpdateFields update_flags;
+ const UpdateFlags update_flags;
/**
* Store a pointer to the object describing
#include <lac/dsmatrix.h>
#include <base/exceptions.h>
#include <grid/dof_constraints.h>
+#include <fe/fe_update_flags.h>
#include <map>
-
/**
Denote which norm/integral is to be computed. The following possibilities
are implemented:
since for higher order finite elements, we may be tempted to use curved faces
of cells for better approximation of the boundary. In this case, the
transformation from the unit cell to the real cell requires knowledge of
- the exact boundary of the domain. By default it is assumed that the
- boundary be approximated by straight segments.
+ the exact boundary of the domain.
{\bf Solving}
Usually, all other boundary conditions, such as inhomogeneous Neumann values
or mixed boundary conditions are handled in the weak formulation. No attempt
- is made to include this into the process of assemblage therefore.
+ is made to include these into the process of assemblage therefore.
The inclusion into the assemblage process is as follows: when the matrix and
vectors are set up, a list of nodes subject to dirichlet bc is made and
This can be done by overloading the virtual function
#make_boundary_value_list# which must return a list of boundary dofs
and their corresponding values.
+
+ You should be aware that the boundary function may be evaluated at nodes
+ on the interior of faces. These, however, need not be on the true
+ boundary, but rather are on the approximation of the boundary represented
+ by teh mapping of the unit cell to the real cell. Since this mapping will
+ in most cases not be the exact one at the face, the boundary function is
+ evaluated at points which are not on the boundary and you should make
+ sure that the returned values are reasonable in some sense anyway.
{\bf Computing errors}
virtual void assemble (const Equation<dim> &equation,
const Quadrature<dim> &q,
const FiniteElement<dim> &fe,
- const UpdateFields &update_flags,
+ const UpdateFlags &update_flags,
const DirichletBC &dirichlet_bc = DirichletBC(),
const Boundary<dim> &boundary = StraightBoundary<dim>());