W1infty_norm
};
-
+/**
+ * @name Interpolation and projection
+ */
+ //@{
/**
* Compute the interpolation of
* @p function at the support
const bool project_to_boundary_first = false);
/**
- * Calls the @p project
+ * Calls the project()
* function, see above, with
* <tt>mapping=MappingQ1@<dim@>()</tt>.
*/
Quadrature<dim-1>(0)),
const bool project_to_boundary_first = false);
- /**
- * Create a right hand side
- * vector. Prior content of the
- * given @p rhs_vector vector is
- * deleted.
- *
- * See the general documentation of this
- * class for further information.
- */
- template <int dim>
- static void create_right_hand_side (const Mapping<dim> &mapping,
- const DoFHandler<dim> &dof,
- const Quadrature<dim> &q,
- const Function<dim> &rhs,
- Vector<double> &rhs_vector);
-
- /**
- * Calls the @p create_right_hand_side
- * function, see above, with
- * <tt>mapping=MappingQ1@<dim@>()</tt>.
- */
- template <int dim>
- static void create_right_hand_side (const DoFHandler<dim> &dof,
- const Quadrature<dim> &q,
- const Function<dim> &rhs,
- Vector<double> &rhs_vector);
-
- /**
- * Like the previous set of functions,
- * but for hp objects.
- */
- template <int dim>
- static void create_right_hand_side (const hp::MappingCollection<dim> &mapping,
- const hp::DoFHandler<dim> &dof,
- const hp::QCollection<dim> &q,
- const Function<dim> &rhs,
- Vector<double> &rhs_vector);
-
- /**
- * Like the previous set of functions,
- * but for hp objects.
- */
- template <int dim>
- static void create_right_hand_side (const hp::DoFHandler<dim> &dof,
- const hp::QCollection<dim> &q,
- const Function<dim> &rhs,
- Vector<double> &rhs_vector);
-
- /**
- * Create a right hand side
- * vector for a point source at point @p p.
- * Prior content of the
- * given @p rhs_vector vector is
- * deleted.
- *
- * See the general documentation of this
- * class for further information.
- */
- template <int dim>
- static void create_point_source_vector(const Mapping<dim> &mapping,
- const DoFHandler<dim> &dof,
- const Point<dim> &p,
- Vector<double> &rhs_vector);
-
- /**
- * Calls the @p create_point_source_vector
- * function, see above, with
- * <tt>mapping=MappingQ1@<dim@>()</tt>.
- */
- template <int dim>
- static void create_point_source_vector(const DoFHandler<dim> &dof,
- const Point<dim> &p,
- Vector<double> &rhs_vector);
-
- /**
- * Like the previous set of functions,
- * but for hp objects.
- */
- template <int dim>
- static void create_point_source_vector(const hp::MappingCollection<dim> &mapping,
- const hp::DoFHandler<dim> &dof,
- const Point<dim> &p,
- Vector<double> &rhs_vector);
-
- /**
- * Like the previous set of functions,
- * but for hp objects. The function uses
- * the default Q1 mapping object. Note
- * that if your hp::DoFHandler uses any
- * active fe index other than zero, then
- * you need to call the function above
- * that provides a mapping object for
- * each active fe index.
- */
- template <int dim>
- static void create_point_source_vector(const hp::DoFHandler<dim> &dof,
- const Point<dim> &p,
- Vector<double> &rhs_vector);
-
- /**
- * Create a right hand side
- * vector from boundary
- * forces. Prior content of the
- * given @p rhs_vector vector is
- * deleted.
- *
- * See the general documentation of this
- * class for further information.
- */
- template <int dim>
- static void create_boundary_right_hand_side (const Mapping<dim> &mapping,
- const DoFHandler<dim> &dof,
- const Quadrature<dim-1> &q,
- const Function<dim> &rhs,
- Vector<double> &rhs_vector,
- const std::set<unsigned char> &boundary_indicators = std::set<unsigned char>());
-
- /**
- * Specialization of above
- * function for 1d. Since the
- * computation is not useful in
- * 1d, this function simply
- * throws an exception.
- */
- static void create_boundary_right_hand_side (const Mapping<1> &mapping,
- const DoFHandler<1> &dof,
- const Quadrature<0> &q,
- const Function<1> &rhs,
- Vector<double> &rhs_vector,
- const std::set<unsigned char> &boundary_indicators = std::set<unsigned char>());
-
- /**
- * Calls the
- * @p create_boundary_right_hand_side
- * function, see above, with
- * <tt>mapping=MappingQ1@<dim@>()</tt>.
- */
- template <int dim>
- static void create_boundary_right_hand_side (const DoFHandler<dim> &dof,
- const Quadrature<dim-1> &q,
- const Function<dim> &rhs,
- Vector<double> &rhs_vector,
- const std::set<unsigned char> &boundary_indicators = std::set<unsigned char>());
-
- /**
- * Same as the set of functions above,
- * but for hp objects.
- */
- template <int dim>
- static void create_boundary_right_hand_side (const hp::MappingCollection<dim> &mapping,
- const hp::DoFHandler<dim> &dof,
- const hp::QCollection<dim-1> &q,
- const Function<dim> &rhs,
- Vector<double> &rhs_vector,
- const std::set<unsigned char> &boundary_indicators = std::set<unsigned char>());
-
- /**
- * Specialization of above
- * function for 1d. Since the
- * computation is not useful in
- * 1d, this function simply
- * throws an exception.
- */
- static void create_boundary_right_hand_side (const hp::MappingCollection<1> &mapping,
- const hp::DoFHandler<1> &dof,
- const hp::QCollection<0> &q,
- const Function<1> &rhs,
- Vector<double> &rhs_vector,
- const std::set<unsigned char> &boundary_indicators = std::set<unsigned char>());
-
- /**
- * Calls the @p
- * create_boundary_right_hand_side
- * function, see above, with a single Q1
- * mapping as collection. This function
- * therefore will only work if the only
- * active fe index in use is zero.
- */
- template <int dim>
- static void create_boundary_right_hand_side (const hp::DoFHandler<dim> &dof,
- const hp::QCollection<dim-1> &q,
- const Function<dim> &rhs,
- Vector<double> &rhs_vector,
- const std::set<unsigned char> &boundary_indicators = std::set<unsigned char>());
-
/**
* Prepare Dirichlet boundary
* conditions. Make up the list
const Quadrature<dim-1> &q,
std::map<unsigned int,double> &boundary_values);
+ //@}
+ /**
+ * @name Assembling of right hand sides
+ */
+ //@{
+
+ /**
+ * Create a right hand side
+ * vector. Prior content of the
+ * given @p rhs_vector vector is
+ * deleted.
+ *
+ * See the general documentation of this
+ * class for further information.
+ */
+ template <int dim>
+ static void create_right_hand_side (const Mapping<dim> &mapping,
+ const DoFHandler<dim> &dof,
+ const Quadrature<dim> &q,
+ const Function<dim> &rhs,
+ Vector<double> &rhs_vector);
+
+ /**
+ * Calls the @p create_right_hand_side
+ * function, see above, with
+ * <tt>mapping=MappingQ1@<dim@>()</tt>.
+ */
+ template <int dim>
+ static void create_right_hand_side (const DoFHandler<dim> &dof,
+ const Quadrature<dim> &q,
+ const Function<dim> &rhs,
+ Vector<double> &rhs_vector);
+
+ /**
+ * Like the previous set of functions,
+ * but for hp objects.
+ */
+ template <int dim>
+ static void create_right_hand_side (const hp::MappingCollection<dim> &mapping,
+ const hp::DoFHandler<dim> &dof,
+ const hp::QCollection<dim> &q,
+ const Function<dim> &rhs,
+ Vector<double> &rhs_vector);
+
+ /**
+ * Like the previous set of functions,
+ * but for hp objects.
+ */
+ template <int dim>
+ static void create_right_hand_side (const hp::DoFHandler<dim> &dof,
+ const hp::QCollection<dim> &q,
+ const Function<dim> &rhs,
+ Vector<double> &rhs_vector);
+
+ /**
+ * Create a right hand side
+ * vector for a point source at point @p p.
+ * Prior content of the
+ * given @p rhs_vector vector is
+ * deleted.
+ *
+ * See the general documentation of this
+ * class for further information.
+ */
+ template <int dim>
+ static void create_point_source_vector(const Mapping<dim> &mapping,
+ const DoFHandler<dim> &dof,
+ const Point<dim> &p,
+ Vector<double> &rhs_vector);
+
+ /**
+ * Calls the @p create_point_source_vector
+ * function, see above, with
+ * <tt>mapping=MappingQ1@<dim@>()</tt>.
+ */
+ template <int dim>
+ static void create_point_source_vector(const DoFHandler<dim> &dof,
+ const Point<dim> &p,
+ Vector<double> &rhs_vector);
+
+ /**
+ * Like the previous set of functions,
+ * but for hp objects.
+ */
+ template <int dim>
+ static void create_point_source_vector(const hp::MappingCollection<dim> &mapping,
+ const hp::DoFHandler<dim> &dof,
+ const Point<dim> &p,
+ Vector<double> &rhs_vector);
+
+ /**
+ * Like the previous set of functions,
+ * but for hp objects. The function uses
+ * the default Q1 mapping object. Note
+ * that if your hp::DoFHandler uses any
+ * active fe index other than zero, then
+ * you need to call the function above
+ * that provides a mapping object for
+ * each active fe index.
+ */
+ template <int dim>
+ static void create_point_source_vector(const hp::DoFHandler<dim> &dof,
+ const Point<dim> &p,
+ Vector<double> &rhs_vector);
+
+ /**
+ * Create a right hand side
+ * vector from boundary
+ * forces. Prior content of the
+ * given @p rhs_vector vector is
+ * deleted.
+ *
+ * See the general documentation of this
+ * class for further information.
+ */
+ template <int dim>
+ static void create_boundary_right_hand_side (const Mapping<dim> &mapping,
+ const DoFHandler<dim> &dof,
+ const Quadrature<dim-1> &q,
+ const Function<dim> &rhs,
+ Vector<double> &rhs_vector,
+ const std::set<unsigned char> &boundary_indicators = std::set<unsigned char>());
+
+ /**
+ * Specialization of above
+ * function for 1d. Since the
+ * computation is not useful in
+ * 1d, this function simply
+ * throws an exception.
+ */
+ static void create_boundary_right_hand_side (const Mapping<1> &mapping,
+ const DoFHandler<1> &dof,
+ const Quadrature<0> &q,
+ const Function<1> &rhs,
+ Vector<double> &rhs_vector,
+ const std::set<unsigned char> &boundary_indicators = std::set<unsigned char>());
+
+ /**
+ * Calls the
+ * @p create_boundary_right_hand_side
+ * function, see above, with
+ * <tt>mapping=MappingQ1@<dim@>()</tt>.
+ */
+ template <int dim>
+ static void create_boundary_right_hand_side (const DoFHandler<dim> &dof,
+ const Quadrature<dim-1> &q,
+ const Function<dim> &rhs,
+ Vector<double> &rhs_vector,
+ const std::set<unsigned char> &boundary_indicators = std::set<unsigned char>());
+
+ /**
+ * Same as the set of functions above,
+ * but for hp objects.
+ */
+ template <int dim>
+ static void create_boundary_right_hand_side (const hp::MappingCollection<dim> &mapping,
+ const hp::DoFHandler<dim> &dof,
+ const hp::QCollection<dim-1> &q,
+ const Function<dim> &rhs,
+ Vector<double> &rhs_vector,
+ const std::set<unsigned char> &boundary_indicators = std::set<unsigned char>());
+
+ /**
+ * Specialization of above
+ * function for 1d. Since the
+ * computation is not useful in
+ * 1d, this function simply
+ * throws an exception.
+ */
+ static void create_boundary_right_hand_side (const hp::MappingCollection<1> &mapping,
+ const hp::DoFHandler<1> &dof,
+ const hp::QCollection<0> &q,
+ const Function<1> &rhs,
+ Vector<double> &rhs_vector,
+ const std::set<unsigned char> &boundary_indicators = std::set<unsigned char>());
+
+ /**
+ * Calls the @p
+ * create_boundary_right_hand_side
+ * function, see above, with a single Q1
+ * mapping as collection. This function
+ * therefore will only work if the only
+ * active fe index in use is zero.
+ */
+ template <int dim>
+ static void create_boundary_right_hand_side (const hp::DoFHandler<dim> &dof,
+ const hp::QCollection<dim-1> &q,
+ const Function<dim> &rhs,
+ Vector<double> &rhs_vector,
+ const std::set<unsigned char> &boundary_indicators = std::set<unsigned char>());
+
+ //@}
+ /**
+ * @name Evaluation of functions
+ * and errors
+ */
+ //@{
+
/**
* Compute the error of the
* finite element solution.
const DoFHandler<dim> &dof,
const InVector &fe_function,
const Point<dim> &point);
-
+
+ //@}
+ /**
+ * Mean value operations
+ */
+ //@{
+
/**
* Subtract the (algebraic) mean value
* from a vector. This function is most
const Quadrature<dim> &quadrature,
const InVector &v,
const unsigned int component);
+ //@}
- /**
- * Exception
- */
- DeclException0 (ExcInvalidFE);
- /**
- * Exception
- */
- DeclException0 (ExcFENotPrimitive);
/**
* Exception
*/
/**
* Exception
*/
- DeclException0 (ExcComponentMismatch);
- /**
- * Exception
- */
DeclException0 (ExcNonInterpolatingFE);
/**
* Exception
#include <dofs/dof_constraints.h>
#include <dofs/dof_tools.h>
#include <fe/fe.h>
+#include <fe/fe_tools.h>
#include <hp/fe_values.h>
#include <fe/mapping_q1.h>
#include <hp/mapping_collection.h>
VECTOR &vec)
{
Assert (dof.get_fe().n_components() == function.n_components,
- ExcComponentMismatch());
+ ExcDimensionMismatch(dof.get_fe().n_components(),
+ function.n_components));
const hp::FECollection<dim> fe (dof.get_fe());
const unsigned int n_components = fe.n_components();
const bool project_to_boundary_first)
{
Assert (dof.get_fe().n_components() == function.n_components,
- ExcInvalidFE());
+ ExcDimensionMismatch(dof.get_fe().n_components(),
+ function.n_components));
Assert (vec_result.size() == dof.n_dofs(),
ExcDimensionMismatch (vec_result.size(), dof.n_dofs()));
{
const FiniteElement<dim> &fe = dof_handler.get_fe();
Assert (fe.n_components() == rhs_function.n_components,
- ExcComponentMismatch());
+ ExcDimensionMismatch(fe.n_components(), rhs_function.n_components));
Assert (rhs_vector.size() == dof_handler.n_dofs(),
ExcDimensionMismatch(rhs_vector.size(), dof_handler.n_dofs()));
rhs_vector = 0;
{
const hp::FECollection<dim> &fe = dof_handler.get_fe();
Assert (fe.n_components() == rhs_function.n_components,
- ExcComponentMismatch());
+ ExcDimensionMismatch(fe.n_components(), rhs_function.n_components));
Assert (rhs_vector.size() == dof_handler.n_dofs(),
ExcDimensionMismatch(rhs_vector.size(), dof_handler.n_dofs()));
rhs_vector = 0;
{
const FiniteElement<dim> &fe = dof_handler.get_fe();
Assert (fe.n_components() == rhs_function.n_components,
- ExcComponentMismatch());
+ ExcDimensionMismatch(fe.n_components(), rhs_function.n_components));
Assert (rhs_vector.size() == dof_handler.n_dofs(),
ExcDimensionMismatch(rhs_vector.size(), dof_handler.n_dofs()));
{
const hp::FECollection<dim> &fe = dof_handler.get_fe();
Assert (fe.n_components() == rhs_function.n_components,
- ExcComponentMismatch());
+ ExcDimensionMismatch(fe.n_components(), rhs_function.n_components));
Assert (rhs_vector.size() == dof_handler.n_dofs(),
ExcDimensionMismatch(rhs_vector.size(), dof_handler.n_dofs()));
// cell
const FiniteElement<1> &fe = outermost_cell->get_fe();
Assert (fe.n_components() == boundary_function.n_components,
- ExcComponentMismatch());
+ ExcDimensionMismatch(fe.n_components(), boundary_function.n_components));
// set the component mask to either
// the original value or a vector
std::vector<bool> (fe.n_components(), true) :
component_mask_);
Assert (std::count(component_mask.begin(), component_mask.end(), true) > 0,
- ExcComponentMismatch());
+ ExcNoComponentSelected());
// now set the value of the
// outermost degree of
for (typename FunctionMap<dim>::type::const_iterator i=function_map.begin();
i!=function_map.end(); ++i)
Assert (n_components == i->second->n_components,
- ExcInvalidFE());
+ ExcDimensionMismatch(n_components, i->second->n_components));
// set the component mask to either
// the original value or a vector
std::vector<bool> (n_components, true) :
component_mask_);
Assert (std::count(component_mask.begin(), component_mask.end(), true) > 0,
- ExcComponentMismatch());
+ ExcNoComponentSelected());
// field to store the indices
std::vector<unsigned int> face_dofs;
for (unsigned int c=0; c<n_components; ++c)
if (fe.get_nonzero_components(cell_i)[c])
Assert (component_mask[c] == false,
- ExcFENotPrimitive());
+ FETools::ExcFENotPrimitive());
// let's pick
// the first
// acceptable for higher dimensions. Fix this.
Assert (dof.get_fe().n_components() == boundary_functions.begin()->second->n_components,
- ExcComponentMismatch());
+ ExcDimensionMismatch(dof.get_fe().n_components(),
+ boundary_functions.begin()->second->n_components));
std::vector<unsigned int> dof_to_boundary_mapping;
std::set<unsigned char> selected_boundary_components;