|
| 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) |
|
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
- Template Parameters
-
n_matrices | Size of the array of matrices |
- Template Parameters
-
n_vectors | size of the array of vectors |
- Template Parameters
-
n_dof_indices | size of the array of local dof indices |
- Template Parameters
-
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.
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.
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.