| 
| 
void  | error (int error_code, std::string filename, std::string petsc_function) | 
|   | Print error message for PETSc calls that return an error. 
  | 
|   | 
| std::vector< Vec >  | create_vectors (MPI_Comm comm, const std::vector< std::span< const PetscScalar > > &x) | 
|   | 
| Vec  | create_vector (const common::IndexMap &map, int bs) | 
|   | 
| Vec  | create_vector (MPI_Comm comm, std::array< std::int64_t, 2 > range, std::span< const std::int64_t > ghosts, int bs) | 
|   | 
| Vec  | create_vector_wrap (const common::IndexMap &map, int bs, std::span< const PetscScalar > x) | 
|   | 
| template<class V >  | 
| Vec  | create_vector_wrap (const la::Vector< V > &x) | 
|   | 
| std::vector< IS >  | create_index_sets (const std::vector< std::pair< std::reference_wrapper< const common::IndexMap >, int > > &maps) | 
|   | 
| 
std::vector< std::vector< PetscScalar > >  | get_local_vectors (const Vec x, const std::vector< std::pair< std::reference_wrapper< const common::IndexMap >, int > > &maps) | 
|   | Copy blocks from Vec into local vectors. 
  | 
|   | 
| 
void  | scatter_local_vectors (Vec x, const std::vector< std::span< const PetscScalar > > &x_b, const std::vector< std::pair< std::reference_wrapper< const common::IndexMap >, int > > &maps) | 
|   | Scatter local vectors to Vec. 
  | 
|   | 
| Mat  | create_matrix (MPI_Comm comm, const SparsityPattern &sp, std::string type=std::string()) | 
|   | 
| MatNullSpace  | create_nullspace (MPI_Comm comm, std::span< const Vec > basis) | 
|   | 
PETSc linear algebra functions. 
 
      
        
          | std::vector< IS > create_index_sets  | 
          ( | 
          const std::vector< std::pair< std::reference_wrapper< const common::IndexMap >, int > > & |           maps | ) | 
           | 
        
      
 
- Todo
 - This function could take just the local sizes
 
Compute PETSc IndexSets (IS) for a stack of index maps. E.g., if map[0] = {0, 1, 2, 3, 4, 5, 6} and map[1] = {0, 1, 2, 4} (in local indices) then IS[0] = {0, 1, 2, 3, 4, 5, 6} and IS[1] = {7, 8, 9, 10}.
- Note
 - The caller is responsible for destruction of each IS.
 
- Parameters
 - 
  
    | [in] | maps | Vector of IndexMaps and corresponding block sizes  | 
  
   
- Returns
 - Vector of PETSc Index Sets, created on
PETSC_COMM_SELF