16 #ifndef dealii_block_indices_h 17 #define dealii_block_indices_h 20 #include <deal.II/base/config.h> 21 #include <deal.II/base/subscriptor.h> 22 #include <deal.II/base/exceptions.h> 23 #include <deal.II/base/logstream.h> 24 #include <deal.II/base/utilities.h> 28 DEAL_II_NAMESPACE_OPEN
76 BlockIndices (
const std::vector<size_type> &block_sizes);
108 void reinit (
const std::vector<size_type> &block_sizes);
123 unsigned int size ()
const;
160 std::pair<unsigned int,size_type>
230 const unsigned int n = bi.size();
234 s << bi.block_size(0);
236 for (
unsigned int i=1; i<n; ++i)
237 s <<
' ' << bi.block_size(i);
238 s <<
"]->" << bi.total_size();
265 n_blocks =
static_cast<unsigned int>(block_sizes.size());
288 start_indices(n_blocks+1)
299 n_blocks(static_cast<unsigned int>(block_sizes.size())),
300 start_indices(block_sizes.size()+1)
310 n_blocks(b.n_blocks),
311 start_indices(std::move(b.start_indices))
314 b.start_indices = std::vector<size_type>(1, 0);
330 std::pair<unsigned int,BlockIndices::size_type>
340 return std::pair<unsigned int,size_type>(block,
392 for (
unsigned int i=0; i<
n_blocks; ++i)
429 start_indices = std::move(b.start_indices);
430 n_blocks = b.n_blocks;
432 b.start_indices = std::vector<size_type>(1, 0);
470 return (
sizeof(*
this) +
496 DEAL_II_NAMESPACE_CLOSE
#define AssertDimension(dim1, dim2)
size_type block_size(const unsigned int i) const
static ::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
std::string to_string(const number value, const unsigned int digits=numbers::invalid_unsigned_int)
size_type total_size() const
void swap(BlockIndices &u, BlockIndices &v)
bool operator==(const BlockIndices &b) const
unsigned int global_dof_index
#define Assert(cond, exc)
void reinit(const unsigned int n_blocks, const size_type n_elements_per_block)
types::global_dof_index size_type
std::string to_string() const
size_type local_to_global(const unsigned int block, const size_type index) const
std::string int_to_string(const unsigned int value, const unsigned int digits=numbers::invalid_unsigned_int)
std::vector< size_type > start_indices
void swap(Vector< Number > &u, Vector< Number > &v)
BlockIndices & operator=(const BlockIndices &b)
std::size_t memory_consumption() const
size_type block_start(const unsigned int i) const
void push_back(const size_type size)
void swap(BlockIndices &b)
unsigned int size() const
std::pair< unsigned int, size_type > global_to_local(const size_type i) const