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
349 template <
class Iterator,
int dim>
365 return (diff*
dir > 0);
400 return (diff*
dir > 0 || (diff*
dir==0 && c1.second<c2.second));
438 template <
typename DoFHandlerType>
441 const bool reversed_numbering =
false,
442 const bool use_constraints =
false);
449 template <
typename DoFHandlerType>
452 const DoFHandlerType &,
453 const bool reversed_numbering =
false,
454 const bool use_constraints =
false);
468 template <
typename DoFHandlerType>
471 const bool reversed_numbering =
false,
472 const bool use_constraints =
false);
478 template <
typename DoFHandlerType>
481 const DoFHandlerType &,
482 const bool reversed_numbering =
false,
483 const bool use_constraints =
false);
496 template <
typename DoFHandlerType>
499 const bool reversed_numbering =
false,
500 const bool use_constraints =
false);
506 template <
typename DoFHandlerType>
509 const DoFHandlerType &,
510 const bool reversed_numbering =
false,
511 const bool use_constraints =
false);
578 template <
typename DoFHandlerType>
581 const bool reversed_numbering =
false,
582 const bool use_constraints =
false,
583 const std::vector<types::global_dof_index> &starting_indices
584 = std::vector<types::global_dof_index>());
593 template <
typename DoFHandlerType>
596 const DoFHandlerType &,
597 const bool reversed_numbering =
false,
598 const bool use_constraints =
false,
599 const std::vector<types::global_dof_index> &starting_indices
600 = std::vector<types::global_dof_index>());
615 template <
typename DoFHandlerType>
618 const unsigned int level,
619 const bool reversed_numbering =
false,
620 const std::vector<types::global_dof_index> &starting_indices
621 = std::vector<types::global_dof_index> ());
654 template <
typename DoFHandlerType>
657 const std::vector<unsigned int> &target_component
658 = std::vector<unsigned int>());
667 template <
typename DoFHandlerType>
670 const unsigned int level,
671 const std::vector<unsigned int> &target_component
672 = std::vector<unsigned int>());
679 template <
int dim,
int spacedim,
typename CellIterator>
682 const CellIterator &start,
683 const typename identity<CellIterator>::type &end,
684 const std::vector<unsigned int> &target_component,
685 const bool is_level_operation);
703 template <
int dim,
int spacedim>
713 template <
int dim,
int spacedim>
733 template <
int dim,
int spacedim>
742 template <
int dim,
int spacedim,
class ITERATOR,
class ENDITERATOR>
745 const ITERATOR &start,
746 const ENDITERATOR &end,
747 bool is_level_operation);
855 template <
typename DoFHandlerType>
858 const std::vector<typename DoFHandlerType::active_cell_iterator> &cell_order);
891 template <
typename DoFHandlerType>
894 (std::vector<types::global_dof_index> &renumbering,
895 std::vector<types::global_dof_index> &inverse_renumbering,
896 const DoFHandlerType &dof_handler,
897 const std::vector<typename DoFHandlerType::active_cell_iterator> &cell_order);
903 template <
typename DoFHandlerType>
906 const unsigned int level,
907 const std::vector<typename DoFHandlerType::level_cell_iterator> &cell_order);
913 template <
typename DoFHandlerType>
916 (std::vector<types::global_dof_index> &renumbering,
917 std::vector<types::global_dof_index> &inverse_renumbering,
918 const DoFHandlerType &dof_handler,
919 const unsigned int level,
920 const std::vector<typename DoFHandlerType::level_cell_iterator> &cell_order);
956 template <
typename DoFHandlerType>
960 const bool dof_wise_renumbering =
false);
967 template <
typename DoFHandlerType>
970 const unsigned int level,
972 const bool dof_wise_renumbering =
false);
979 template <
typename DoFHandlerType>
982 std::vector<types::global_dof_index> &reverse,
983 const DoFHandlerType &dof_handler,
985 const bool dof_wise_renumbering);
992 template <
typename DoFHandlerType>
995 std::vector<types::global_dof_index> &reverse,
996 const DoFHandlerType &dof_handler,
997 const unsigned int level,
999 const bool dof_wise_renumbering);
1009 template <
typename DoFHandlerType>
1013 const bool counter =
false);
1019 template <
typename DoFHandlerType>
1022 const unsigned int level,
1024 const bool counter =
false);
1031 template <
typename DoFHandlerType>
1034 const DoFHandlerType &dof_handler,
1036 const bool counter);
1056 template <
typename DoFHandlerType>
1059 const std::vector<bool> &selected_dofs);
1071 template <
typename DoFHandlerType>
1074 const std::vector<bool> &selected_dofs,
1075 const unsigned int level);
1085 template <
typename DoFHandlerType>
1088 const DoFHandlerType &dof_handler,
1089 const std::vector<bool> &selected_dofs);
1100 template <
typename DoFHandlerType>
1103 const DoFHandlerType &dof_handler,
1104 const std::vector<bool> &selected_dofs,
1105 const unsigned int level);
1117 template <
typename DoFHandlerType>
1119 random (DoFHandlerType &dof_handler);
1128 template <
typename DoFHandlerType>
1130 compute_random (std::vector<types::global_dof_index> &new_dof_indices,
1131 const DoFHandlerType &dof_handler);
1164 template <
typename DoFHandlerType>
1173 template <
typename DoFHandlerType>
1176 const DoFHandlerType &dof_handler);
1190 "The DoFHandler on which this function should work has not " 1191 "been initialized, i.e., it doesn't appear that DoF indices " 1192 "have been distributed on it.");
1211 DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcInvalidComponentOrder()
void compute_downstream(std::vector< types::global_dof_index > &new_dof_indices, std::vector< types::global_dof_index > &reverse, const DoFHandlerType &dof_handler, const Tensor< 1, DoFHandlerType::space_dimension > &direction, const bool dof_wise_renumbering)
void downstream(DoFHandlerType &dof_handler, const Tensor< 1, DoFHandlerType::space_dimension > &direction, const bool dof_wise_renumbering=false)
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(DoFHandlerType &dof_handler, const std::vector< unsigned int > &target_component=std::vector< unsigned int >())
types::global_dof_index compute_component_wise(std::vector< types::global_dof_index > &new_dof_indices, const CellIterator &start, const typename identity< CellIterator >::type &end, const std::vector< unsigned int > &target_component, const bool is_level_operation)
CompareDownstream(const Tensor< 1, dim > &dir)
static ::ExceptionBase & ExcDoFHandlerNotInitialized()
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)
#define DeclExceptionMsg(Exception, defaulttext)
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
void compute_random(std::vector< types::global_dof_index > &new_dof_indices, const DoFHandlerType &dof_handler)
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 >())
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)
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