17 #ifndef dealii_matrix_free_task_info_h 18 #define dealii_matrix_free_task_info_h 21 #include <deal.II/base/exceptions.h> 22 #include <deal.II/base/memory_consumption.h> 23 #include <deal.II/base/index_set.h> 24 #include <deal.II/base/utilities.h> 25 #include <deal.II/base/tensor.h> 26 #include <deal.II/base/thread_management.h> 27 #include <deal.II/base/vectorization.h> 28 #include <deal.II/lac/dynamic_sparsity_pattern.h> 31 DEAL_II_NAMESPACE_OPEN
66 virtual void cell(
const std::pair<unsigned int,unsigned int> &cell_range) = 0;
70 virtual void face(
const std::pair<unsigned int,unsigned int> &face_range) = 0;
74 virtual void boundary(
const std::pair<unsigned int,unsigned int> &face_range) = 0;
79 namespace MatrixFreeFunctions
82 template <
typename Number>
struct ConstraintValues;
97 enum TasksParallelScheme {none,
124 const unsigned int n_active_and_ghost_cells,
126 std::vector<unsigned int> &boundary_cells);
166 const std::vector<unsigned int> &cells_close_to_boundary,
167 const unsigned int dofs_per_cell,
168 const std::vector<unsigned int> &cell_vectorization_categories,
169 const bool cell_vectorization_categories_strict,
170 std::vector<unsigned int> &renumbering,
171 std::vector<unsigned char> &incompletely_filled_vectorization);
192 std::vector<unsigned int> &renumbering,
193 std::vector<unsigned char> &incompletely_filled_vectorization);
236 std::vector<unsigned int> &renumbering,
237 std::vector<unsigned char> &irregular_cells,
275 std::vector<unsigned int> &renumbering,
276 std::vector<unsigned char> &irregular_cells,
305 std::vector<unsigned int> &renumbering,
306 std::vector<unsigned char> &irregular_cells,
314 (
const std::vector<unsigned char> &irregular_cells,
324 const unsigned int partition,
325 const std::vector<unsigned int> &cell_partition,
326 const std::vector<unsigned int> &partition_list,
327 const std::vector<unsigned int> &partition_size,
328 std::vector<unsigned int> &partition_color_list);
336 const std::vector<unsigned int> &cell_active_fe_index,
337 const unsigned int partition,
338 const unsigned int cluster_size,
340 const std::vector<unsigned int> &cell_partition,
341 const std::vector<unsigned int> &partition_list,
342 const std::vector<unsigned int> &partition_size,
343 std::vector<unsigned int> &partition_partition_list,
344 std::vector<unsigned char> &irregular_cells);
367 const unsigned int cluster_size,
368 std::vector<unsigned int> &cell_partition,
369 std::vector<unsigned int> &partition_list,
370 std::vector<unsigned int> &partition_size,
371 unsigned int &partition)
const;
394 template <
typename StreamType>
396 std::size_t data_length)
const;
563 DEAL_II_NAMESPACE_CLOSE
std::vector< unsigned int > ghost_face_partition_data
virtual void cell(const std::pair< unsigned int, unsigned int > &cell_range)=0
TasksParallelScheme scheme
void loop(MFWorkerInterface &worker) const
void guess_block_size(const unsigned int dofs_per_cell)
std::vector< unsigned int > partition_row_index
std::vector< unsigned int > partition_n_workers
virtual void vector_update_ghosts_finish()=0
Finishes the communication for the update ghost values operation.
std::vector< unsigned int > cell_partition_data
void make_connectivity_cells_to_blocks(const std::vector< unsigned char > &irregular_cells, const DynamicSparsityPattern &connectivity_cells, DynamicSparsityPattern &connectivity_blocks) const
std::vector< unsigned int > partition_n_blocked_workers
void make_partitioning_within_partitions_post_blocked(const DynamicSparsityPattern &connectivity, const std::vector< unsigned int > &cell_active_fe_index, const unsigned int partition, const unsigned int cluster_size, const bool hp_bool, const std::vector< unsigned int > &cell_partition, const std::vector< unsigned int > &partition_list, const std::vector< unsigned int > &partition_size, std::vector< unsigned int > &partition_partition_list, std::vector< unsigned char > &irregular_cells)
std::vector< unsigned int > refinement_edge_face_partition_data
void make_coloring_within_partitions_pre_blocked(const DynamicSparsityPattern &connectivity, const unsigned int partition, const std::vector< unsigned int > &cell_partition, const std::vector< unsigned int > &partition_list, const std::vector< unsigned int > &partition_size, std::vector< unsigned int > &partition_color_list)
unsigned int vectorization_length
unsigned int n_blocked_workers
void make_thread_graph_partition_color(DynamicSparsityPattern &connectivity, std::vector< unsigned int > &renumbering, std::vector< unsigned char > &irregular_cells, const bool hp_bool)
void update_task_info(const unsigned int partition)
std::vector< unsigned int > boundary_partition_data
void initial_setup_blocks_tasks(const std::vector< unsigned int > &boundary_cells, std::vector< unsigned int > &renumbering, std::vector< unsigned char > &incompletely_filled_vectorization)
unsigned int n_ghost_cells
virtual void zero_dst_vector_range(const unsigned int range_index)=0
virtual void boundary(const std::pair< unsigned int, unsigned int > &face_range)=0
void create_blocks_serial(const std::vector< unsigned int > &boundary_cells, const std::vector< unsigned int > &cells_close_to_boundary, const unsigned int dofs_per_cell, const std::vector< unsigned int > &cell_vectorization_categories, const bool cell_vectorization_categories_strict, std::vector< unsigned int > &renumbering, std::vector< unsigned char > &incompletely_filled_vectorization)
std::vector< unsigned char > task_at_mpi_boundary
unsigned int n_active_cells
virtual void vector_update_ghosts_start()=0
Starts the communication for the update ghost values operation.
virtual void face(const std::pair< unsigned int, unsigned int > &face_range)=0
std::vector< unsigned int > face_partition_data
void collect_boundary_cells(const unsigned int n_active_cells, const unsigned int n_active_and_ghost_cells, const unsigned int vectorization_length, std::vector< unsigned int > &boundary_cells)
void make_thread_graph_partition_partition(const std::vector< unsigned int > &cell_active_fe_index, DynamicSparsityPattern &connectivity, std::vector< unsigned int > &renumbering, std::vector< unsigned char > &irregular_cells, const bool hp_bool)
void make_partitioning(const DynamicSparsityPattern &connectivity, const unsigned int cluster_size, std::vector< unsigned int > &cell_partition, std::vector< unsigned int > &partition_list, std::vector< unsigned int > &partition_size, unsigned int &partition) const
virtual void vector_compress_start()=0
Starts the communication for the vector compress operation.
std::vector< unsigned int > partition_odds
std::size_t memory_consumption() const
std::vector< unsigned int > partition_evens
void print_memory_statistics(StreamType &out, std::size_t data_length) const
void make_thread_graph(const std::vector< unsigned int > &cell_active_fe_index, DynamicSparsityPattern &connectivity, std::vector< unsigned int > &renumbering, std::vector< unsigned char > &irregular_cells, const bool hp_bool)
virtual void vector_compress_finish()=0
Finishes the communication for the vector compress operation.