16 #ifndef dealii_block_indices_h
17 #define dealii_block_indices_h
111 reinit(
const std::vector<size_type> &block_sizes);
168 std::pair<unsigned int, size_type>
241 const unsigned int n = bi.size();
245 s << bi.block_size(0);
247 for (
unsigned int i = 1; i < n; ++i)
248 s <<
' ' << bi.block_size(i);
249 s <<
"]->" << bi.total_size();
273 n_blocks =
static_cast<unsigned int>(block_sizes.size());
301 :
n_blocks(static_cast<unsigned int>(block_sizes.size()))
302 , start_indices(block_sizes.size() + 1)
311 , start_indices(std::move(
b.start_indices))
314 b.start_indices = std::vector<size_type>(1, 0);
328 inline std::pair<unsigned int, BlockIndices::size_type>
335 const auto it = std::prev(
384 for (
unsigned int i = 0; i <
n_blocks; ++i)
418 start_indices = std::move(
b.start_indices);
421 b.start_indices = std::vector<size_type>(1, 0);
void swap(BlockIndices &u, BlockIndices &v)
std::string to_string() const
types::global_dof_index size_type
BlockIndices(const BlockIndices &)=default
size_type block_size(const unsigned int i) const
void push_back(const size_type size)
BlockIndices & operator=(const BlockIndices &b)
size_type total_size() const
void reinit(const unsigned int n_blocks, const size_type n_elements_per_block)
std::vector< size_type > start_indices
bool operator==(const BlockIndices &b) const
unsigned int size() const
size_type local_to_global(const unsigned int block, const size_type index) const
void swap(BlockIndices &u, BlockIndices &v)
size_type block_start(const unsigned int i) const
void swap(BlockIndices &b)
std::size_t memory_consumption() const
std::pair< unsigned int, size_type > global_to_local(const size_type i) const
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define Assert(cond, exc)
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)
std::enable_if_t< IsBlockVector< VectorType >::value, unsigned int > n_blocks(const VectorType &vector)
SymmetricTensor< 2, dim, Number > b(const Tensor< 2, dim, Number > &F)
unsigned int global_dof_index