15#ifndef dealii_dof_renumbering_h
16#define dealii_dof_renumbering_h
32template <
int,
typename,
typename>
362 template <
class Iterator,
int dim>
378 return (diff *
dir > 0);
413 return (diff *
dir > 0 || (diff *
dir == 0 && c1.second < c2.second));
451 template <
int dim,
int spacedim>
454 const bool reversed_numbering =
false,
455 const bool use_constraints =
false);
462 template <
int dim,
int spacedim>
466 const bool reversed_numbering =
false,
467 const bool use_constraints =
false);
481 template <
int dim,
int spacedim>
484 const bool reversed_numbering =
false,
485 const bool use_constraints =
false);
491 template <
int dim,
int spacedim>
495 const bool reversed_numbering =
false,
496 const bool use_constraints =
false);
509 template <
int dim,
int spacedim>
512 const bool reversed_numbering =
false,
513 const bool use_constraints =
false);
519 template <
int dim,
int spacedim>
522 std::vector<types::global_dof_index> &new_dof_indices,
524 const bool reversed_numbering =
false,
525 const bool use_constraints =
false);
592 template <
int dim,
int spacedim>
595 const bool reversed_numbering =
false,
596 const bool use_constraints =
false,
597 const std::vector<types::global_dof_index> &starting_indices =
598 std::vector<types::global_dof_index>());
609 template <
int dim,
int spacedim>
612 std::vector<types::global_dof_index> &new_dof_indices,
614 const bool reversed_numbering =
false,
615 const bool use_constraints =
false,
616 const std::vector<types::global_dof_index> &starting_indices =
617 std::vector<types::global_dof_index>(),
633 template <
int dim,
int spacedim>
636 const unsigned int level,
637 const bool reversed_numbering =
false,
638 const std::vector<types::global_dof_index> &starting_indices =
639 std::vector<types::global_dof_index>());
672 template <
int dim,
int spacedim>
675 const std::vector<unsigned int> &target_component =
676 std::vector<unsigned int>());
685 template <
int dim,
int spacedim>
688 const unsigned int level,
689 const std::vector<unsigned int> &target_component =
690 std::vector<unsigned int>());
697 template <
int dim,
int spacedim,
typename CellIterator>
700 const CellIterator &start,
702 const std::vector<unsigned int> &target_component,
703 const bool is_level_operation);
733 template <
int dim,
int spacedim>
743 template <
int dim,
int spacedim>
752 template <
int dim,
int spacedim,
class IteratorType,
class EndIteratorType>
755 const IteratorType &start,
756 const EndIteratorType &end,
757 const bool is_level_operation);
840 template <
int dim,
int spacedim>
868 template <
int dim,
int spacedim>
910 template <
int dim,
int spacedim>
913 std::vector<types::global_dof_index> &renumbering,
914 std::vector<types::global_dof_index> &inverse_renumbering,
923 template <
int dim,
int spacedim>
927 const unsigned int level,
935 template <
int dim,
int spacedim>
938 std::vector<types::global_dof_index> &renumbering,
939 std::vector<types::global_dof_index> &inverse_renumbering,
941 const unsigned int level,
980 template <
int dim,
int spacedim>
984 const bool dof_wise_renumbering =
false);
992 template <
int dim,
int spacedim>
995 const unsigned int level,
997 const bool dof_wise_renumbering =
false);
1004 template <
int dim,
int spacedim>
1007 std::vector<types::global_dof_index> &reverse,
1010 const bool dof_wise_renumbering);
1017 template <
int dim,
int spacedim>
1020 std::vector<types::global_dof_index> &reverse,
1022 const unsigned int level,
1024 const bool dof_wise_renumbering);
1034 template <
int dim,
int spacedim>
1038 const bool counter =
false);
1044 template <
int dim,
int spacedim>
1047 const unsigned int level,
1049 const bool counter =
false);
1056 template <
int dim,
int spacedim>
1061 const bool counter);
1081 template <
int dim,
int spacedim>
1084 const std::vector<bool> &selected_dofs);
1096 template <
int dim,
int spacedim>
1099 const std::vector<bool> &selected_dofs,
1100 const unsigned int level);
1110 template <
int dim,
int spacedim>
1113 std::vector<types::global_dof_index> &new_dof_indices,
1115 const std::vector<bool> &selected_dofs);
1126 template <
int dim,
int spacedim>
1129 std::vector<types::global_dof_index> &new_dof_indices,
1131 const std::vector<bool> &selected_dofs,
1132 const unsigned int level);
1144 template <
int dim,
int spacedim>
1154 template <
int dim,
int spacedim>
1165 template <
int dim,
int spacedim>
1167 compute_random(std::vector<types::global_dof_index> &new_dof_indices,
1175 template <
int dim,
int spacedim>
1177 compute_random(std::vector<types::global_dof_index> &new_dof_indices,
1179 const unsigned int level);
1212 template <
int dim,
int spacedim>
1221 template <
int dim,
int spacedim>
1261 template <
int dim,
int spacedim>
1270 template <
int dim,
int spacedim>
1273 std::vector<types::global_dof_index> &new_dof_indices,
1320 typename VectorizedArrayType>
1335 template <
int dim,
int spacedim,
typename Number,
typename AdditionalDataType>
1340 const AdditionalDataType &matrix_free_additional_data);
1351 typename VectorizedArrayType>
1352 std::vector<types::global_dof_index>
1363 template <
int dim,
int spacedim,
typename Number,
typename AdditionalDataType>
1364 std::vector<types::global_dof_index>
1368 const AdditionalDataType &matrix_free_additional_data);
1381 "The DoFHandler on which this function should work has not "
1382 "been initialized, i.e., it doesn't appear that DoF indices "
1383 "have been distributed on it.");
typename LevelSelector::cell_iterator level_cell_iterator
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define DeclException0(Exception0)
static ::ExceptionBase & ExcInvalidComponentOrder()
#define DeclExceptionMsg(Exception, defaulttext)
static ::ExceptionBase & ExcDoFHandlerNotInitialized()
static ::ExceptionBase & ExcNotDGFEM()
typename ActiveSelector::active_cell_iterator active_cell_iterator
void compute_Cuthill_McKee(std::vector< types::global_dof_index > &new_dof_indices, const DoFHandler< dim, spacedim > &, const bool reversed_numbering=false, const bool use_constraints=false)
void Cuthill_McKee(DoFHandler< dim, spacedim > &dof_handler, const bool reversed_numbering=false, const bool use_constraints=false)
void king_ordering(DoFHandler< dim, spacedim > &dof_handler, const bool reversed_numbering=false, const bool use_constraints=false)
void compute_king_ordering(std::vector< types::global_dof_index > &new_dof_indices, const DoFHandler< dim, spacedim > &, const bool reversed_numbering=false, const bool use_constraints=false)
void compute_minimum_degree(std::vector< types::global_dof_index > &new_dof_indices, const DoFHandler< dim, spacedim > &, const bool reversed_numbering=false, const bool use_constraints=false)
void minimum_degree(DoFHandler< dim, spacedim > &dof_handler, const bool reversed_numbering=false, const bool use_constraints=false)
void compute_support_point_wise(std::vector< types::global_dof_index > &new_dof_indices, const DoFHandler< dim, spacedim > &dof_handler)
void compute_subdomain_wise(std::vector< types::global_dof_index > &new_dof_indices, const DoFHandler< dim, spacedim > &dof_handler)
void matrix_free_data_locality(DoFHandler< dim, spacedim > &dof_handler, const MatrixFree< dim, Number, VectorizedArrayType > &matrix_free)
void subdomain_wise(DoFHandler< dim, spacedim > &dof_handler)
types::global_dof_index compute_block_wise(std::vector< types::global_dof_index > &new_dof_indices, const IteratorType &start, const EndIteratorType &end, const bool is_level_operation)
void hierarchical(DoFHandler< dim, spacedim > &dof_handler)
void compute_random(std::vector< types::global_dof_index > &new_dof_indices, const DoFHandler< dim, spacedim > &dof_handler)
void component_wise(DoFHandler< dim, spacedim > &dof_handler, const std::vector< unsigned int > &target_component=std::vector< unsigned int >())
void downstream(DoFHandler< dim, spacedim > &dof_handler, const Tensor< 1, spacedim > &direction, const bool dof_wise_renumbering=false)
void compute_Cuthill_McKee(std::vector< types::global_dof_index > &new_dof_indices, const DoFHandler< dim, spacedim > &, 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 unsigned int level=numbers::invalid_unsigned_int)
void block_wise(DoFHandler< dim, spacedim > &dof_handler)
void Cuthill_McKee(DoFHandler< dim, spacedim > &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_sort_selected_dofs_back(std::vector< types::global_dof_index > &new_dof_indices, const DoFHandler< dim, spacedim > &dof_handler, const std::vector< bool > &selected_dofs)
void sort_selected_dofs_back(DoFHandler< dim, spacedim > &dof_handler, const std::vector< bool > &selected_dofs)
void support_point_wise(DoFHandler< dim, spacedim > &dof_handler)
void compute_cell_wise(std::vector< types::global_dof_index > &renumbering, std::vector< types::global_dof_index > &inverse_renumbering, const DoFHandler< dim, spacedim > &dof_handler, const std::vector< typename DoFHandler< dim, spacedim >::active_cell_iterator > &cell_order)
std::vector< types::global_dof_index > compute_matrix_free_data_locality(const DoFHandler< dim, spacedim > &dof_handler, const MatrixFree< dim, Number, VectorizedArrayType > &matrix_free)
void clockwise_dg(DoFHandler< dim, spacedim > &dof_handler, const Point< spacedim > ¢er, const bool counter=false)
void random(DoFHandler< dim, spacedim > &dof_handler)
void compute_downstream(std::vector< types::global_dof_index > &new_dof_indices, std::vector< types::global_dof_index > &reverse, const DoFHandler< dim, spacedim > &dof_handler, const Tensor< 1, spacedim > &direction, const bool dof_wise_renumbering)
void cell_wise(DoFHandler< dim, spacedim > &dof_handler, const std::vector< typename DoFHandler< dim, spacedim >::active_cell_iterator > &cell_order)
types::global_dof_index compute_component_wise(std::vector< types::global_dof_index > &new_dof_indices, const CellIterator &start, const std_cxx20::type_identity_t< CellIterator > &end, const std::vector< unsigned int > &target_component, const bool is_level_operation)
void compute_clockwise_dg(std::vector< types::global_dof_index > &new_dof_indices, const DoFHandler< dim, spacedim > &dof_handler, const Point< spacedim > ¢er, const bool counter)
static const unsigned int invalid_unsigned_int
typename type_identity< T >::type type_identity_t
unsigned int global_dof_index
bool operator()(const Iterator &c1, const Iterator &c2) const
CompareDownstream(const Tensor< 1, dim > &dir)
const Tensor< 1, dim > dir
ComparePointwiseDownstream(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
const Tensor< 1, dim > dir