Reference documentation for deal.II version GIT relicensing-31-gf283a0fc39 2024-02-29 06:50:02+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType > Class Template Reference

#include <deal.II/matrix_free/constraint_info.h>

Inheritance diagram for internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >:
Inheritance graph
[legend]

Public Member Functions

 ConstraintInfo ()
 
void set_locally_owned_indices (const IndexSet &locally_owned_indices)
 
void reinit (const DoFHandler< dim > &dof_handler, const unsigned int n_cells, const bool use_fast_hanging_node_algorithm=true)
 
void read_dof_indices (const unsigned int cell_no, const unsigned int mg_level, const TriaIterator< DoFCellAccessor< dim, dim, false > > &cell, const ::AffineConstraints< typename Number::value_type > &constraints, const std::shared_ptr< const Utilities::MPI::Partitioner > &partitioner)
 
void reinit (const unsigned int n_cells)
 
void read_dof_indices (const unsigned int cell_no, const std::vector< types::global_dof_index > &dof_indices, const std::shared_ptr< const Utilities::MPI::Partitioner > &partitioner)
 
void finalize ()
 
std::shared_ptr< const Utilities::MPI::Partitionerfinalize (const MPI_Comm comm)
 
template<typename T , typename VectorType >
void read_write_operation (const T &operation, VectorType &global_vector, Number *local_vector, const unsigned int first_cell, const unsigned int n_cells, const unsigned int n_dofs_per_cell, const bool apply_constraints) const
 
void apply_hanging_node_constraints (const unsigned int first_cell, const unsigned int n_lanes_filled, const bool transpose, AlignedVector< Number > &evaluation_data_coarse) const
 
std::size_t memory_consumption () const
 

Public Attributes

std::vector< unsigned intdof_indices
 
std::vector< std::pair< unsigned short, unsigned short > > constraint_indicator
 
std::vector< std::pair< unsigned int, unsigned int > > row_starts
 
std::vector< unsigned intplain_dof_indices
 
std::vector< unsigned introw_starts_plain_indices
 
std::vector< typename Number::value_type > constraint_pool_data
 
std::vector< unsigned intconstraint_pool_row_index
 
std::vector< ShapeInfo< Number > > shape_infos
 
std::vector< compressed_constraint_kindhanging_node_constraint_masks
 
std::vector< unsigned intactive_fe_indices
 

Private Member Functions

const Number::value_type * constraint_pool_begin (const unsigned int row) const
 
const Number::value_type * constraint_pool_end (const unsigned int row) const
 

Private Attributes

ConstraintValues< double > constraint_values
 
std::vector< std::vector< unsigned int > > dof_indices_per_cell
 
std::vector< std::vector< unsigned int > > plain_dof_indices_per_cell
 
std::vector< std::vector< std::pair< unsigned short, unsigned short > > > constraint_indicator_per_cell
 
std::unique_ptr< HangingNodes< dim > > hanging_nodes
 
std::vector< std::vector< unsigned int > > lexicographic_numbering
 
std::vector< types::global_dof_indexlocal_dof_indices
 
std::vector< types::global_dof_indexlocal_dof_indices_lex
 
std::vector< ConstraintKindsmask
 
IndexSet locally_owned_indices
 
std::pair< types::global_dof_index, types::global_dof_indexlocal_range
 

Detailed Description

template<int dim, typename Number, typename IndexType = unsigned int>
class internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >

A helper class to apply constraints in matrix-free loops in user code. It combines constraint related functionalities from MatrixFree and FEEvaluation.

Definition at line 84 of file constraint_info.h.

Constructor & Destructor Documentation

◆ ConstraintInfo()

template<int dim, typename Number , typename IndexType >
internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::ConstraintInfo ( )

Constructor.

Definition at line 273 of file constraint_info.h.

Member Function Documentation

◆ set_locally_owned_indices()

template<int dim, typename Number , typename IndexType >
void internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::set_locally_owned_indices ( const IndexSet locally_owned_indices)

Set locally owned indices to accelerate the conversion of global to local indices.

Definition at line 281 of file constraint_info.h.

◆ reinit() [1/2]

template<int dim, typename Number , typename IndexType >
void internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::reinit ( const DoFHandler< dim > &  dof_handler,
const unsigned int  n_cells,
const bool  use_fast_hanging_node_algorithm = true 
)
inline

Version 1: indices are extracted from DoFCellAccessor and constraints are resolved with the help of AffineConstraints.

Definition at line 298 of file constraint_info.h.

◆ read_dof_indices() [1/2]

template<int dim, typename Number , typename IndexType >
void internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::read_dof_indices ( const unsigned int  cell_no,
const unsigned int  mg_level,
const TriaIterator< DoFCellAccessor< dim, dim, false > > &  cell,
const ::AffineConstraints< typename Number::value_type > &  constraints,
const std::shared_ptr< const Utilities::MPI::Partitioner > &  partitioner 
)
inline

Definition at line 359 of file constraint_info.h.

◆ reinit() [2/2]

template<int dim, typename Number , typename IndexType >
void internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::reinit ( const unsigned int  n_cells)
inline

Version 2: no constraints, indices are user-provided.

Definition at line 348 of file constraint_info.h.

◆ read_dof_indices() [2/2]

template<int dim, typename Number , typename IndexType >
void internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::read_dof_indices ( const unsigned int  cell_no,
const std::vector< types::global_dof_index > &  dof_indices,
const std::shared_ptr< const Utilities::MPI::Partitioner > &  partitioner 
)
inline

Definition at line 491 of file constraint_info.h.

◆ finalize() [1/2]

template<int dim, typename Number , typename IndexType >
void internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::finalize ( )
inline

Definition at line 548 of file constraint_info.h.

◆ finalize() [2/2]

template<int dim, typename Number , typename IndexType >
std::shared_ptr< const Utilities::MPI::Partitioner > internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::finalize ( const MPI_Comm  comm)
inline

Definition at line 635 of file constraint_info.h.

◆ read_write_operation()

template<int dim, typename Number , typename IndexType >
template<typename T , typename VectorType >
void internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::read_write_operation ( const T &  operation,
VectorType &  global_vector,
Number *  local_vector,
const unsigned int  first_cell,
const unsigned int  n_cells,
const unsigned int  n_dofs_per_cell,
const bool  apply_constraints 
) const
inline

Definition at line 769 of file constraint_info.h.

◆ apply_hanging_node_constraints()

template<int dim, typename Number , typename IndexType >
void internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::apply_hanging_node_constraints ( const unsigned int  first_cell,
const unsigned int  n_lanes_filled,
const bool  transpose,
AlignedVector< Number > &  evaluation_data_coarse 
) const
inline

Definition at line 853 of file constraint_info.h.

◆ memory_consumption()

template<int dim, typename Number , typename IndexType >
std::size_t internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::memory_consumption ( ) const
inline

Return the memory consumption of the allocated memory in this class.

Definition at line 931 of file constraint_info.h.

◆ constraint_pool_begin()

template<int dim, typename Number , typename IndexType >
const Number::value_type * internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::constraint_pool_begin ( const unsigned int  row) const
inlineprivate

Definition at line 905 of file constraint_info.h.

◆ constraint_pool_end()

template<int dim, typename Number , typename IndexType >
const Number::value_type * internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::constraint_pool_end ( const unsigned int  row) const
inlineprivate

Definition at line 918 of file constraint_info.h.

Member Data Documentation

◆ constraint_values

template<int dim, typename Number , typename IndexType = unsigned int>
ConstraintValues<double> internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::constraint_values
private

Definition at line 160 of file constraint_info.h.

◆ dof_indices_per_cell

template<int dim, typename Number , typename IndexType = unsigned int>
std::vector<std::vector<unsigned int> > internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::dof_indices_per_cell
private

Definition at line 161 of file constraint_info.h.

◆ plain_dof_indices_per_cell

template<int dim, typename Number , typename IndexType = unsigned int>
std::vector<std::vector<unsigned int> > internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::plain_dof_indices_per_cell
private

Definition at line 162 of file constraint_info.h.

◆ constraint_indicator_per_cell

template<int dim, typename Number , typename IndexType = unsigned int>
std::vector<std::vector<std::pair<unsigned short, unsigned short> > > internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::constraint_indicator_per_cell
private

Definition at line 164 of file constraint_info.h.

◆ hanging_nodes

template<int dim, typename Number , typename IndexType = unsigned int>
std::unique_ptr<HangingNodes<dim> > internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::hanging_nodes
private

Definition at line 166 of file constraint_info.h.

◆ lexicographic_numbering

template<int dim, typename Number , typename IndexType = unsigned int>
std::vector<std::vector<unsigned int> > internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::lexicographic_numbering
private

Definition at line 167 of file constraint_info.h.

◆ local_dof_indices

template<int dim, typename Number , typename IndexType = unsigned int>
std::vector<types::global_dof_index> internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::local_dof_indices
private

Definition at line 169 of file constraint_info.h.

◆ local_dof_indices_lex

template<int dim, typename Number , typename IndexType = unsigned int>
std::vector<types::global_dof_index> internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::local_dof_indices_lex
private

Definition at line 170 of file constraint_info.h.

◆ mask

template<int dim, typename Number , typename IndexType = unsigned int>
std::vector<ConstraintKinds> internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::mask
private

Definition at line 171 of file constraint_info.h.

◆ locally_owned_indices

template<int dim, typename Number , typename IndexType = unsigned int>
IndexSet internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::locally_owned_indices
private

Definition at line 173 of file constraint_info.h.

◆ local_range

template<int dim, typename Number , typename IndexType = unsigned int>
std::pair<types::global_dof_index, types::global_dof_index> internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::local_range
private

Definition at line 174 of file constraint_info.h.

◆ dof_indices

template<int dim, typename Number , typename IndexType = unsigned int>
std::vector<unsigned int> internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::dof_indices

Definition at line 178 of file constraint_info.h.

◆ constraint_indicator

template<int dim, typename Number , typename IndexType = unsigned int>
std::vector<std::pair<unsigned short, unsigned short> > internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::constraint_indicator

Definition at line 180 of file constraint_info.h.

◆ row_starts

template<int dim, typename Number , typename IndexType = unsigned int>
std::vector<std::pair<unsigned int, unsigned int> > internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::row_starts

Definition at line 181 of file constraint_info.h.

◆ plain_dof_indices

template<int dim, typename Number , typename IndexType = unsigned int>
std::vector<unsigned int> internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::plain_dof_indices

Definition at line 183 of file constraint_info.h.

◆ row_starts_plain_indices

template<int dim, typename Number , typename IndexType = unsigned int>
std::vector<unsigned int> internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::row_starts_plain_indices

Definition at line 184 of file constraint_info.h.

◆ constraint_pool_data

template<int dim, typename Number , typename IndexType = unsigned int>
std::vector<typename Number::value_type> internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::constraint_pool_data

Definition at line 187 of file constraint_info.h.

◆ constraint_pool_row_index

template<int dim, typename Number , typename IndexType = unsigned int>
std::vector<unsigned int> internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::constraint_pool_row_index

Definition at line 188 of file constraint_info.h.

◆ shape_infos

template<int dim, typename Number , typename IndexType = unsigned int>
std::vector<ShapeInfo<Number> > internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::shape_infos

Definition at line 190 of file constraint_info.h.

◆ hanging_node_constraint_masks

template<int dim, typename Number , typename IndexType = unsigned int>
std::vector<compressed_constraint_kind> internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::hanging_node_constraint_masks

Definition at line 191 of file constraint_info.h.

◆ active_fe_indices

template<int dim, typename Number , typename IndexType = unsigned int>
std::vector<unsigned int> internal::MatrixFreeFunctions::ConstraintInfo< dim, Number, IndexType >::active_fe_indices

Definition at line 192 of file constraint_info.h.


The documentation for this class was generated from the following file: