|
class | PETScKrylovSolver |
| This class implements Krylov methods for linear systems of the form Ax = b. It is a wrapper for the Krylov solvers of PETSc. More...
|
|
class | PETScMatrix |
| It is a simple wrapper for a PETSc matrix pointer (Mat). Its main purpose is to assist memory management of PETSc Mat objects. More...
|
|
class | PETScOperator |
| This class is a base class for matrices that can be used in PETScKrylovSolver. More...
|
|
class | PETScOptions |
| These class provides static functions that permit users to set and retrieve PETSc options via the PETSc option/parameter system. The option must not be prefixed by '-', e.g. More...
|
|
class | PETScVector |
| A simple wrapper for a PETSc vector pointer (Vec). Its main purpose is to assist with memory/lifetime management of PETSc Vec objects. More...
|
|
class | SparsityPattern |
| This class provides a sparsity pattern data structure that can be used to initialize sparse matrices. More...
|
|
class | Vector |
| Distributed vector. More...
|
|
class | VectorSpaceBasis |
| This class defines a basis for vector spaces, typically used for expressing nullspaces of singular operators and 'near nullspaces' used in smoothed aggregation algebraic multigrid. More...
|
|
|
Mat | create_petsc_matrix (MPI_Comm comm, const SparsityPattern &sparsity_pattern, const std::string &type=std::string()) |
| Create a PETSc Mat. Caller is responsible for destroying the returned object.
|
|
MatNullSpace | create_petsc_nullspace (MPI_Comm comm, const VectorSpaceBasis &nullspace) |
| Create PETSc MatNullSpace. Caller is responsible for destruction returned object.
|
|
Vec | create_ghosted_vector (const common::IndexMap &map, int bs, xtl::span< PetscScalar > x) |
| Create a PETSc Vec that wraps the data in an array. More...
|
|
void | petsc_error (int error_code, std::string filename, std::string petsc_function) |
| Print error message for PETSc calls that return an error.
|
|
std::vector< IS > | create_petsc_index_sets (const std::vector< std::pair< std::reference_wrapper< const common::IndexMap >, int >> &maps) |
|
Vec | create_petsc_vector (const common::IndexMap &map, int bs) |
| Create a ghosted PETSc Vec. More...
|
|
Vec | create_petsc_vector (MPI_Comm comm, std::array< std::int64_t, 2 > range, const std::vector< std::int64_t > &ghosts, int bs) |
| Create a ghosted PETSc Vec from a local range and ghost indices. More...
|
|
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< xtl::span< const PetscScalar >> &x_b, const std::vector< std::pair< std::reference_wrapper< const common::IndexMap >, int >> &maps) |
| Scatter local vectors to Vec.
|
|
template<typename T > |
void | scatter_fwd (Vector< T > &v) |
| Scatter la::Vector local data to ghost values. More...
|
|
template<typename T > |
void | scatter_rev (Vector< T > &v, dolfinx::common::IndexMap::Mode op) |
| Scatter la::Vector ghost data to owner. This process will result in multiple incoming values, which can be summed or inserted into the local vector. More...
|
|
Linear algebra interface.
Interface to linear algebra data structures and solvers
std::vector< IS > dolfinx::la::create_petsc_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}
.
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