16 #ifndef dealii__trilinos_parallel_block_vector_h 17 #define dealii__trilinos_parallel_block_vector_h 20 #include <deal.II/base/config.h> 22 #ifdef DEAL_II_WITH_TRILINOS 24 # include <deal.II/lac/trilinos_vector.h> 25 # include <deal.II/lac/block_indices.h> 26 # include <deal.II/lac/block_vector_base.h> 27 # include <deal.II/lac/exceptions.h> 29 # include <functional> 31 DEAL_II_NAMESPACE_OPEN
88 typedef BaseClass::pointer pointer;
89 typedef BaseClass::const_pointer const_pointer;
90 typedef BaseClass::reference reference;
91 typedef BaseClass::const_reference const_reference;
92 typedef BaseClass::size_type size_type;
108 explicit BlockVector (
const std::vector<Epetra_Map> ¶llel_partitioning) DEAL_II_DEPRECATED;
116 explicit BlockVector (
const std::vector<IndexSet> ¶llel_partitioning,
117 const MPI_Comm &communicator = MPI_COMM_WORLD);
124 BlockVector (
const std::vector<IndexSet> ¶llel_partitioning,
125 const std::vector<IndexSet> &ghost_values,
126 const MPI_Comm &communicator,
127 const bool vector_writable =
false);
135 #ifdef DEAL_II_WITH_CXX11 169 #ifdef DEAL_II_WITH_CXX11 184 operator= (const ::TrilinosWrappers::BlockVector &v);
196 template <
typename Number>
209 void reinit (
const std::vector<Epetra_Map> ¶llel_partitioning,
210 const bool omit_zeroing_entries =
false) DEAL_II_DEPRECATED;
221 const MPI_Comm &communicator = MPI_COMM_WORLD,
222 const
bool omit_zeroing_entries = false);
243 const MPI_Comm &communicator = MPI_COMM_WORLD,
244 const
bool vector_writable = false);
262 const
bool omit_zeroing_entries = false);
270 void reinit (const size_type num_blocks);
334 const
unsigned int precision = 3,
335 const
bool scientific = true,
336 const
bool across = true) const;
362 const MPI_Comm &communicator)
364 reinit (parallel_partitioning, communicator,
false);
371 const std::vector<IndexSet> &ghost_values,
372 const MPI_Comm &communicator,
373 const bool vector_writable)
375 reinit(parallel_partitioning, ghost_values, communicator,
397 for (size_type i=0; i<this->
n_blocks(); ++i)
403 #ifdef DEAL_II_WITH_CXX11 415 template <
typename Number>
421 std::vector<size_type> block_sizes (v.n_blocks(), 0);
427 for (size_type i=0; i<this->
n_blocks(); ++i)
441 bool ghosted=
block(0).has_ghost_elements();
443 for (
unsigned int i=0; i<this->
n_blocks(); ++i)
488 template <
typename>
class ReinitHelper;
498 template <
typename Matrix>
502 bool omit_zeroing_entries)
504 v.
reinit(matrix.range_partitioner(), omit_zeroing_entries);
507 template <
typename Matrix>
511 bool omit_zeroing_entries)
513 v.
reinit(matrix.domain_partitioner(), omit_zeroing_entries);
521 DEAL_II_NAMESPACE_CLOSE
523 #endif // DEAL_II_WITH_TRILINOS BaseClass::value_type value_type
bool is_compressed() const 1
static ::ExceptionBase & ExcIteratorRangeDoesNotMatchVectorSize()
static ::ExceptionBase & ExcNonMatchingBlockVectors()
static void reinit_domain_vector(const Matrix &matrix, Vector &v, bool omit_zeroing_entries)
BlockVectorBase< Vector > BaseClass
BlockIndices block_indices
#define Assert(cond, exc)
void reinit(const unsigned int n_blocks, const size_type n_elements_per_block)
#define DeclException0(Exception0)
void reinit(const std::vector< Epetra_Map > ¶llel_partitioning, const bool omit_zeroing_entries=false) 1
std::vector< Vector > components
static void reinit_range_vector(const Matrix &matrix, Vector &v, bool omit_zeroing_entries)
BlockVector & operator=(const value_type s)
unsigned int n_blocks() const
bool has_ghost_elements() const
void import_nonlocal_data_for_fe(const TrilinosWrappers::BlockSparseMatrix &m, const BlockVector &v)
void swap(BlockVector &v)
BaseClass::BlockType BlockType
void swap(BlockVector &u, BlockVector &v)
BlockType & block(const unsigned int i)
void print(std::ostream &out, const unsigned int precision=3, const bool scientific=true, const bool across=true) const
static ::ExceptionBase & ExcInternalError()