1 #ifndef _LAC_INITIALIZER_H_
2 #define _LAC_INITIALIZER_H_
16 const std::vector<IndexSet> &owned,
17 const std::vector<IndexSet> &relevant,
18 const MPI_Comm &comm = MPI_COMM_WORLD):
19 dofs_per_block(dofs_per_block),
30 v.
reinit(owned, comm, fast);
39 v.
reinit(owned, relevant, comm, fast);
47 v.
reinit(dofs_per_block, fast);
57 Assert(
false, ExcInternalError(
"You tried to create a ghosted vector in a serial run."));
64 template<
int dim,
int spacedim>
70 s.
reinit(owned, owned, relevant, comm);
81 template<
int dim,
int spacedim>
87 dealii::BlockDynamicSparsityPattern csp(dofs_per_block, dofs_per_block);
100 const std::vector<types::global_dof_index> &dofs_per_block;
105 const std::vector<IndexSet> &owned;
110 const std::vector<IndexSet> &relevant;
115 const MPI_Comm &comm;
121 VectorOperation::values op)
126 inline void compress(dealii::BlockSparseMatrix<double> &,
127 VectorOperation::values )
void operator()(TrilinosWrappers::MPI::BlockVector &v, bool fast=false)
Initialize a non ghosted TrilinosWrappers::MPI::BlockVector.
Definition: lac_initializer.h:28
void reinit(const std::vector< size_type > &row_block_sizes, const std::vector< size_type > &col_block_sizes)
void ghosted(TrilinosWrappers::MPI::BlockVector &v, bool fast=false)
Initialize a ghosted TrilinosWrappers::MPI::BlockVector.
Definition: lac_initializer.h:37
General class, used to initialize different types of Vectors, Matrices and Sparsity Patterns using a ...
Definition: lac_initializer.h:12
void reinit(const std::vector< Epetra_Map > ¶llel_partitioning, const bool omit_zeroing_entries=false) DEAL_II_DEPRECATED
#define Assert(cond, exc)
void reinit(const unsigned int n_blocks, const size_type block_size=0, const bool omit_zeroing_entries=false)
void make_sparsity_pattern(const DoFHandlerType &dof_handler, SparsityPatternType &sparsity_pattern, const ConstraintMatrix &constraints=ConstraintMatrix(), const bool keep_constrained_dofs=true, const types::subdomain_id subdomain_id=numbers::invalid_subdomain_id)
void ghosted(BlockVector< double > &, bool fast=false)
Initiale a ghosted BlockVector.
Definition: lac_initializer.h:55
unsigned int this_mpi_process(const MPI_Comm &mpi_communicator)
ScopedLACInitializer(const std::vector< types::global_dof_index > &dofs_per_block, const std::vector< IndexSet > &owned, const std::vector< IndexSet > &relevant, const MPI_Comm &comm=MPI_COMM_WORLD)
Definition: lac_initializer.h:15
void compress(::VectorOperation::values operation)
void compress(TrilinosWrappers::BlockSparseMatrix &m, VectorOperation::values op)
Definition: lac_initializer.h:120