Reference documentation for deal.II version 9.5.0
\(\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 | List of all members
MeshWorker::CopyData< n_matrices, n_vectors, n_dof_indices, ScalarType > Struct Template Reference

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

Public Member Functions

 CopyData ()=default
 
 CopyData (const unsigned int size)
 
 CopyData (const ndarray< unsigned int, n_matrices, 2 > &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 &other)=default
 
CopyDataoperator= (const CopyData &other)=default
 
void reinit (const unsigned int size)
 
void reinit (const unsigned int index, const unsigned int size)
 
void reinit (const unsigned int index, const unsigned int size_rows, const unsigned int size_columns)
 

Public Attributes

std::array< FullMatrix< ScalarType >, n_matrices > matrices
 
std::array< Vector< ScalarType >, 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, typename ScalarType = double>
struct MeshWorker::CopyData< n_matrices, n_vectors, n_dof_indices, ScalarType >

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 54 of file copy_data.h.

Constructor & Destructor Documentation

◆ CopyData() [1/4]

template<int n_matrices = 1, int n_vectors = n_matrices, int n_dof_indices = n_matrices, typename ScalarType = double>
MeshWorker::CopyData< n_matrices, n_vectors, n_dof_indices, ScalarType >::CopyData ( )
explicitdefault

Default constructor. All of the matrices, vectors and local_dof_indices are empty, and should be initialized using one of the reinit() functions.

◆ CopyData() [2/4]

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

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

◆ CopyData() [3/4]

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

For every object, specify the size they should have.

◆ CopyData() [4/4]

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

Copy constructor.

Member Function Documentation

◆ operator=()

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

Copy operator.

◆ reinit() [1/3]

template<int n_matrices = 1, int n_vectors = n_matrices, int n_dof_indices = n_matrices, typename ScalarType = double>
void MeshWorker::CopyData< n_matrices, n_vectors, n_dof_indices, ScalarType >::reinit ( const unsigned int  size)

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

◆ reinit() [2/3]

template<int n_matrices = 1, int n_vectors = n_matrices, int n_dof_indices = n_matrices, typename ScalarType = double>
void MeshWorker::CopyData< n_matrices, n_vectors, n_dof_indices, ScalarType >::reinit ( const unsigned int  index,
const unsigned int  size 
)

Reinitialize the index'th matrix, vector and local DoF index vector with the same size. This is usually the number of local degrees of freedom.

Note
In the event that there are a different number of matrices, vectors and local_dof_indices, this function will not throw an error when the index is over the size of one or two of these data structures. However, if the index exceeds the size of all three of them then an error will be thrown.

◆ reinit() [3/3]

template<int n_matrices = 1, int n_vectors = n_matrices, int n_dof_indices = n_matrices, typename ScalarType = double>
void MeshWorker::CopyData< n_matrices, n_vectors, n_dof_indices, ScalarType >::reinit ( const unsigned int  index,
const unsigned int  size_rows,
const unsigned int  size_columns 
)

Reinitialize the index'th matrix with size_rows x size_columns, and the vector and local DoF index vector with size_columns. These sizes usually correspond to some local degrees of freedom (e.g., the number of cell DoFs for size_rows and number of neighbor cell DoFs for size_columns).

Note
In the event that there are a different number of matrices, vectors and local_dof_indices, this function will not throw an error when the index is over the size of one or two of these data structures. However, if the index exceeds the size of all three of them then an error will be thrown.

Member Data Documentation

◆ matrices

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

An array of local matrices.

Definition at line 130 of file copy_data.h.

◆ vectors

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

An array of local vectors.

Definition at line 135 of file copy_data.h.

◆ local_dof_indices

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

An array of local degrees of freedom indices.

Definition at line 141 of file copy_data.h.


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