General class, used to initialize different types of block vectors, block atrices and block sparsity patterns using a common interface. More...
#include <lac_initializer.h>
Public Member Functions | |
BlockInitializer (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) | |
void | operator() (LATrilinos::BlockVector &v, bool fast=false) |
Initialize a non ghosted TrilinosWrappers::MPI::BlockVector. More... | |
void | ghosted (LATrilinos::BlockVector &v, bool fast=false) |
Initialize a ghosted TrilinosWrappers::MPI::BlockVector. More... | |
void | operator() (LAPETSc::BlockVector &v, bool fast=false) |
Initialize a non ghosted TrilinosWrappers::MPI::BlockVector. More... | |
void | ghosted (LAPETSc::BlockVector &v, bool fast=false) |
Initialize a ghosted TrilinosWrappers::MPI::BlockVector. More... | |
void | operator() (LABlockVector &v, bool fast=false) |
Initialize a serial BlockVector<double>. More... | |
void | ghosted (LABlockVector &v, bool fast=false) |
Initiale a ghosted BlockVector<double>. More... | |
template<int dim, int spacedim> | |
void | operator() (TrilinosWrappers::BlockSparsityPattern &s, const DoFHandler< dim, spacedim > &dh, const AffineConstraints< double > &cm, const Table< 2, DoFTools::Coupling > &coupling) |
Initialize a Trilinos Sparsity Pattern. More... | |
template<int dim, int spacedim> | |
void | operator() (BlockSparsityPattern &s, const DoFHandler< dim, spacedim > &dh, const AffineConstraints< double > &cm, const Table< 2, DoFTools::Coupling > &coupling) |
Initialize a Deal.II Sparsity Pattern. More... | |
void | operator() (const LABlockSparsityPattern &sparsity, LABlockSparseMatrix &matrix) |
Initialize a deal.II matrix. More... | |
void | operator() (const LATrilinos::BlockSparsityPattern &sparsity, LATrilinos::BlockSparseMatrix &matrix) |
Initialize a Trilinos matrix. More... | |
void | operator() (const LAPETSc::BlockSparsityPattern &, LAPETSc::BlockSparseMatrix &matrix) |
Initialize a PETSc matrix. More... | |
Private Attributes | |
std::unique_ptr< BlockDynamicSparsityPattern > | dsp |
The dynamic sparisty pattern. More... | |
const std::vector< types::global_dof_index > & | dofs_per_block |
Dofs per block. More... | |
const std::vector< IndexSet > & | owned |
Owned dofs per block. More... | |
const std::vector< IndexSet > & | relevant |
Relevant dofs per block. More... | |
const MPI_Comm & | comm |
MPI Communicator. More... | |
General class, used to initialize different types of block vectors, block atrices and block sparsity patterns using a common interface.
Definition at line 30 of file lac_initializer.h.
|
inline |
Definition at line 33 of file lac_initializer.h.
|
inline |
Initialize a non ghosted TrilinosWrappers::MPI::BlockVector.
Definition at line 47 of file lac_initializer.h.
References comm, owned, and TrilinosWrappers::MPI::BlockVector::reinit().
|
inline |
Initialize a ghosted TrilinosWrappers::MPI::BlockVector.
Definition at line 57 of file lac_initializer.h.
References comm, owned, TrilinosWrappers::MPI::BlockVector::reinit(), and relevant.
|
inline |
Initialize a non ghosted TrilinosWrappers::MPI::BlockVector.
Definition at line 66 of file lac_initializer.h.
References comm, owned, and PETScWrappers::MPI::BlockVector::reinit().
|
inline |
Initialize a ghosted TrilinosWrappers::MPI::BlockVector.
Definition at line 77 of file lac_initializer.h.
References comm, owned, PETScWrappers::MPI::BlockVector::reinit(), and relevant.
|
inline |
Initialize a serial BlockVector<double>.
Definition at line 87 of file lac_initializer.h.
References dofs_per_block.
|
inline |
Initiale a ghosted BlockVector<double>.
Same as above.
Definition at line 97 of file lac_initializer.h.
References dofs_per_block.
|
inline |
Initialize a Trilinos Sparsity Pattern.
Definition at line 107 of file lac_initializer.h.
References comm, TrilinosWrappers::BlockSparsityPattern::compress(), DoFTools::make_sparsity_pattern(), owned, TrilinosWrappers::BlockSparsityPattern::reinit(), relevant, and Utilities::MPI::this_mpi_process().
|
inline |
Initialize a Deal.II Sparsity Pattern.
Definition at line 128 of file lac_initializer.h.
References BlockSparsityPattern::copy_from(), dofs_per_block, dsp, and DoFTools::make_sparsity_pattern().
|
inline |
Initialize a deal.II matrix.
Definition at line 146 of file lac_initializer.h.
|
inline |
Initialize a Trilinos matrix.
Definition at line 157 of file lac_initializer.h.
|
inline |
Initialize a PETSc matrix.
Definition at line 169 of file lac_initializer.h.
References Assert, comm, dsp, StandardExceptions::ExcNotInitialized(), and owned.
|
private |
The dynamic sparisty pattern.
Definition at line 181 of file lac_initializer.h.
Referenced by operator()().
|
private |
Dofs per block.
Definition at line 186 of file lac_initializer.h.
Referenced by ghosted(), and operator()().
|
private |
Owned dofs per block.
Definition at line 191 of file lac_initializer.h.
Referenced by ghosted(), and operator()().
|
private |
Relevant dofs per block.
Definition at line 196 of file lac_initializer.h.
Referenced by ghosted(), and operator()().
|
private |
MPI Communicator.
Definition at line 201 of file lac_initializer.h.
Referenced by ghosted(), and operator()().