BOOST_SERIALIZATION_SPLIT_MEMBER()
- /**
- * @todo Replace by ExcInternalError.
+ /**
+ * We are trying to renumber the
+ * degrees of freedom, but
+ * somehow did not count
+ * correctly.
+ *
+ * @ingroup Exceptions
*/
DeclException0 (ExcRenumberingIncomplete);
/**
* Exception
+ * @ingroup Exceptions
*/
DeclException0 (ExcGridsDoNotMatch);
/**
* Exception
+ * @ingroup Exceptions
*/
DeclException0 (ExcInvalidBoundaryIndicator);
/**
* Exception
- */
- DeclException1 (ExcMatrixHasWrongSize,
- int,
- << "The matrix has the wrong dimension " << arg1);
- /**
- * Exception
+ * @ingroup Exceptions
*/
DeclException1 (ExcNewNumbersNotConsecutive,
int,
<< "the index " << arg1 << " does not exist.");
/**
* Exception
+ * @ingroup Exceptions
*/
DeclException1 (ExcInvalidLevel,
int,
<< " is not in the valid range!");
/**
* Exception
+ * @ingroup Exceptions
*/
DeclException0 (ExcFacesHaveNoLevel);
/**
* The triangulation level you
* accessed is empty.
+ * @ingroup Exceptions
*/
DeclException1 (ExcEmptyLevel,
int,
std::vector<Table<2,Coupling> >
dof_couplings_from_component_couplings (const hp::FECollection<dim,spacedim> &fe,
const Table<2,Coupling> &component_couplings);
-
- /**
- * Exception
- */
- DeclException0 (ExcFEHasNoSupportPoints);
- /**
- * Exception
- */
- DeclException0 (ExcFENotPrimitive);
- /**
- * Exception
- */
- DeclException2 (ExcWrongSize,
- int, int,
- << "The dimension " << arg1 << " of the vector is wrong. "
- << "It should be " << arg2);
- /**
- * Exception
- */
- DeclException2 (ExcInvalidComponent,
- int, int,
- << "The component you gave (" << arg1 << ") "
- << "is invalid with respect to the number "
- << "of components in the finite element "
- << "(" << arg2 << ")");
/**
* Exception
+ * @ingroup Exceptions
*/
DeclException0 (ExcFiniteElementsDontMatch);
/**
* Exception
+ * @ingroup Exceptions
*/
DeclException0 (ExcGridNotCoarser);
/**
* Exception
+ * @ingroup Exceptions
*/
DeclException0 (ExcGridsDontMatch);
/**
* Exception
+ * @ingroup Exceptions
*/
DeclException0 (ExcNoFESelected);
/**
* Exception
+ * @ingroup Exceptions
*/
DeclException0 (ExcInvalidBoundaryIndicator);
}
const hp::FECollection<dim> fe_collection (dof.get_fe ());
Assert (fe_collection[0].has_support_points(),
- DoFTools::ExcFEHasNoSupportPoints());
+ typename FiniteElement<dim>::ExcFEHasNoSupportPoints());
hp::QCollection<dim> quadrature_collection;
for (unsigned int comp=0; comp<fe_collection.size(); ++comp)
{
Assert (fe_collection[comp].has_support_points(),
- DoFTools::ExcFEHasNoSupportPoints());
+ typename FiniteElement<dim>::ExcFEHasNoSupportPoints());
quadrature_collection.push_back
(Quadrature<DH::dimension> (fe_collection[comp].
get_unit_support_points()));
else
{
Assert (dof.get_fe().has_support_points(),
- DoFTools::ExcFEHasNoSupportPoints());
+ typename FiniteElement<dim>::ExcFEHasNoSupportPoints());
const unsigned int n_dofs = dof.n_dofs(level);
std::vector<std::pair<Point<dim>,unsigned int> > support_point_list
(n_dofs);
Vector<double> &dof_data,
const unsigned int component)
{
- const Triangulation<DH::dimension,DH::space_dimension> &tria = dof_handler.get_tria();
-
- Assert (cell_data.size()==tria.n_active_cells(),
- ExcWrongSize (cell_data.size(), tria.n_active_cells()));
- Assert (dof_data.size()==dof_handler.n_dofs(),
- ExcWrongSize (dof_data.size(), dof_handler.n_dofs()));
- Assert (component < n_components(dof_handler),
- ExcInvalidComponent(component, n_components(dof_handler)));
+ const unsigned int dim = DH::dimension;
+ const unsigned int spacedim = DH::space_dimension;
+ const Triangulation<dim,spacedim> &tria = dof_handler.get_tria();
+
+ AssertDimension (cell_data.size(), tria.n_active_cells());
+ AssertDimension (dof_data.size(), dof_handler.n_dofs());
+ AssertIndexRange (component, n_components(dof_handler));
Assert (fe_is_primitive(dof_handler) == true,
- ExcFENotPrimitive());
+ typename FiniteElement<dim>::ExcFENotPrimitive());
// store a flag whether we should care
// about different components. this is
std::vector<bool> &selected_dofs,
const std::set<unsigned char> &boundary_indicators)
{
- Assert (component_select.size() == n_components(dof_handler),
- ExcWrongSize (component_select.size(),
- n_components(dof_handler)));
+ AssertDimension (component_select.size(),n_components(dof_handler));
Assert (boundary_indicators.find (255) == boundary_indicators.end(),
ExcInvalidBoundaryIndicator());
const unsigned int dim=DH::dimension;
std::vector<bool> &selected_dofs,
const std::set<unsigned char> &boundary_indicators)
{
- Assert (component_select.size() == n_components(dof_handler),
- ExcWrongSize (component_select.size(),
- n_components(dof_handler)));
+ AssertDimension (component_select.size(), n_components(dof_handler));
Assert (boundary_indicators.find (255) == boundary_indicators.end(),
ExcInvalidBoundaryIndicator());
get_active_fe_indices (const DH &dof_handler,
std::vector<unsigned int> &active_fe_indices)
{
- Assert (active_fe_indices.size() == dof_handler.get_tria().n_active_cells(),
- ExcWrongSize (active_fe_indices.size(),
- dof_handler.get_tria().n_active_cells()));
+ AssertDimension (active_fe_indices.size(), dof_handler.get_tria().n_active_cells());
typename DH::active_cell_iterator
cell = dof_handler.begin_active(),
// check whether component numbers
// are valid
- Assert (coarse_component < coarse_fe.n_components(),
- ExcInvalidComponent (coarse_component, coarse_fe.n_components()));
- Assert (fine_component < fine_fe.n_components(),
- ExcInvalidComponent (fine_component, fine_fe.n_components()));
+ AssertIndexRange (coarse_component,coarse_fe.n_components());
+ AssertIndexRange (fine_component, fine_fe.n_components());
// check whether respective finite
// elements are equal
Assert (coarse_fe.base_element (coarse_fe.component_to_base_index(coarse_component).first)
// check whether fe has support
// points
Assert (dof_handler.get_fe().has_support_points(),
- ExcFEHasNoSupportPoints());
- Assert (support_points.size() == dof_handler.n_dofs(),
- ExcWrongSize (support_points.size(), dof_handler.n_dofs()));
+ typename FiniteElement<dim>::ExcFEHasNoSupportPoints());
+ AssertDimension (support_points.size(), dof_handler.n_dofs());
// now loop over all cells and
// enquire the support points on