Reference documentation for deal.II version 9.5.0
|
#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 | |
CopyData & | operator= (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 |
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
n_matrices | Size of the array of matrices |
n_vectors | size of the array of vectors |
n_dof_indices | size of the array of local dof indices |
ScalarType | The data type stored by the vectors and matrices. This must be a real or complex floating point number. |
Definition at line 54 of file copy_data.h.
|
explicitdefault |
Default constructor. All of the matrices
, vectors
and local_dof_indices
are empty, and should be initialized using one of the reinit() functions.
|
explicit |
Initialize everything with the same size
. This is usually the number of local degrees of freedom.
|
explicit |
For every object, specify the size they should have.
|
default |
Copy constructor.
|
default |
Copy operator.
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.
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.
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. 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
).
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. 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.
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.
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.