Reference documentation for deal.II version 9.1.1
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
Public Member Functions | Public Attributes | List of all members
MeshWorker::CopyData< n_matrices, n_vectors, n_dof_indices > Struct Template Reference

#include <deal.II/meshworker/copy_data.h>

Public Member Functions

 CopyData (const unsigned int size)
 
 CopyData (const std::array< std::array< unsigned int, 2 >, n_matrices > &matrix_sizes, const std::array< unsigned int, n_vectors > &vector_sizes, const std::array< unsigned int, n_dof_indices > &dof_indices_sizes)
 
 CopyData (const CopyData< n_matrices, n_vectors, n_dof_indices > &other)=default
 
void operator= (const double &number)
 

Public Attributes

std::array< FullMatrix< double >, n_matrices > matrices
 
std::array< Vector< double >, n_vectors > vectors
 
std::array< std::vector< types::global_dof_index >, n_dof_indices > local_dof_indices
 

Detailed Description

template<int n_matrices = 1, int n_vectors = n_matrices, int n_dof_indices = n_matrices>
struct MeshWorker::CopyData< n_matrices, n_vectors, n_dof_indices >

Helper copy data struct.

This class is a good default drop in CopyData object for the WorkStream::run() and MeshWorker::mesh_loop() functions.

It arrays of (local) full matrices, vectors, and local degrees of freedom index vectors, with size determined by the corresponding template argument.

In particular, you can specify the following template arguments

Definition at line 52 of file copy_data.h.

Constructor & Destructor Documentation

◆ CopyData() [1/3]

template<int n_matrices = 1, int n_vectors = n_matrices, int n_dof_indices = n_matrices>
MeshWorker::CopyData< n_matrices, n_vectors, n_dof_indices >::CopyData ( const unsigned int  size)

Initialize everything with the same size. This is usually the number of local degrees of freedom.

◆ CopyData() [2/3]

template<int n_matrices = 1, int n_vectors = n_matrices, int n_dof_indices = n_matrices>
MeshWorker::CopyData< n_matrices, n_vectors, n_dof_indices >::CopyData ( const std::array< std::array< unsigned int, 2 >, n_matrices > &  matrix_sizes,
const std::array< unsigned int, n_vectors > &  vector_sizes,
const std::array< unsigned int, n_dof_indices > &  dof_indices_sizes 
)

For every object, specify the size they should have.

◆ CopyData() [3/3]

template<int n_matrices = 1, int n_vectors = n_matrices, int n_dof_indices = n_matrices>
MeshWorker::CopyData< n_matrices, n_vectors, n_dof_indices >::CopyData ( const CopyData< n_matrices, n_vectors, n_dof_indices > &  other)
default

Deep copy constructor.

Member Function Documentation

◆ operator=()

template<int n_matrices = 1, int n_vectors = n_matrices, int n_dof_indices = n_matrices>
void MeshWorker::CopyData< n_matrices, n_vectors, n_dof_indices >::operator= ( const double &  number)

Allow resetting of all elements of the struct to zero, by simply calling (*this) = 0;

Notice that the only allowed number here is really 0. Calling this function with any other number will trigger an assertion.

The elements of the arrays of local degrees of freedom indices are all set to numbers::invalid_dof_index.

Member Data Documentation

◆ matrices

template<int n_matrices = 1, int n_vectors = n_matrices, int n_dof_indices = n_matrices>
std::array<FullMatrix<double>, n_matrices> MeshWorker::CopyData< n_matrices, n_vectors, n_dof_indices >::matrices

An array of local matrices.

Definition at line 90 of file copy_data.h.

◆ vectors

template<int n_matrices = 1, int n_vectors = n_matrices, int n_dof_indices = n_matrices>
std::array<Vector<double>, n_vectors> MeshWorker::CopyData< n_matrices, n_vectors, n_dof_indices >::vectors

An array of local vectors.

Definition at line 95 of file copy_data.h.

◆ local_dof_indices

template<int n_matrices = 1, int n_vectors = n_matrices, int n_dof_indices = n_matrices>
std::array<std::vector<types::global_dof_index>, n_dof_indices> MeshWorker::CopyData< n_matrices, n_vectors, n_dof_indices >::local_dof_indices

An array of local degrees of freedom indices.

Definition at line 101 of file copy_data.h.


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