16#ifndef dealii_meshworker_copy_data_h
17#define dealii_meshworker_copy_data_h
48 template <
int n_matrices = 1,
49 int n_vectors = n_matrices,
50 int n_dof_indices = n_matrices>
64 const std::array<unsigned int, n_vectors> & vector_sizes,
65 const std::array<unsigned int, n_dof_indices> &dof_indices_sizes);
76 std::array<FullMatrix<double>, n_matrices>
matrices;
81 std::array<Vector<double>, n_vectors>
vectors;
86 std::array<std::vector<types::global_dof_index>, n_dof_indices>
95 template <
int n_matrices,
int n_vectors,
int n_dof_indices>
97 const unsigned int size)
99 for (
auto &m : matrices)
100 m.reinit({size, size});
101 for (
auto &v : vectors)
103 for (
auto &
d : local_dof_indices)
109 template <
int n_matrices,
int n_vectors,
int n_dof_indices>
112 const std::array<unsigned int, n_vectors> & vector_sizes,
113 const std::array<unsigned int, n_dof_indices> &dof_indices_sizes)
115 for (
unsigned int i = 0; i < n_matrices; ++i)
116 matrices[i].
reinit(matrix_sizes[i++]);
118 for (
unsigned int i = 0; i < n_vectors; ++i)
119 vectors[i].
reinit(vector_sizes[i++]);
121 for (
unsigned int i = 0; i < n_dof_indices; ++i)
122 local_dof_indices[i].resize(dof_indices_sizes[i++]);
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
void reinit(MatrixBlock< MatrixType > &v, const BlockSparsityPattern &p)
typename internal::ndarray::HelperArray< T, Ns... >::type ndarray
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)
std::array< Vector< double >, n_vectors > vectors
CopyData(const CopyData< n_matrices, n_vectors, n_dof_indices > &other)=default
std::array< FullMatrix< double >, n_matrices > matrices
std::array< std::vector< types::global_dof_index >, n_dof_indices > local_dof_indices
CopyData(const unsigned int size)