16 #ifndef dealii_meshworker_copy_data_h
17 #define dealii_meshworker_copy_data_h
49 template <
int n_matrices = 1,
50 int n_vectors = n_matrices,
51 int n_dof_indices = n_matrices>
58 explicit CopyData(
const unsigned int size);
64 const std::array<std::array<unsigned int, 2>, n_matrices> &matrix_sizes,
65 const std::array<unsigned int, n_vectors> & vector_sizes,
66 const std::array<unsigned int, n_dof_indices> &dof_indices_sizes);
77 std::array<FullMatrix<double>, n_matrices>
matrices;
82 std::array<Vector<double>, n_vectors>
vectors;
87 std::array<std::vector<types::global_dof_index>, n_dof_indices>
96 template <
int n_matrices,
int n_vectors,
int n_dof_indices>
98 const unsigned int size)
100 for (
auto &m : matrices)
101 m.reinit({size, size});
102 for (
auto &v : vectors)
104 for (
auto &
d : local_dof_indices)
110 template <
int n_matrices,
int n_vectors,
int n_dof_indices>
112 const std::array<std::array<unsigned int, 2>, n_matrices> &matrix_sizes,
113 const std::array<unsigned int, n_vectors> & vector_sizes,
114 const std::array<unsigned int, n_dof_indices> &dof_indices_sizes)
116 for (
unsigned int i = 0; i < n_matrices; ++i)
117 matrices[i].
reinit(matrix_sizes[i++]);
119 for (
unsigned int i = 0; i < n_vectors; ++i)
120 vectors[i].
reinit(vector_sizes[i++]);
122 for (
unsigned int i = 0; i < n_dof_indices; ++i)
123 local_dof_indices[i].resize(dof_indices_sizes[i++]);