17 #ifndef __deal2__block_vector_base_h 18 #define __deal2__block_vector_base_h 21 #include <deal.II/base/config.h> 23 #include <deal.II/base/subscriptor.h> 24 #include <deal.II/base/memory_consumption.h> 25 #include <deal.II/lac/exceptions.h> 26 #include <deal.II/lac/block_indices.h> 27 #include <deal.II/lac/vector.h> 59 template <
typename VectorType>
103 template <
typename VectorType>
117 namespace BlockVectorIterators
126 template <
class BlockVectorType,
bool constness>
143 template <
class BlockVectorType>
153 typedef typename BlockVectorType::BlockType
Vector;
191 template <
class BlockVectorType>
202 typedef const typename BlockVectorType::BlockType
Vector;
292 template <
class BlockVectorType,
bool constness>
294 public std::iterator<std::random_access_iterator_tag,
295 typename Types<BlockVectorType,constness>::value_type>
334 typedef std::ptrdiff_t difference_type;
335 typedef typename BlockVectorType::reference reference;
368 const size_type global_index);
385 Iterator (
const InverseConstnessIterator &c);
396 const size_type global_index,
397 const size_type current_block,
398 const size_type index_within_block,
399 const size_type next_break_forward,
400 const size_type next_break_backward);
417 dereference_type operator * ()
const;
425 dereference_type operator [] (
const difference_type d)
const;
471 bool operator == (
const Iterator &i)
const;
478 bool operator == (
const InverseConstnessIterator &i)
const;
488 bool operator != (
const Iterator &i)
const;
495 bool operator != (
const InverseConstnessIterator &i)
const;
508 bool operator < (
const Iterator &i)
const;
515 bool operator < (
const InverseConstnessIterator &i)
const;
521 bool operator <= (
const Iterator &i)
const;
528 bool operator <= (
const InverseConstnessIterator &i)
const;
534 bool operator > (
const Iterator &i)
const;
541 bool operator > (
const InverseConstnessIterator &i)
const;
547 bool operator >= (
const Iterator &i)
const;
554 bool operator >= (
const InverseConstnessIterator &i)
const;
561 difference_type operator - (
const Iterator &i)
const;
567 difference_type operator - (
const InverseConstnessIterator &i)
const;
574 Iterator operator + (
const difference_type &d)
const;
581 Iterator operator - (
const difference_type &d)
const;
588 Iterator &operator += (
const difference_type &d);
595 Iterator &operator -= (
const difference_type &d);
636 size_type index_within_block;
651 size_type next_break_backward;
656 void move_forward ();
661 void move_backward ();
673 template <
typename N,
bool C>
720 template <
class VectorType>
740 typedef typename BlockType::value_type value_type;
741 typedef value_type *pointer;
742 typedef const value_type *const_pointer;
743 typedef ::internal::BlockVectorIterators::Iterator<BlockVectorBase,false>
iterator;
744 typedef ::internal::BlockVectorIterators::Iterator<BlockVectorBase,true>
const_iterator;
745 typedef typename BlockType::reference reference;
746 typedef typename BlockType::const_reference const_reference;
781 static const bool supports_distributed_data = BlockType::supports_distributed_data;
799 void collect_sizes ();
814 void compress (::VectorOperation::values operation);
825 block (const
unsigned int i);
831 block (const
unsigned int i) const;
844 get_block_indices () const;
849 unsigned int n_blocks () const;
856 std::
size_t size () const;
876 IndexSet locally_owned_elements () const;
889 const_iterator begin () const;
902 const_iterator end () const;
907 value_type operator() (const size_type i) const;
913 reference operator() (const size_type i);
920 value_type operator[] (const size_type i) const;
928 reference operator[] (const size_type i);
940 template <typename OtherNumber>
941 void extract_subvector_to (const
std::vector<size_type> &indices,
942 std::vector<OtherNumber> &values) const;
948 template <typename ForwardIterator, typename OutputIterator>
949 void extract_subvector_to (ForwardIterator indices_begin,
950 const ForwardIterator indices_end,
951 OutputIterator values_begin) const;
971 template <class VectorType2>
980 operator = (const VectorType &v);
988 template <class VectorType2>
1000 real_type norm_sqr () const;
1006 value_type mean_value () const;
1012 real_type l1_norm () const;
1019 real_type l2_norm () const;
1026 real_type linfty_norm () const;
1033 bool in_local_range (const size_type global_index) const;
1043 bool all_zero () const;
1053 bool is_non_negative () const;
1078 template <typename Number>
1079 void add (const
std::vector<size_type> &indices,
1080 const
std::vector<Number> &values);
1089 template <typename Number>
1090 void add (const
std::vector<size_type> &indices,
1091 const
Vector<Number> &values);
1102 template <typename Number>
1103 void add (const size_type n_elements,
1104 const size_type *indices,
1105 const Number *values);
1113 void add (const value_type s);
1145 void sadd (const value_type s, const value_type a, const
BlockVectorBase &V);
1151 void sadd (const value_type s, const value_type a,
1159 void sadd (const value_type s, const value_type a,
1183 template <class BlockVector2>
1184 void scale (const BlockVector2 &v);
1189 template <class BlockVector2>
1190 void equ (const value_type a, const BlockVector2 &V);
1214 void update_ghost_values () const;
1221 std::
size_t memory_consumption () const;
1227 std::vector<VectorType> components;
1241 template <typename N,
bool C>
1242 friend class ::
internal::BlockVectorIterators::Iterator;
1256 namespace BlockVectorIterators
1259 template <
class BlockVectorType,
bool constness>
1261 Iterator<BlockVectorType,constness>::
1262 Iterator (
const Iterator<BlockVectorType,constness> &c)
1265 global_index (c.global_index),
1266 current_block (c.current_block),
1267 index_within_block (c.index_within_block),
1268 next_break_forward (c.next_break_forward),
1269 next_break_backward (c.next_break_backward)
1274 template <
class BlockVectorType,
bool constness>
1276 Iterator<BlockVectorType,constness>::
1277 Iterator (
const InverseConstnessIterator &c)
1279 parent (const_cast<BlockVectorType *>(c.parent)),
1280 global_index (c.global_index),
1281 current_block (c.current_block),
1282 index_within_block (c.index_within_block),
1283 next_break_forward (c.next_break_forward),
1284 next_break_backward (c.next_break_backward)
1291 Assert (constness==
true, ExcCastingAwayConstness());
1296 template <
class BlockVectorType,
bool constness>
1298 Iterator<BlockVectorType,constness>::
1300 const size_type global_index,
1301 const size_type current_block,
1302 const size_type index_within_block,
1303 const size_type next_break_forward,
1304 const size_type next_break_backward)
1307 global_index (global_index),
1308 current_block (current_block),
1309 index_within_block (index_within_block),
1310 next_break_forward (next_break_forward),
1311 next_break_backward (next_break_backward)
1317 template <
class BlockVectorType,
bool constness>
1319 Iterator<BlockVectorType,constness> &
1320 Iterator<BlockVectorType,constness>::
1321 operator = (
const Iterator &c)
1324 global_index = c.global_index;
1325 index_within_block = c.index_within_block;
1326 current_block = c.current_block;
1327 next_break_forward = c.next_break_forward;
1328 next_break_backward = c.next_break_backward;
1335 template <
class BlockVectorType,
bool constness>
1337 typename Iterator<BlockVectorType,constness>::dereference_type
1338 Iterator<BlockVectorType,constness>::operator * ()
const 1340 return parent->
block(current_block)(index_within_block);
1345 template <
class BlockVectorType,
bool constness>
1347 typename Iterator<BlockVectorType,constness>::dereference_type
1348 Iterator<BlockVectorType,constness>::operator [] (
const difference_type d)
const 1355 if ((global_index+d >= next_break_backward) &&
1356 (global_index+d <= next_break_forward))
1357 return parent->
block(current_block)(index_within_block + d);
1366 return (*parent)(global_index+d);
1371 template <
class BlockVectorType,
bool constness>
1373 Iterator<BlockVectorType,constness> &
1374 Iterator<BlockVectorType,constness>::operator ++ ()
1382 template <
class BlockVectorType,
bool constness>
1384 Iterator<BlockVectorType,constness>
1385 Iterator<BlockVectorType,constness>::operator ++ (
int)
1387 const Iterator old_value = *
this;
1394 template <
class BlockVectorType,
bool constness>
1396 Iterator<BlockVectorType,constness> &
1397 Iterator<BlockVectorType,constness>::operator -- ()
1405 template <
class BlockVectorType,
bool constness>
1407 Iterator<BlockVectorType,constness>
1408 Iterator<BlockVectorType,constness>::operator -- (
int)
1410 const Iterator old_value = *
this;
1417 template <
class BlockVectorType,
bool constness>
1420 Iterator<BlockVectorType,constness>::
1421 operator == (
const Iterator &i)
const 1423 Assert (parent == i.parent, ExcPointerToDifferentVectors());
1425 return (global_index == i.global_index);
1430 template <
class BlockVectorType,
bool constness>
1433 Iterator<BlockVectorType,constness>::
1434 operator == (
const InverseConstnessIterator &i)
const 1436 Assert (parent == i.parent, ExcPointerToDifferentVectors());
1438 return (global_index == i.global_index);
1443 template <
class BlockVectorType,
bool constness>
1446 Iterator<BlockVectorType,constness>::
1447 operator != (
const Iterator &i)
const 1449 Assert (parent == i.parent, ExcPointerToDifferentVectors());
1451 return (global_index != i.global_index);
1456 template <
class BlockVectorType,
bool constness>
1459 Iterator<BlockVectorType,constness>::
1460 operator != (
const InverseConstnessIterator &i)
const 1462 Assert (parent == i.parent, ExcPointerToDifferentVectors());
1464 return (global_index != i.global_index);
1469 template <
class BlockVectorType,
bool constness>
1472 Iterator<BlockVectorType,constness>::
1473 operator < (
const Iterator &i)
const 1475 Assert (parent == i.parent, ExcPointerToDifferentVectors());
1477 return (global_index < i.global_index);
1482 template <
class BlockVectorType,
bool constness>
1485 Iterator<BlockVectorType,constness>::
1486 operator < (
const InverseConstnessIterator &i)
const 1488 Assert (parent == i.parent, ExcPointerToDifferentVectors());
1490 return (global_index < i.global_index);
1495 template <
class BlockVectorType,
bool constness>
1498 Iterator<BlockVectorType,constness>::
1499 operator <= (
const Iterator &i)
const 1501 Assert (parent == i.parent, ExcPointerToDifferentVectors());
1503 return (global_index <= i.global_index);
1508 template <
class BlockVectorType,
bool constness>
1511 Iterator<BlockVectorType,constness>::
1512 operator <= (
const InverseConstnessIterator &i)
const 1514 Assert (parent == i.parent, ExcPointerToDifferentVectors());
1516 return (global_index <= i.global_index);
1521 template <
class BlockVectorType,
bool constness>
1524 Iterator<BlockVectorType,constness>::
1525 operator > (
const Iterator &i)
const 1527 Assert (parent == i.parent, ExcPointerToDifferentVectors());
1529 return (global_index > i.global_index);
1534 template <
class BlockVectorType,
bool constness>
1537 Iterator<BlockVectorType,constness>::
1538 operator > (
const InverseConstnessIterator &i)
const 1540 Assert (parent == i.parent, ExcPointerToDifferentVectors());
1542 return (global_index > i.global_index);
1547 template <
class BlockVectorType,
bool constness>
1550 Iterator<BlockVectorType,constness>::
1551 operator >= (
const Iterator &i)
const 1553 Assert (parent == i.parent, ExcPointerToDifferentVectors());
1555 return (global_index >= i.global_index);
1560 template <
class BlockVectorType,
bool constness>
1563 Iterator<BlockVectorType,constness>::
1564 operator >= (
const InverseConstnessIterator &i)
const 1566 Assert (parent == i.parent, ExcPointerToDifferentVectors());
1568 return (global_index >= i.global_index);
1573 template <
class BlockVectorType,
bool constness>
1575 typename Iterator<BlockVectorType,constness>::difference_type
1576 Iterator<BlockVectorType,constness>::
1577 operator - (
const Iterator &i)
const 1579 Assert (parent == i.parent, ExcPointerToDifferentVectors());
1581 return (static_cast<signed int>(global_index) -
1582 static_cast<signed int>(i.global_index));
1587 template <
class BlockVectorType,
bool constness>
1589 typename Iterator<BlockVectorType,constness>::difference_type
1590 Iterator<BlockVectorType,constness>::
1591 operator - (
const InverseConstnessIterator &i)
const 1593 Assert (parent == i.parent, ExcPointerToDifferentVectors());
1595 return (static_cast<signed int>(global_index) -
1596 static_cast<signed int>(i.global_index));
1601 template <
class BlockVectorType,
bool constness>
1603 Iterator<BlockVectorType,constness>
1604 Iterator<BlockVectorType,constness>::
1605 operator + (
const difference_type &d)
const 1612 if ((global_index+d >= next_break_backward) &&
1613 (global_index+d <= next_break_forward))
1614 return Iterator (*parent, global_index+d, current_block,
1615 index_within_block+d,
1616 next_break_forward, next_break_backward);
1621 return Iterator (*parent, global_index+d);
1626 template <
class BlockVectorType,
bool constness>
1628 Iterator<BlockVectorType,constness>
1629 Iterator<BlockVectorType,constness>::
1630 operator - (
const difference_type &d)
const 1637 if ((global_index-d >= next_break_backward) &&
1638 (global_index-d <= next_break_forward))
1639 return Iterator (*parent, global_index-d, current_block,
1640 index_within_block-d,
1641 next_break_forward, next_break_backward);
1646 return Iterator (*parent, global_index-d);
1651 template <
class BlockVectorType,
bool constness>
1653 Iterator<BlockVectorType,constness> &
1654 Iterator<BlockVectorType,constness>::
1655 operator += (
const difference_type &d)
1662 if ((global_index+d >= next_break_backward) &&
1663 (global_index+d <= next_break_forward))
1666 index_within_block += d;
1672 *
this = Iterator (*parent, global_index+d);
1679 template <
class BlockVectorType,
bool constness>
1681 Iterator<BlockVectorType,constness> &
1682 Iterator<BlockVectorType,constness>::
1683 operator -= (
const difference_type &d)
1690 if ((global_index-d >= next_break_backward) &&
1691 (global_index-d <= next_break_forward))
1694 index_within_block -= d;
1700 *
this = Iterator (*parent, global_index-d);
1706 template <
class BlockVectorType,
bool constness>
1707 Iterator<BlockVectorType,constness>::
1709 const size_type global_index)
1712 global_index (global_index)
1720 if (global_index < parent.
size())
1722 const std::pair<size_type, size_type>
1724 current_block = indices.first;
1725 index_within_block = indices.second;
1737 this->global_index = parent.
size ();
1739 index_within_block = 0;
1740 next_break_backward = global_index;
1747 template <
class BlockVectorType,
bool constness>
1749 Iterator<BlockVectorType,constness>::move_forward ()
1751 if (global_index != next_break_forward)
1752 ++index_within_block;
1757 index_within_block = 0;
1762 next_break_backward = next_break_forward+1;
1765 if (current_block < parent->block_indices.
size())
1781 template <
class BlockVectorType,
bool constness>
1783 Iterator<BlockVectorType,constness>::move_backward ()
1785 if (global_index != next_break_backward)
1786 --index_within_block;
1787 else if (current_block != 0)
1796 next_break_forward = next_break_backward-1;
1808 next_break_forward = 0;
1809 next_break_backward = 0;
1821 template <
class VectorType>
1828 template <
class VectorType>
1838 template <
class VectorType>
1847 for (
unsigned int b=0; b<n_blocks(); ++b)
1849 IndexSet x = block(b).locally_owned_elements();
1860 template <
class VectorType>
1865 return block_indices.
size();
1869 template <
class VectorType>
1876 return components[i];
1881 template <
class VectorType>
1888 return components[i];
1893 template <
class VectorType>
1898 return block_indices;
1902 template <
class VectorType>
1907 std::vector<size_type> sizes (n_blocks());
1909 for (size_type i=0; i<n_blocks(); ++i)
1910 sizes[i] = block(i).size();
1912 block_indices.
reinit(sizes);
1917 template <
class VectorType>
1922 for (
unsigned int i=0; i<n_blocks(); ++i)
1923 block(i).compress (operation);
1928 template <
class VectorType>
1933 compress(VectorOperation::unknown);
1938 template <
class VectorType>
1943 return iterator(*
this, 0U);
1948 template <
class VectorType>
1953 return const_iterator(*
this, 0U);
1957 template <
class VectorType>
1962 return iterator(*
this, size());
1967 template <
class VectorType>
1972 return const_iterator(*
this, size());
1976 template <
class VectorType>
1980 (
const size_type global_index)
const 1982 const std::pair<size_type,size_type> local_index
1985 return components[local_index.first].in_local_range (global_index);
1989 template <
class VectorType>
1993 for (size_type i=0; i<n_blocks(); ++i)
1994 if (components[i].all_zero() ==
false)
2002 template <
class VectorType>
2006 for (size_type i=0; i<n_blocks(); ++i)
2007 if (components[i].is_non_negative() ==
false)
2015 template <
class VectorType>
2016 typename BlockVectorBase<VectorType>::value_type
2023 value_type sum = 0.;
2024 for (size_type i=0; i<n_blocks(); ++i)
2031 template <
class VectorType>
2036 for (size_type i=0; i<n_blocks(); ++i)
2037 sum += components[i].norm_sqr();
2044 template <
class VectorType>
2045 typename BlockVectorBase<VectorType>::value_type
2048 value_type sum = 0.;
2049 for (size_type i=0; i<n_blocks(); ++i)
2050 sum += components[i].mean_value() * components[i].size();
2057 template <
class VectorType>
2062 for (size_type i=0; i<n_blocks(); ++i)
2063 sum += components[i].l1_norm();
2070 template <
class VectorType>
2074 return std::sqrt(norm_sqr());
2079 template <
class VectorType>
2084 for (size_type i=0; i<n_blocks(); ++i)
2086 value_type newval = components[i].linfty_norm();
2095 template <
class VectorType>
2105 template <
class VectorType>
2112 for (size_type i=0; i<n_blocks(); ++i)
2121 template <
class VectorType>
2122 template <
typename Number>
2126 const std::vector<Number> &values)
2128 Assert (indices.size() == values.size(),
2130 add (indices.size(), &indices[0], &values[0]);
2135 template <
class VectorType>
2136 template <
typename Number>
2142 Assert (indices.size() == values.size(),
2144 const size_type n_indices = indices.size();
2145 for (size_type i=0; i<n_indices; ++i)
2146 (*
this)(indices[i]) += values(i);
2151 template <
class VectorType>
2152 template <
typename Number>
2156 const size_type *indices,
2157 const Number *values)
2159 for (size_type i=0; i<n_indices; ++i)
2160 (*
this)(indices[i]) += values[i];
2165 template <
class VectorType>
2170 for (size_type i=0; i<n_blocks(); ++i)
2172 components[i].add(a);
2178 template <
class VectorType>
2184 for (size_type i=0; i<n_blocks(); ++i)
2192 template <
class VectorType>
2202 for (size_type i=0; i<n_blocks(); ++i)
2210 template <
class VectorType>
2226 for (size_type i=0; i<n_blocks(); ++i)
2234 template <
class VectorType>
2244 for (size_type i=0; i<n_blocks(); ++i)
2252 template <
class VectorType>
2263 for (size_type i=0; i<n_blocks(); ++i)
2271 template <
class VectorType>
2287 for (size_type i=0; i<n_blocks(); ++i)
2295 template <
class VectorType>
2316 for (size_type i=0; i<n_blocks(); ++i)
2325 template <
class VectorType>
2326 template <
class BlockVector2>
2329 Assert (n_blocks() == v.n_blocks(),
2331 for (size_type i=0; i<n_blocks(); ++i)
2332 components[i].scale(v.block(i));
2337 template <
class VectorType>
2352 for (size_type i=0; i<n_blocks(); ++i)
2360 template <
class VectorType>
2364 std::size_t mem =
sizeof(this->n_blocks());
2365 for (size_type i=0; i<this->components.size(); ++i)
2373 template <
class VectorType>
2374 template <
class BlockVector2>
2376 const BlockVector2 &v)
2381 Assert (n_blocks() == v.n_blocks(),
2384 for (size_type i=0; i<n_blocks(); ++i)
2385 components[i].equ( a, v.components[i]);
2390 template <
class VectorType>
2393 for (size_type i=0; i<n_blocks(); ++i)
2394 block(i).update_ghost_values ();
2399 template <
class VectorType>
2406 for (size_type i=0; i<n_blocks(); ++i)
2413 template <
class VectorType>
2419 for (size_type i=0; i<n_blocks(); ++i)
2426 template <
class VectorType>
2427 template <
class VectorType2>
2433 for (size_type i=0; i<n_blocks(); ++i)
2441 template <
class VectorType>
2445 Assert (size() == v.size(),
2448 size_type index_v = 0;
2449 for (size_type b=0; b<n_blocks(); ++b)
2450 for (size_type i=0; i<block(b).size(); ++i, ++index_v)
2451 block(b)(i) = v(index_v);
2458 template <
class VectorType>
2459 template <
class VectorType2>
2467 for (size_type i=0; i<n_blocks(); ++i)
2476 template <
class VectorType>
2484 for (size_type i=0; i<n_blocks(); ++i)
2485 components[i] *= factor;
2492 template <
class VectorType>
2501 for (size_type i=0; i<n_blocks(); ++i)
2502 components[i] /= factor;
2508 template <
class VectorType>
2510 typename BlockVectorBase<VectorType>::value_type
2513 const std::pair<size_type,size_type> local_index
2515 return components[local_index.first](local_index.second);
2520 template <
class VectorType>
2522 typename BlockVectorBase<VectorType>::reference
2525 const std::pair<size_type,size_type> local_index
2527 return components[local_index.first](local_index.second);
2532 template <
class VectorType>
2534 typename BlockVectorBase<VectorType>::value_type
2537 return operator()(i);
2542 template <
class VectorType>
2544 typename BlockVectorBase<VectorType>::reference
2547 return operator()(i);
2552 template <
typename VectorType>
2553 template <
typename OtherNumber>
2556 std::vector<OtherNumber> &values)
const 2558 for (size_type i = 0; i < indices.size(); ++i)
2559 values[i] =
operator()(indices[i]);
2564 template <
typename VectorType>
2565 template <
typename ForwardIterator,
typename OutputIterator>
2568 const ForwardIterator indices_end,
2569 OutputIterator values_begin)
const 2571 while (indices_begin != indices_end)
2573 *values_begin = operator()(*indices_begin);
2581 DEAL_II_NAMESPACE_CLOSE
const types::global_dof_index invalid_size_type
static yes_type check_for_block_vector(const BlockVectorBase< T > *)
BaseClass::value_type value_type
value_type dereference_type
#define AssertDimension(dim1, dim2)
bool operator==(const BlockVectorBase< VectorType2 > &v) const
void add(const std::vector< size_type > &indices, const std::vector< Number > &values)
BlockVector::value_type value_type
real_type linfty_norm() const
Auxiliary class aiding in the handling of block structures like in BlockVector or FESystem...
types::global_dof_index size_type
void add_indices(const ForwardIterator &begin, const ForwardIterator &end)
real_type norm_sqr() const
size_type next_break_forward
unsigned int n_blocks() const
unsigned int current_block
value_type operator[](const size_type i) const
BlockVectorBase & operator/=(const value_type factor)
bool is_finite(const double x)
void scale(const BlockVector2 &v)
Vector::reference dereference_type
bool is_non_negative() const
value_type operator()(const size_type i) const
BlockIndices block_indices
size_type block_start(const unsigned int i) const
bool in_local_range(const size_type global_index) const
unsigned int global_dof_index
#define Assert(cond, exc)
void update_ghost_values() const
BlockType::real_type real_type
std::size_t memory_consumption(const T &t)
const BlockIndices & get_block_indices() const
void reinit(const unsigned int n_blocks, const size_type n_elements_per_block)
size_type total_size() const
#define DeclException0(Exception0)
Types< BlockVectorType, constness >::value_type value_type
::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
value_type mean_value() const
BlockCompressedSparsityPattern CompressedBlockSparsityPattern DEAL_II_DEPRECATED
std::pair< unsigned int, size_type > global_to_local(const size_type i) const
const BlockVectorType BlockVector
BlockVectorBase & operator+=(const BlockVectorBase &V)
std::vector< VectorType > components
size_type block_size(const unsigned int i) const
BlockVectorBase & operator*=(const value_type factor)
const BlockVector::value_type value_type
BlockVectorType BlockVector
void sadd(const value_type s, const BlockVectorBase &V)
BlockVectorType::BlockType Vector
::ExceptionBase & ExcNumberNotFinite()
BlockVectorBase & operator-=(const BlockVectorBase &V)
Iterator< BlockVectorType,!constness > InverseConstnessIterator
value_type operator*(const BlockVectorBase &V) const
real_type l2_norm() const
void compress() DEAL_II_DEPRECATED
const BlockVectorType::BlockType Vector
IndexSet locally_owned_elements() const
unsigned int size() const
::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
std::random_access_iterator_tag iterator_type
::ExceptionBase & ExcDivideByZero()
BlockType & block(const unsigned int i)
size_type local_to_global(const unsigned int block, const size_type index) const
BlockVectorBase & operator=(const value_type s)
void extract_subvector_to(const std::vector< size_type > &indices, std::vector< OtherNumber > &values) const
real_type l1_norm() const
void equ(const value_type a, const BlockVector2 &V)
Types< BlockVectorType, constness >::BlockVector BlockVector
std::size_t memory_consumption() const