From c8f7b82a90c6714760821131067a03be64e9bb9b Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 22 May 1998 07:39:16 +0000 Subject: [PATCH] Add support for numbering of boundary (for integration on the boundary). git-svn-id: https://svn.dealii.org/trunk@330 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/dofs/dof_handler.cc | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/deal.II/deal.II/source/dofs/dof_handler.cc b/deal.II/deal.II/source/dofs/dof_handler.cc index fbb3c795dc..dc5049ac12 100644 --- a/deal.II/deal.II/source/dofs/dof_handler.cc +++ b/deal.II/deal.II/source/dofs/dof_handler.cc @@ -725,8 +725,8 @@ void DoFHandler::distribute_dofs (const FiniteElementBase &fe) { -int DoFHandler<1>::distribute_dofs_on_cell (active_cell_iterator &cell, - unsigned int next_free_dof) { +unsigned int DoFHandler<1>::distribute_dofs_on_cell (active_cell_iterator &cell, + unsigned int next_free_dof) { // distribute dofs of vertices for (unsigned int v=0; v::vertices_per_cell; ++v) @@ -776,8 +776,8 @@ int DoFHandler<1>::distribute_dofs_on_cell (active_cell_iterator &cell, -int DoFHandler<2>::distribute_dofs_on_cell (active_cell_iterator &cell, - unsigned int next_free_dof) { +unsigned int DoFHandler<2>::distribute_dofs_on_cell (active_cell_iterator &cell, + unsigned int next_free_dof) { if (selected_fe->dofs_per_vertex > 0) // number dofs on vertices for (unsigned int vertex=0; vertex::vertices_per_cell; ++vertex) @@ -824,7 +824,7 @@ int DoFHandler<2>::distribute_dofs_on_cell (active_cell_iterator &cell, template void DoFHandler::renumber_dofs (const RenumberingMethod method, - bool use_constraints, + const bool use_constraints, const vector &starting_points) { // make the connection graph dSMatrixStruct sparsity (n_dofs(), max_couplings_between_dofs()); @@ -1185,7 +1185,7 @@ void DoFHandler::make_boundary_sparsity_pattern (const vector &dof_to_ // make sparsity pattern for this cell for (unsigned int i=0; i::map_dof_to_boundary_indices (vector &mapping) const { mapping.clear (); mapping.insert (mapping.end(), n_dofs(), -1); - + const unsigned int dofs_per_face = selected_fe->dofs_per_face; vector dofs_on_face(dofs_per_face); int next_boundary_index = 0; @@ -1665,6 +1665,10 @@ void DoFHandler::map_dof_to_boundary_indices (const FunctionMap &boundary_i mapping.clear (); mapping.insert (mapping.end(), n_dofs(), -1); + // return if there is nothing to do + if (boundary_indicators.size() == 0) + return; + const unsigned int dofs_per_face = selected_fe->dofs_per_face; vector dofs_on_face(dofs_per_face); int next_boundary_index = 0; -- 2.39.5