16 #ifndef dealii_dof_renumbering_h 17 #define dealii_dof_renumbering_h 20 #include <deal.II/base/config.h> 22 #include <deal.II/base/exceptions.h> 23 #include <deal.II/base/point.h> 25 #include <deal.II/dofs/dof_handler.h> 27 #include <deal.II/hp/dof_handler.h> 31 DEAL_II_NAMESPACE_OPEN
352 template <
class Iterator,
int dim>
368 return (diff *
dir > 0);
403 return (diff *
dir > 0 || (diff *
dir == 0 && c1.second < c2.second));
441 template <
typename DoFHandlerType>
444 const bool reversed_numbering =
false,
445 const bool use_constraints =
false);
452 template <
typename DoFHandlerType>
455 const DoFHandlerType &,
456 const bool reversed_numbering =
false,
457 const bool use_constraints =
false);
471 template <
typename DoFHandlerType>
474 const bool reversed_numbering =
false,
475 const bool use_constraints =
false);
481 template <
typename DoFHandlerType>
484 const DoFHandlerType &,
485 const bool reversed_numbering =
false,
486 const bool use_constraints =
false);
499 template <
typename DoFHandlerType>
502 const bool reversed_numbering =
false,
503 const bool use_constraints =
false);
509 template <
typename DoFHandlerType>
512 std::vector<types::global_dof_index> &new_dof_indices,
513 const DoFHandlerType &,
514 const bool reversed_numbering =
false,
515 const bool use_constraints =
false);
582 template <
typename DoFHandlerType>
585 const bool reversed_numbering =
false,
586 const bool use_constraints =
false,
587 const std::vector<types::global_dof_index> &starting_indices =
588 std::vector<types::global_dof_index>());
597 template <
typename DoFHandlerType>
600 std::vector<types::global_dof_index> &new_dof_indices,
601 const DoFHandlerType &,
602 const bool reversed_numbering =
false,
603 const bool use_constraints =
false,
604 const std::vector<types::global_dof_index> &starting_indices =
605 std::vector<types::global_dof_index>());
620 template <
typename DoFHandlerType>
623 const unsigned int level,
624 const bool reversed_numbering =
false,
625 const std::vector<types::global_dof_index> &starting_indices =
626 std::vector<types::global_dof_index>());
659 template <
typename DoFHandlerType>
662 const std::vector<unsigned int> &target_component =
663 std::vector<unsigned int>());
672 template <
typename DoFHandlerType>
675 const unsigned int level,
676 const std::vector<unsigned int> &target_component =
677 std::vector<unsigned int>());
684 template <
int dim,
int spacedim,
typename CellIterator>
687 const CellIterator & start,
688 const typename identity<CellIterator>::type &end,
689 const std::vector<unsigned int> &target_component,
690 const bool is_level_operation);
708 template <
int dim,
int spacedim>
718 template <
int dim,
int spacedim>
738 template <
int dim,
int spacedim>
747 template <
int dim,
int spacedim,
class ITERATOR,
class ENDITERATOR>
750 const ITERATOR & start,
751 const ENDITERATOR & end,
752 bool is_level_operation);
860 template <
typename DoFHandlerType>
863 const std::vector<typename DoFHandlerType::active_cell_iterator>
897 template <
typename DoFHandlerType>
900 std::vector<types::global_dof_index> &renumbering,
901 std::vector<types::global_dof_index> &inverse_renumbering,
902 const DoFHandlerType & dof_handler,
903 const std::vector<typename DoFHandlerType::active_cell_iterator>
910 template <
typename DoFHandlerType>
913 const unsigned int level,
914 const std::vector<typename DoFHandlerType::level_cell_iterator>
921 template <
typename DoFHandlerType>
924 std::vector<types::global_dof_index> &renumbering,
925 std::vector<types::global_dof_index> &inverse_renumbering,
926 const DoFHandlerType & dof_handler,
927 const unsigned int level,
928 const std::vector<typename DoFHandlerType::level_cell_iterator>
966 template <
typename DoFHandlerType>
970 const bool dof_wise_renumbering =
false);
978 template <
typename DoFHandlerType>
981 const unsigned int level,
983 const bool dof_wise_renumbering =
false);
990 template <
typename DoFHandlerType>
993 std::vector<types::global_dof_index> & new_dof_indices,
994 std::vector<types::global_dof_index> & reverse,
995 const DoFHandlerType & dof_handler,
997 const bool dof_wise_renumbering);
1004 template <
typename DoFHandlerType>
1007 std::vector<types::global_dof_index> & new_dof_indices,
1008 std::vector<types::global_dof_index> & reverse,
1009 const DoFHandlerType & dof_handler,
1010 const unsigned int level,
1012 const bool dof_wise_renumbering);
1022 template <
typename DoFHandlerType>
1026 const bool counter =
false);
1032 template <
typename DoFHandlerType>
1035 const unsigned int level,
1037 const bool counter =
false);
1044 template <
typename DoFHandlerType>
1047 const DoFHandlerType & dof_handler,
1049 const bool counter);
1069 template <
typename DoFHandlerType>
1072 const std::vector<bool> &selected_dofs);
1084 template <
typename DoFHandlerType>
1087 const std::vector<bool> &selected_dofs,
1088 const unsigned int level);
1098 template <
typename DoFHandlerType>
1101 std::vector<types::global_dof_index> &new_dof_indices,
1102 const DoFHandlerType & dof_handler,
1103 const std::vector<bool> & selected_dofs);
1114 template <
typename DoFHandlerType>
1117 std::vector<types::global_dof_index> &new_dof_indices,
1118 const DoFHandlerType & dof_handler,
1119 const std::vector<bool> & selected_dofs,
1120 const unsigned int level);
1132 template <
typename DoFHandlerType>
1134 random(DoFHandlerType &dof_handler);
1143 template <
typename DoFHandlerType>
1145 compute_random(std::vector<types::global_dof_index> &new_dof_indices,
1146 const DoFHandlerType & dof_handler);
1179 template <
typename DoFHandlerType>
1188 template <
typename DoFHandlerType>
1191 const DoFHandlerType & dof_handler);
1205 "The DoFHandler on which this function should work has not " 1206 "been initialized, i.e., it doesn't appear that DoF indices " 1207 "have been distributed on it.");
1226 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)
unsigned long long int global_dof_index
static::ExceptionBase & ExcDoFHandlerNotInitialized()
const Tensor< 1, dim > dir
void random(DoFHandlerType &dof_handler)
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 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)
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 >())
bool operator()(const Iterator &c1, const Iterator &c2) const
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 >())
const Tensor< 1, dim > dir
bool operator()(const std::pair< Point< dim >, types::global_dof_index > &c1, const std::pair< Point< dim >, types::global_dof_index > &c2) const
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)