16 #ifndef dealii__block_vector_h 17 #define dealii__block_vector_h 20 #include <deal.II/base/config.h> 21 #include <deal.II/base/exceptions.h> 22 #include <deal.II/lac/block_indices.h> 23 #include <deal.II/lac/block_vector_base.h> 24 #include <deal.II/lac/vector_type_traits.h> 29 DEAL_II_NAMESPACE_OPEN
32 #ifdef DEAL_II_WITH_TRILINOS 61 template <
typename Number>
80 typedef typename BaseClass::pointer pointer;
81 typedef typename BaseClass::const_pointer const_pointer;
82 typedef typename BaseClass::reference reference;
83 typedef typename BaseClass::const_reference const_reference;
84 typedef typename BaseClass::size_type size_type;
99 const size_type block_size = 0);
108 #ifdef DEAL_II_WITH_CXX11 120 #ifndef DEAL_II_EXPLICIT_CONSTRUCTOR_BUG 133 template <
typename OtherNumber>
139 #ifdef DEAL_II_WITH_TRILINOS 151 BlockVector (
const std::vector<size_type> &block_sizes);
168 template <
typename InputIterator>
169 BlockVector (
const std::vector<size_type> &block_sizes,
170 const InputIterator first,
171 const InputIterator
end);
204 #ifdef DEAL_II_WITH_CXX11 219 template <
class Number2>
229 #ifdef DEAL_II_WITH_TRILINOS 251 const size_type block_size = 0,
252 const bool omit_zeroing_entries =
false);
270 void reinit (
const std::vector<size_type> &block_sizes,
271 const bool omit_zeroing_entries=
false);
283 const bool omit_zeroing_entries=
false);
298 template <
typename Number2>
300 const bool omit_zeroing_entries=
false);
306 template <
class BlockVector2>
307 void scale (
const BlockVector2 &v);
327 void print (
const char *format = 0) const DEAL_II_DEPRECATED;
333 const
unsigned int precision = 3,
334 const
bool scientific = true,
335 const
bool across = true) const;
376 template <
typename Number>
377 template <
typename InputIterator>
379 const InputIterator first,
380 const InputIterator
end)
386 reinit (block_sizes,
true);
387 InputIterator start = first;
388 for (size_type b=0; b<block_sizes.size(); ++b)
390 InputIterator
end = start;
391 std::advance (
end, static_cast<signed int>(block_sizes[b]));
400 template <
typename Number>
414 template <
typename Number>
426 template <
typename Number>
437 template <
typename Number>
438 template <
typename Number2>
448 template <
typename Number>
452 for (size_type i=0; i<this->
n_blocks(); ++i)
458 template <
typename Number>
459 template <
class BlockVector2>
476 template <
typename Number>
495 template<
typename number>
499 template <
typename Matrix>
501 void reinit_range_vector (
const Matrix &matrix,
503 bool omit_zeroing_entries)
505 v.
reinit(matrix.get_row_indices(), omit_zeroing_entries);
508 template <
typename Matrix>
510 void reinit_domain_vector(
const Matrix &matrix,
512 bool omit_zeroing_entries)
514 v.
reinit(matrix.get_column_indices(), omit_zeroing_entries);
527 template <
typename Number>
532 DEAL_II_NAMESPACE_CLOSE
void print(const char *format=0) const 1
BaseClass::value_type value_type
BlockVector & operator=(const value_type s)
void block_write(std::ostream &out) const
void scale(const BlockVector2 &v)
void swap(BlockVector< Number > &u, BlockVector< Number > &v)
void scale(const BlockVector2 &v)
BlockVectorBase< Vector< Number > > BaseClass
BlockIndices block_indices
static ::ExceptionBase & ExcIteratorRangeDoesNotMatchVectorSize()
#define Assert(cond, exc)
BlockType::real_type real_type
void compress(::VectorOperation::values operation=::VectorOperation::unknown)
#define DeclException0(Exception0)
void reinit(const unsigned int n_blocks, const size_type block_size=0, const bool omit_zeroing_entries=false)
std::vector< Vector< Number > > components
void swap(BlockVector< Number > &v)
unsigned int n_blocks() const
BlockVector(const unsigned int n_blocks=0, const size_type block_size=0)
BaseClass::BlockType BlockType
BlockType & block(const unsigned int i)
BlockVectorBase & operator=(const value_type s)
#define AssertIsFinite(number)
void block_read(std::istream &in)