Reference documentation for deal.II version GIT 7b2de2f2f9 2023-09-24 11:00: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\}}\)
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
MatrixFreeOperators::MassOperator< dim, fe_degree, n_q_points_1d, n_components, VectorType, VectorizedArrayType > Class Template Referenceabstract

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

Inheritance diagram for MatrixFreeOperators::MassOperator< dim, fe_degree, n_q_points_1d, n_components, VectorType, VectorizedArrayType >:
[legend]

Public Types

using value_type = typename Base< dim, VectorType, VectorizedArrayType >::value_type
 
using size_type = typename Base< dim, VectorType, VectorizedArrayType >::size_type
 

Public Member Functions

 MassOperator ()
 
virtual void compute_diagonal () override
 
void compute_lumped_diagonal ()
 
const std::shared_ptr< DiagonalMatrix< VectorType > > & get_matrix_lumped_diagonal () const
 
const std::shared_ptr< DiagonalMatrix< VectorType > > & get_matrix_lumped_diagonal_inverse () const
 
virtual void clear ()
 
void initialize (std::shared_ptr< const MatrixFree< dim, value_type, VectorizedArray< typename VectorType::value_type > >> data, const std::vector< unsigned int > &selected_row_blocks=std::vector< unsigned int >(), const std::vector< unsigned int > &selected_column_blocks=std::vector< unsigned int >())
 
void initialize (std::shared_ptr< const MatrixFree< dim, value_type, VectorizedArray< typename VectorType::value_type > >> data, const MGConstrainedDoFs &mg_constrained_dofs, const unsigned int level, const std::vector< unsigned int > &selected_row_blocks=std::vector< unsigned int >())
 
void initialize (std::shared_ptr< const MatrixFree< dim, value_type, VectorizedArray< typename VectorType::value_type > >> data_, const std::vector< MGConstrainedDoFs > &mg_constrained_dofs, const unsigned int level, const std::vector< unsigned int > &selected_row_blocks=std::vector< unsigned int >())
 
size_type m () const
 
size_type n () const
 
void vmult_interface_down (LinearAlgebra::distributed::Vector< double > &dst, const LinearAlgebra::distributed::Vector< double > &src) const
 
void vmult_interface_up (LinearAlgebra::distributed::Vector< double > &dst, const LinearAlgebra::distributed::Vector< double > &src) const
 
void vmult (LinearAlgebra::distributed::Vector< double > &dst, const LinearAlgebra::distributed::Vector< double > &src) const
 
void Tvmult (LinearAlgebra::distributed::Vector< double > &dst, const LinearAlgebra::distributed::Vector< double > &src) const
 
void vmult_add (LinearAlgebra::distributed::Vector< double > &dst, const LinearAlgebra::distributed::Vector< double > &src) const
 
void Tvmult_add (LinearAlgebra::distributed::Vector< double > &dst, const LinearAlgebra::distributed::Vector< double > &src) const
 
value_type el (const unsigned int row, const unsigned int col) const
 
virtual std::size_t memory_consumption () const
 
void initialize_dof_vector (LinearAlgebra::distributed::Vector< double > &vec) const
 
std::shared_ptr< const MatrixFree< dim, value_type, VectorizedArray< typename VectorType::value_type > > > get_matrix_free () const
 
const std::shared_ptr< DiagonalMatrix< LinearAlgebra::distributed::Vector< double > > > & get_matrix_diagonal_inverse () const
 
const std::shared_ptr< DiagonalMatrix< LinearAlgebra::distributed::Vector< double > > > & get_matrix_diagonal () const
 
void precondition_Jacobi (LinearAlgebra::distributed::Vector< double > &dst, const LinearAlgebra::distributed::Vector< double > &src, const value_type omega) const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 
Subscriptor functionality

Classes derived from Subscriptor provide a facility to subscribe to this object. This is mostly used by the SmartPointer class.

void subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
void unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
unsigned int n_subscriptions () const
 
template<typename StreamType >
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 

Static Public Member Functions

static ::ExceptionBaseExcInUse (int arg1, std::string arg2, std::string arg3)
 
static ::ExceptionBaseExcNoSubscriber (std::string arg1, std::string arg2)
 

Protected Member Functions

void preprocess_constraints (LinearAlgebra::distributed::Vector< double > &dst, const LinearAlgebra::distributed::Vector< double > &src) const
 
void postprocess_constraints (LinearAlgebra::distributed::Vector< double > &dst, const LinearAlgebra::distributed::Vector< double > &src) const
 
void set_constrained_entries_to_one (LinearAlgebra::distributed::Vector< double > &dst) const
 
virtual void apply_add (LinearAlgebra::distributed::Vector< double > &dst, const LinearAlgebra::distributed::Vector< double > &src) const=0
 
virtual void Tapply_add (LinearAlgebra::distributed::Vector< double > &dst, const LinearAlgebra::distributed::Vector< double > &src) const
 

Protected Attributes

std::shared_ptr< const MatrixFree< dim, value_type, VectorizedArray< typename VectorType::value_type > > > data
 
std::shared_ptr< DiagonalMatrix< LinearAlgebra::distributed::Vector< double > > > diagonal_entries
 
std::shared_ptr< DiagonalMatrix< LinearAlgebra::distributed::Vector< double > > > inverse_diagonal_entries
 
std::vector< unsigned int > selected_rows
 
std::vector< unsigned int > selected_columns
 

Private Types

using map_value_type = decltype(counter_map)::value_type
 
using map_iterator = decltype(counter_map)::iterator
 

Private Member Functions

virtual void apply_add (VectorType &dst, const VectorType &src) const override
 
void local_apply_cell (const MatrixFree< dim, value_type, VectorizedArrayType > &data, VectorType &dst, const VectorType &src, const std::pair< unsigned int, unsigned int > &cell_range) const
 
void mult_add (LinearAlgebra::distributed::Vector< double > &dst, const LinearAlgebra::distributed::Vector< double > &src, const bool transpose) const
 
void adjust_ghost_range_if_necessary (const LinearAlgebra::distributed::Vector< double > &vec, const bool is_row) const
 
void check_no_subscribers () const noexcept
 

Private Attributes

std::shared_ptr< DiagonalMatrix< VectorType > > lumped_diagonal_entries
 
std::shared_ptr< DiagonalMatrix< VectorType > > inverse_lumped_diagonal_entries
 
std::vector< std::vector< unsigned int > > edge_constrained_indices
 
std::vector< std::vector< std::pair< value_type, value_type > > > edge_constrained_values
 
bool have_interface_matrices
 
std::atomic< unsigned int > counter
 
std::map< std::string, unsigned int > counter_map
 
std::vector< std::atomic< bool > * > validity_pointers
 
const std::type_info * object_info
 

Static Private Attributes

static std::mutex mutex
 

Detailed Description

template<int dim, int fe_degree, int n_q_points_1d = fe_degree + 1, int n_components = 1, typename VectorType = LinearAlgebra::distributed::Vector<double>, typename VectorizedArrayType = VectorizedArray<typename VectorType::value_type>>
class MatrixFreeOperators::MassOperator< dim, fe_degree, n_q_points_1d, n_components, VectorType, VectorizedArrayType >

This class implements the operation of the action of a mass matrix.

Note
This class only supports the non-blocked vector variant of the Base operator because only a single FEEvaluation object is used in the apply function.

Definition at line 762 of file operators.h.

Member Typedef Documentation

◆ value_type

template<int dim, int fe_degree, int n_q_points_1d = fe_degree + 1, int n_components = 1, typename VectorType = LinearAlgebra::distributed::Vector<double>, typename VectorizedArrayType = VectorizedArray<typename VectorType::value_type>>
using MatrixFreeOperators::MassOperator< dim, fe_degree, n_q_points_1d, n_components, VectorType, VectorizedArrayType >::value_type = typename Base<dim, VectorType, VectorizedArrayType>::value_type

Number alias.

Definition at line 768 of file operators.h.

◆ size_type

template<int dim, int fe_degree, int n_q_points_1d = fe_degree + 1, int n_components = 1, typename VectorType = LinearAlgebra::distributed::Vector<double>, typename VectorizedArrayType = VectorizedArray<typename VectorType::value_type>>
using MatrixFreeOperators::MassOperator< dim, fe_degree, n_q_points_1d, n_components, VectorType, VectorizedArrayType >::size_type = typename Base<dim, VectorType, VectorizedArrayType>::size_type

size_type needed for preconditioner classes.

Definition at line 774 of file operators.h.

◆ map_value_type

using Subscriptor::map_value_type = decltype(counter_map)::value_type
privateinherited

The data type used in counter_map.

Definition at line 230 of file subscriptor.h.

◆ map_iterator

using Subscriptor::map_iterator = decltype(counter_map)::iterator
privateinherited

The iterator type used in counter_map.

Definition at line 235 of file subscriptor.h.

Constructor & Destructor Documentation

◆ MassOperator()

template<int dim, int fe_degree, int n_q_points_1d, int n_components, typename VectorType , typename VectorizedArrayType >
MatrixFreeOperators::MassOperator< dim, fe_degree, n_q_points_1d, n_components, VectorType, VectorizedArrayType >::MassOperator

Constructor.

Definition at line 1899 of file operators.h.

Member Function Documentation

◆ compute_diagonal()

template<int dim, int fe_degree, int n_q_points_1d, int n_components, typename VectorType , typename VectorizedArrayType >
void MatrixFreeOperators::MassOperator< dim, fe_degree, n_q_points_1d, n_components, VectorType, VectorizedArrayType >::compute_diagonal
overridevirtual

◆ compute_lumped_diagonal()

template<int dim, int fe_degree, int n_q_points_1d, int n_components, typename VectorType , typename VectorizedArrayType >
void MatrixFreeOperators::MassOperator< dim, fe_degree, n_q_points_1d, n_components, VectorType, VectorizedArrayType >::compute_lumped_diagonal

Compute the lumped mass matrix. This is equal to the mass matrix times a vector of all ones and is equivalent to approximating the mass matrix with a nodal quadrature rule.

The lumped mass matrix is an excellent preconditioner for mass matrices corresponding to FE_Q elements on axis-aligned cells. However, some elements (like FE_SimplexP with degrees higher than 1) have basis functions whose integrals are zero or negative (and therefore their lumped mass matrix entries are zero or negative). For such elements a lumped mass matrix is a very poor approximation of the operator - the diagonal should be used instead. If you are interested in using mass lumping with simplices then use FE_SimplexP_Bubbles instead of FE_SimplexP.

Definition at line 2006 of file operators.h.

◆ get_matrix_lumped_diagonal()

template<int dim, int fe_degree, int n_q_points_1d, int n_components, typename VectorType , typename VectorizedArrayType >
const std::shared_ptr< DiagonalMatrix< VectorType > > & MatrixFreeOperators::MassOperator< dim, fe_degree, n_q_points_1d, n_components, VectorType, VectorizedArrayType >::get_matrix_lumped_diagonal

Get read access to the lumped diagonal of this operator.

Definition at line 2085 of file operators.h.

◆ get_matrix_lumped_diagonal_inverse()

template<int dim, int fe_degree, int n_q_points_1d, int n_components, typename VectorType , typename VectorizedArrayType >
const std::shared_ptr< DiagonalMatrix< VectorType > > & MatrixFreeOperators::MassOperator< dim, fe_degree, n_q_points_1d, n_components, VectorType, VectorizedArrayType >::get_matrix_lumped_diagonal_inverse

Get read access to the inverse lumped diagonal of this operator.

Definition at line 2063 of file operators.h.

◆ apply_add() [1/2]

template<int dim, int fe_degree, int n_q_points_1d, int n_components, typename VectorType , typename VectorizedArrayType >
void MatrixFreeOperators::MassOperator< dim, fe_degree, n_q_points_1d, n_components, VectorType, VectorizedArrayType >::apply_add ( VectorType &  dst,
const VectorType &  src 
) const
overrideprivatevirtual

Applies the mass matrix operation on an input vector. It is assumed that the passed input and output vector are correctly initialized using initialize_dof_vector().

Definition at line 2107 of file operators.h.

◆ local_apply_cell()

template<int dim, int fe_degree, int n_q_points_1d = fe_degree + 1, int n_components = 1, typename VectorType = LinearAlgebra::distributed::Vector<double>, typename VectorizedArrayType = VectorizedArray<typename VectorType::value_type>>
void MatrixFreeOperators::MassOperator< dim, fe_degree, n_q_points_1d, n_components, VectorType, VectorizedArrayType >::local_apply_cell ( const MatrixFree< dim, value_type, VectorizedArrayType > &  data,
VectorType &  dst,
const VectorType &  src,
const std::pair< unsigned int, unsigned int > &  cell_range 
) const
private

For this operator, there is just a cell contribution.

Definition at line 2128 of file operators.h.

◆ clear()

void MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::clear
virtualinherited

Release all memory and return to a state just like after having called the default constructor.

Reimplemented in MatrixFreeOperators::LaplaceOperator< dim, fe_degree, n_q_points_1d, n_components, VectorType, VectorizedArrayType >.

Definition at line 216 of file operators.h.

◆ initialize() [1/3]

void MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::initialize ( std::shared_ptr< const MatrixFree< dim, value_type, VectorizedArray< typename VectorType::value_type > >>  data,
const std::vector< unsigned int > &  selected_row_blocks = std::vector<unsigned int>(),
const std::vector< unsigned int > &  selected_column_blocks = std::vector<unsigned int>() 
)
inherited

Initialize operator on fine scale.

The optional selection vector allows to choose only some components from the underlying MatrixFree object, e.g. just a single one. The entry selected_row_blocks[i] in the vector chooses the DoFHandler and AffineConstraints object that was given as the selected_row_blocks[i]-th argument to the MatrixFree::reinit() call. Different arguments for rows and columns also make it possible to select non-diagonal blocks or rectangular blocks. If the row vector is empty, all components are selected, otherwise its size must be smaller or equal to MatrixFree::n_components() and all indices need to be unique and within the range of 0 and MatrixFree::n_components(). If the column selection vector is empty, it is taken the same as the row selection, defining a diagonal block.

Definition at line 235 of file operators.h.

◆ initialize() [2/3]

void MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::initialize ( std::shared_ptr< const MatrixFree< dim, value_type, VectorizedArray< typename VectorType::value_type > >>  data,
const MGConstrainedDoFs mg_constrained_dofs,
const unsigned int  level,
const std::vector< unsigned int > &  selected_row_blocks = std::vector<unsigned int>() 
)
inherited

Initialize operator on a level level for a single FiniteElement.

The optional selection vector allows to choose only some components from the underlying MatrixFree object, e.g. just a single one. The entry selected_row_blocks[i] in the vector chooses the DoFHandler and AffineConstraints object that was given as the selected_row_blocks[i]-th argument to the MatrixFree::reinit() call. Since a multigrid operator is always associated to inverting a matrix and thus represents a diagonal block, the same vector for rows and columns is used as opposed to the non-level initialization function. If empty, all components are selected.

Definition at line 256 of file operators.h.

◆ initialize() [3/3]

void MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::initialize ( std::shared_ptr< const MatrixFree< dim, value_type, VectorizedArray< typename VectorType::value_type > >>  data_,
const std::vector< MGConstrainedDoFs > &  mg_constrained_dofs,
const unsigned int  level,
const std::vector< unsigned int > &  selected_row_blocks = std::vector<unsigned int>() 
)
inherited

Initialize operator on a level level for multiple FiniteElement objects.

The optional selection vector allows to choose only some components from the underlying MatrixFree object, e.g. just a single one. The entry selected_row_blocks[i] in the vector chooses the DoFHandler and AffineConstraints object that was given as the selected_row_blocks[i]-th argument to the MatrixFree::reinit() call. Since a multigrid operator is always associated to inverting a matrix and thus represents a diagonal block, the same vector for rows and columns is used as opposed to the non-level initialization function. If empty, all components are selected.

Definition at line 278 of file operators.h.

◆ m()

Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::size_type MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::m
inherited

Return the dimension of the codomain (or range) space.

Definition at line 289 of file operators.h.

◆ n()

Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::size_type MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::n
inherited

Return the dimension of the domain space.

Definition at line 295 of file operators.h.

◆ vmult_interface_down()

void MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::vmult_interface_down ( LinearAlgebra::distributed::Vector< double > &  dst,
const LinearAlgebra::distributed::Vector< double > &  src 
) const
inherited

vmult operator for interface.

Definition at line 301 of file operators.h.

◆ vmult_interface_up()

void MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::vmult_interface_up ( LinearAlgebra::distributed::Vector< double > &  dst,
const LinearAlgebra::distributed::Vector< double > &  src 
) const
inherited

vmult operator for interface.

Definition at line 307 of file operators.h.

◆ vmult()

void MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::vmult ( LinearAlgebra::distributed::Vector< double > &  dst,
const LinearAlgebra::distributed::Vector< double > &  src 
) const
inherited

Matrix-vector multiplication.

Definition at line 313 of file operators.h.

◆ Tvmult()

void MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::Tvmult ( LinearAlgebra::distributed::Vector< double > &  dst,
const LinearAlgebra::distributed::Vector< double > &  src 
) const
inherited

Transpose matrix-vector multiplication.

Definition at line 319 of file operators.h.

◆ vmult_add()

void MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::vmult_add ( LinearAlgebra::distributed::Vector< double > &  dst,
const LinearAlgebra::distributed::Vector< double > &  src 
) const
inherited

Adding Matrix-vector multiplication.

Definition at line 325 of file operators.h.

◆ Tvmult_add()

void MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::Tvmult_add ( LinearAlgebra::distributed::Vector< double > &  dst,
const LinearAlgebra::distributed::Vector< double > &  src 
) const
inherited

Adding transpose matrix-vector multiplication.

Definition at line 331 of file operators.h.

◆ el()

Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::value_type MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::el ( const unsigned int  row,
const unsigned int  col 
) const
inherited

Return the value of the matrix entry (row,col). In matrix-free context this function is valid only for row==col when diagonal is initialized.

Definition at line 338 of file operators.h.

◆ memory_consumption()

std::size_t MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::memory_consumption
virtualinherited

Determine an estimate for the memory consumption (in bytes) of this object.

Definition at line 345 of file operators.h.

◆ initialize_dof_vector()

void MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::initialize_dof_vector ( LinearAlgebra::distributed::Vector< double > &  vec) const
inherited

A wrapper for initialize_dof_vector() of MatrixFree object.

Definition at line 351 of file operators.h.

◆ get_matrix_free()

std::shared_ptr< const MatrixFree< dim, typename Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::value_type, VectorizedArray< typename VectorType::value_type > > > MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::get_matrix_free
inherited

Get read access to the MatrixFree object stored with this operator.

Definition at line 372 of file operators.h.

◆ get_matrix_diagonal_inverse()

const std::shared_ptr< DiagonalMatrix< LinearAlgebra::distributed::Vector< double > > > & MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::get_matrix_diagonal_inverse
inherited

Get read access to the inverse diagonal of this operator.

Definition at line 378 of file operators.h.

◆ get_matrix_diagonal()

const std::shared_ptr< DiagonalMatrix< LinearAlgebra::distributed::Vector< double > > > & MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::get_matrix_diagonal
inherited

Get read access to the diagonal of this operator.

Definition at line 384 of file operators.h.

◆ precondition_Jacobi()

void MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::precondition_Jacobi ( LinearAlgebra::distributed::Vector< double > &  dst,
const LinearAlgebra::distributed::Vector< double > &  src,
const value_type  omega 
) const
inherited

Apply the Jacobi preconditioner, which multiplies every element of the src vector by the inverse of the respective diagonal element and multiplies the result with the relaxation factor omega.

Definition at line 392 of file operators.h.

◆ preprocess_constraints()

void MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::preprocess_constraints ( LinearAlgebra::distributed::Vector< double > &  dst,
const LinearAlgebra::distributed::Vector< double > &  src 
) const
protectedinherited

Perform necessary operations related to constraints before calling apply_add() or Tapply_add() inside mult_add().

Definition at line 402 of file operators.h.

◆ postprocess_constraints()

void MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::postprocess_constraints ( LinearAlgebra::distributed::Vector< double > &  dst,
const LinearAlgebra::distributed::Vector< double > &  src 
) const
protectedinherited

Perform necessary operations related to constraints after calling apply_add() or Tapply_add() inside mult_add().

Definition at line 409 of file operators.h.

◆ set_constrained_entries_to_one()

void MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::set_constrained_entries_to_one ( LinearAlgebra::distributed::Vector< double > &  dst) const
protectedinherited

Set constrained entries (both from hanging nodes and edge constraints) of dst to one.

Definition at line 416 of file operators.h.

◆ apply_add() [2/2]

virtual void MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::apply_add ( LinearAlgebra::distributed::Vector< double > &  dst,
const LinearAlgebra::distributed::Vector< double > &  src 
) const
protectedpure virtualinherited

Apply operator to src and add result in dst.

◆ Tapply_add()

void MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::Tapply_add ( LinearAlgebra::distributed::Vector< double > &  dst,
const LinearAlgebra::distributed::Vector< double > &  src 
) const
protectedvirtualinherited

Apply transpose operator to src and add result in dst.

Default implementation is to call apply_add().

Definition at line 430 of file operators.h.

◆ mult_add()

void MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::mult_add ( LinearAlgebra::distributed::Vector< double > &  dst,
const LinearAlgebra::distributed::Vector< double > &  src,
const bool  transpose 
) const
privateinherited

Function which implements vmult_add (transpose = false) and Tvmult_add (transpose = true).

Definition at line 485 of file operators.h.

◆ adjust_ghost_range_if_necessary()

void MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::adjust_ghost_range_if_necessary ( const LinearAlgebra::distributed::Vector< double > &  vec,
const bool  is_row 
) const
privateinherited

Adjust the ghost range of the vectors to the storage requirements of the underlying MatrixFree class. This is used inside the mult_add() as well as vmult_interface_up() and vmult_interface_down() methods in order to ensure that the cell loops will be able to access the ghost indices with the correct local indices.

Definition at line 497 of file operators.h.

◆ subscribe()

void Subscriptor::subscribe ( std::atomic< bool > *const  validity,
const std::string &  identifier = "" 
) const
inherited

Subscribes a user of the object by storing the pointer validity. The subscriber may be identified by text supplied as identifier.

Definition at line 136 of file subscriptor.cc.

◆ unsubscribe()

void Subscriptor::unsubscribe ( std::atomic< bool > *const  validity,
const std::string &  identifier = "" 
) const
inherited

Unsubscribes a user from the object.

Note
The identifier and the validity pointer must be the same as the one supplied to subscribe().

Definition at line 156 of file subscriptor.cc.

◆ n_subscriptions()

unsigned int Subscriptor::n_subscriptions ( ) const
inlineinherited

Return the present number of subscriptions to this object. This allows to use this class for reference counted lifetime determination where the last one to unsubscribe also deletes the object.

Definition at line 300 of file subscriptor.h.

◆ list_subscribers() [1/2]

template<typename StreamType >
void Subscriptor::list_subscribers ( StreamType &  stream) const
inlineinherited

List the subscribers to the input stream.

Definition at line 317 of file subscriptor.h.

◆ list_subscribers() [2/2]

void Subscriptor::list_subscribers ( ) const
inherited

List the subscribers to deallog.

Definition at line 204 of file subscriptor.cc.

◆ serialize()

template<class Archive >
void Subscriptor::serialize ( Archive &  ar,
const unsigned int  version 
)
inlineinherited

Read or write the data of this object to or from a stream for the purpose of serialization using the BOOST serialization library.

This function does not actually serialize any of the member variables of this class. The reason is that what this class stores is only who subscribes to this object, but who does so at the time of storing the contents of this object does not necessarily have anything to do with who subscribes to the object when it is restored. Consequently, we do not want to overwrite the subscribers at the time of restoring, and then there is no reason to write the subscribers out in the first place.

Definition at line 309 of file subscriptor.h.

◆ check_no_subscribers()

void Subscriptor::check_no_subscribers ( ) const
privatenoexceptinherited

Check that there are no objects subscribing to this object. If this check passes then it is safe to destroy the current object. It this check fails then this function will either abort or print an error message to deallog (by using the AssertNothrow mechanism), but will not throw an exception.

Note
Since this function is just a consistency check it does nothing in release mode.
If this function is called when there is an uncaught exception then, rather than aborting, this function prints an error message to the standard error stream and returns.

Definition at line 53 of file subscriptor.cc.

Member Data Documentation

◆ lumped_diagonal_entries

template<int dim, int fe_degree, int n_q_points_1d = fe_degree + 1, int n_components = 1, typename VectorType = LinearAlgebra::distributed::Vector<double>, typename VectorizedArrayType = VectorizedArray<typename VectorType::value_type>>
std::shared_ptr<DiagonalMatrix<VectorType> > MatrixFreeOperators::MassOperator< dim, fe_degree, n_q_points_1d, n_components, VectorType, VectorizedArrayType >::lumped_diagonal_entries
private

A shared pointer to a diagonal matrix that stores the lumped diagonal elements as a vector.

Definition at line 842 of file operators.h.

◆ inverse_lumped_diagonal_entries

template<int dim, int fe_degree, int n_q_points_1d = fe_degree + 1, int n_components = 1, typename VectorType = LinearAlgebra::distributed::Vector<double>, typename VectorizedArrayType = VectorizedArray<typename VectorType::value_type>>
std::shared_ptr<DiagonalMatrix<VectorType> > MatrixFreeOperators::MassOperator< dim, fe_degree, n_q_points_1d, n_components, VectorType, VectorizedArrayType >::inverse_lumped_diagonal_entries
private

A shared pointer to a diagonal matrix that stores the inverse of lumped diagonal elements as a vector.

Definition at line 848 of file operators.h.

◆ data

std::shared_ptr<const MatrixFree<dim, value_type, VectorizedArray< typename VectorType::value_type > > > MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::data
protectedinherited

MatrixFree object to be used with this operator.

Definition at line 436 of file operators.h.

◆ diagonal_entries

std::shared_ptr<DiagonalMatrix<LinearAlgebra::distributed::Vector< double > > > MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::diagonal_entries
protectedinherited

A shared pointer to a diagonal matrix that stores the diagonal elements as a vector.

Definition at line 442 of file operators.h.

◆ inverse_diagonal_entries

std::shared_ptr<DiagonalMatrix<LinearAlgebra::distributed::Vector< double > > > MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::inverse_diagonal_entries
protectedinherited

A shared pointer to a diagonal matrix that stores the inverse of diagonal elements as a vector.

Definition at line 448 of file operators.h.

◆ selected_rows

std::vector<unsigned int> MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::selected_rows
protectedinherited

A vector which defines the selection of sub-components of MatrixFree for the rows of the matrix representation.

Definition at line 454 of file operators.h.

◆ selected_columns

std::vector<unsigned int> MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::selected_columns
protectedinherited

A vector which defines the selection of sub-components of MatrixFree for the columns of the matrix representation.

Definition at line 460 of file operators.h.

◆ edge_constrained_indices

std::vector<std::vector<unsigned int> > MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::edge_constrained_indices
privateinherited

Indices of DoFs on edge in case the operator is used in GMG context.

Definition at line 466 of file operators.h.

◆ edge_constrained_values

std::vector<std::vector<std::pair<value_type, value_type> > > MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::edge_constrained_values
mutableprivateinherited

Auxiliary vector.

Definition at line 472 of file operators.h.

◆ have_interface_matrices

bool MatrixFreeOperators::Base< dim, LinearAlgebra::distributed::Vector< double > , VectorizedArray< typename VectorType::value_type > >::have_interface_matrices
privateinherited

A flag which determines whether or not this operator has interface matrices in GMG context.

Definition at line 478 of file operators.h.

◆ counter

std::atomic<unsigned int> Subscriptor::counter
mutableprivateinherited

Store the number of objects which subscribed to this object. Initially, this number is zero, and upon destruction it shall be zero again (i.e. all objects which subscribed should have unsubscribed again).

The creator (and owner) of an object is counted in the map below if HE manages to supply identification.

We use the mutable keyword in order to allow subscription to constant objects also.

This counter may be read from and written to concurrently in multithreaded code: hence we use the std::atomic class template.

Definition at line 219 of file subscriptor.h.

◆ counter_map

std::map<std::string, unsigned int> Subscriptor::counter_map
mutableprivateinherited

In this map, we count subscriptions for each different identification string supplied to subscribe().

Definition at line 225 of file subscriptor.h.

◆ validity_pointers

std::vector<std::atomic<bool> *> Subscriptor::validity_pointers
mutableprivateinherited

In this vector, we store pointers to the validity bool in the SmartPointer objects that subscribe to this class.

Definition at line 241 of file subscriptor.h.

◆ object_info

const std::type_info* Subscriptor::object_info
mutableprivateinherited

Pointer to the typeinfo object of this object, from which we can later deduce the class name. Since this information on the derived class is neither available in the destructor, nor in the constructor, we obtain it in between and store it here.

Definition at line 249 of file subscriptor.h.

◆ mutex

std::mutex Subscriptor::mutex
staticprivateinherited

A mutex used to ensure data consistency when printing out the list of subscribers.

Definition at line 271 of file subscriptor.h.


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