16 #ifndef dealii__dof_renumbering_h 17 #define dealii__dof_renumbering_h 20 #include <deal.II/base/config.h> 21 #include <deal.II/base/exceptions.h> 22 #include <deal.II/base/point.h> 23 #include <deal.II/dofs/dof_handler.h> 24 #include <deal.II/hp/dof_handler.h> 28 DEAL_II_NAMESPACE_OPEN
345 template <
class Iterator,
int dim>
361 return (diff*
dir > 0);
396 return (diff*
dir > 0 || (diff*
dir==0 && c1.second<c2.second));
434 template <
typename DoFHandlerType>
437 const bool reversed_numbering =
false,
438 const bool use_constraints =
false);
445 template <
typename DoFHandlerType>
448 const DoFHandlerType &,
449 const bool reversed_numbering =
false,
450 const bool use_constraints =
false);
464 template <
typename DoFHandlerType>
467 const bool reversed_numbering =
false,
468 const bool use_constraints =
false);
474 template <
typename DoFHandlerType>
477 const DoFHandlerType &,
478 const bool reversed_numbering =
false,
479 const bool use_constraints =
false);
492 template <
typename DoFHandlerType>
495 const bool reversed_numbering =
false,
496 const bool use_constraints =
false);
502 template <
typename DoFHandlerType>
505 const DoFHandlerType &,
506 const bool reversed_numbering =
false,
507 const bool use_constraints =
false);
543 template <
typename DoFHandlerType>
546 const bool reversed_numbering =
false,
547 const bool use_constraints =
false,
548 const std::vector<types::global_dof_index> &starting_indices
549 = std::vector<types::global_dof_index>());
556 template <
typename DoFHandlerType>
559 const DoFHandlerType &,
560 const bool reversed_numbering =
false,
561 const bool use_constraints =
false,
562 const std::vector<types::global_dof_index> &starting_indices
563 = std::vector<types::global_dof_index>());
578 template <
typename DoFHandlerType>
581 const unsigned int level,
582 const bool reversed_numbering =
false,
583 const std::vector<types::global_dof_index> &starting_indices
584 = std::vector<types::global_dof_index> ());
617 template <
int dim,
int spacedim>
620 const std::vector<unsigned int> &target_component
621 = std::vector<unsigned int>());
631 const std::vector<unsigned int> &target_component = std::vector<unsigned int> ());
639 template <
typename DoFHandlerType>
642 const unsigned int level,
643 const std::vector<unsigned int> &target_component
644 = std::vector<unsigned int>());
651 template <
int dim,
int spacedim,
class ITERATOR,
class ENDITERATOR>
654 const ITERATOR &start,
655 const ENDITERATOR &end,
656 const std::vector<unsigned int> &target_component,
657 bool is_level_operation);
675 template <
int dim,
int spacedim>
685 template <
int dim,
int spacedim>
705 template <
int dim,
int spacedim>
714 template <
int dim,
int spacedim,
class ITERATOR,
class ENDITERATOR>
717 const ITERATOR &start,
718 const ENDITERATOR &end,
719 bool is_level_operation);
761 template <
typename DoFHandlerType>
764 const std::vector<typename DoFHandlerType::active_cell_iterator> &cell_order);
797 template <
typename DoFHandlerType>
800 (std::vector<types::global_dof_index> &renumbering,
801 std::vector<types::global_dof_index> &inverse_renumbering,
802 const DoFHandlerType &dof_handler,
803 const std::vector<typename DoFHandlerType::active_cell_iterator> &cell_order);
809 template <
typename DoFHandlerType>
812 const unsigned int level,
813 const std::vector<typename DoFHandlerType::level_cell_iterator> &cell_order);
819 template <
typename DoFHandlerType>
822 (std::vector<types::global_dof_index> &renumbering,
823 std::vector<types::global_dof_index> &inverse_renumbering,
824 const DoFHandlerType &dof_handler,
825 const unsigned int level,
826 const std::vector<typename DoFHandlerType::level_cell_iterator> &cell_order);
862 template <
typename DoFHandlerType>
866 const bool dof_wise_renumbering =
false);
873 template <
typename DoFHandlerType>
876 const unsigned int level,
878 const bool dof_wise_renumbering =
false);
885 template <
typename DoFHandlerType>
888 std::vector<types::global_dof_index> &reverse,
889 const DoFHandlerType &dof_handler,
891 const bool dof_wise_renumbering);
898 template <
typename DoFHandlerType>
901 std::vector<types::global_dof_index> &reverse,
902 const DoFHandlerType &dof_handler,
903 const unsigned int level,
905 const bool dof_wise_renumbering);
915 template <
typename DoFHandlerType>
919 const bool counter =
false);
925 template <
typename DoFHandlerType>
928 const unsigned int level,
930 const bool counter =
false);
937 template <
typename DoFHandlerType>
940 const DoFHandlerType &dof_handler,
962 template <
typename DoFHandlerType>
965 const std::vector<bool> &selected_dofs);
977 template <
typename DoFHandlerType>
980 const std::vector<bool> &selected_dofs,
981 const unsigned int level);
991 template <
typename DoFHandlerType>
994 const DoFHandlerType &dof_handler,
995 const std::vector<bool> &selected_dofs);
1006 template <
typename DoFHandlerType>
1009 const DoFHandlerType &dof_handler,
1010 const std::vector<bool> &selected_dofs,
1011 const unsigned int level);
1023 template <
typename DoFHandlerType>
1025 random (DoFHandlerType &dof_handler);
1034 template <
typename DoFHandlerType>
1036 compute_random (std::vector<types::global_dof_index> &new_dof_indices,
1037 const DoFHandlerType &dof_handler);
1066 template <
typename DoFHandlerType>
1075 template <
typename DoFHandlerType>
1078 const DoFHandlerType &dof_handler);
1110 template <
typename DoFHandlerType>
1115 const bool dof_wise_renumbering)
1117 std::vector<types::global_dof_index> renumbering(dof.n_dofs());
1118 std::vector<types::global_dof_index> reverse(dof.n_dofs());
1120 dof_wise_renumbering);
1122 dof.renumber_dofs(renumbering);
1128 DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcInvalidComponentOrder()
void minimum_degree(DoFHandlerType &dof_handler, const bool reversed_numbering=false, const bool use_constraints=false)
void compute_cell_wise(std::vector< types::global_dof_index > &renumbering, std::vector< types::global_dof_index > &inverse_renumbering, const DoFHandlerType &dof_handler, const std::vector< typename DoFHandlerType::active_cell_iterator > &cell_order)
void compute_king_ordering(std::vector< types::global_dof_index > &new_dof_indices, const DoFHandlerType &, const bool reversed_numbering=false, const bool use_constraints=false)
void sort_selected_dofs_back(DoFHandlerType &dof_handler, const std::vector< bool > &selected_dofs)
void hierarchical(DoFHandler< dim > &dof_handler)
void component_wise(DoFHandler< dim, spacedim > &dof_handler, const std::vector< unsigned int > &target_component=std::vector< unsigned int >())
CompareDownstream(const Tensor< 1, dim > &dir)
void random(DoFHandlerType &dof_handler)
const Tensor< 1, dim > dir
void compute_minimum_degree(std::vector< types::global_dof_index > &new_dof_indices, const DoFHandlerType &, const bool reversed_numbering=false, const bool use_constraints=false)
void Cuthill_McKee(DoFHandlerType &dof_handler, const bool reversed_numbering=false, const bool use_constraints=false)
unsigned int global_dof_index
void compute_subdomain_wise(std::vector< types::global_dof_index > &new_dof_indices, const DoFHandlerType &dof_handler)
static ::ExceptionBase & ExcNotDGFEM()
#define DeclException0(Exception0)
bool operator()(const std::pair< Point< dim >, types::global_dof_index > &c1, const std::pair< Point< dim >, types::global_dof_index > &c2) const
static ::ExceptionBase & ExcRenumberingIncomplete()
void compute_random(std::vector< types::global_dof_index > &new_dof_indices, const DoFHandlerType &dof_handler)
void downstream(DoFHandlerType &dof_handler, const Point< DoFHandlerType::space_dimension > &direction, const bool dof_wise_renumbering=false)
void compute_sort_selected_dofs_back(std::vector< types::global_dof_index > &new_dof_indices, const DoFHandlerType &dof_handler, const std::vector< bool > &selected_dofs)
void compute_Cuthill_McKee(std::vector< types::global_dof_index > &new_dof_indices, const DoFHandlerType &, const bool reversed_numbering=false, const bool use_constraints=false, const std::vector< types::global_dof_index > &starting_indices=std::vector< types::global_dof_index >())
void compute_clockwise_dg(std::vector< types::global_dof_index > &new_dof_indices, const DoFHandlerType &dof_handler, const Point< DoFHandlerType::space_dimension > ¢er, const bool counter)
void king_ordering(DoFHandlerType &dof_handler, const bool reversed_numbering=false, const bool use_constraints=false)
void block_wise(DoFHandler< dim, spacedim > &dof_handler)
void Cuthill_McKee(DoFHandlerType &dof_handler, const bool reversed_numbering=false, const bool use_constraints=false, const std::vector< types::global_dof_index > &starting_indices=std::vector< types::global_dof_index >())
types::global_dof_index compute_component_wise(std::vector< types::global_dof_index > &new_dof_indices, const ITERATOR &start, const ENDITERATOR &end, const std::vector< unsigned int > &target_component, bool is_level_operation)
void compute_Cuthill_McKee(std::vector< types::global_dof_index > &new_dof_indices, const DoFHandlerType &, const bool reversed_numbering=false, const bool use_constraints=false)
const Tensor< 1, dim > dir
ComparePointwiseDownstream(const Tensor< 1, dim > &dir)
void subdomain_wise(DoFHandlerType &dof_handler)
void clockwise_dg(DoFHandlerType &dof_handler, const Point< DoFHandlerType::space_dimension > ¢er, const bool counter=false)
void compute_downstream(std::vector< types::global_dof_index > &new_dof_indices, std::vector< types::global_dof_index > &reverse, const DoFHandlerType &dof_handler, const Point< DoFHandlerType::space_dimension > &direction, const bool dof_wise_renumbering)
types::global_dof_index compute_block_wise(std::vector< types::global_dof_index > &new_dof_indices, const ITERATOR &start, const ENDITERATOR &end, bool is_level_operation)
void cell_wise(DoFHandlerType &dof_handler, const std::vector< typename DoFHandlerType::active_cell_iterator > &cell_order)
bool operator()(const Iterator &c1, const Iterator &c2) const