|
| template<typename T> |
| dolfinx::la::MatrixCSR< T > | matmul (const dolfinx::la::MatrixCSR< T > &A, const dolfinx::la::MatrixCSR< T > &B) |
| | Compute C = A*B as a distributed MatrixCSR.
|
| template<typename T, int BS0 = -1, int BS1 = -1> |
| dolfinx::la::MatrixCSR< T > | transpose (const dolfinx::la::MatrixCSR< T > &A) |
| | Compute the distributed transpose of a MatrixCSR.
|
| template<class V> |
| auto | inner_product (const V &a, const V &b) |
| | Compute the inner product of two vectors.
|
| template<class V> |
| auto | squared_norm (const V &a) |
| | Compute the squared L2 norm of vector.
|
| template<class V> |
| auto | norm (const V &x, Norm type=Norm::l2) |
| | Compute the norm of the vector.
|
| template<class V> |
| void | orthonormalize (std::vector< std::reference_wrapper< V > > basis) |
| | Orthonormalize a set of vectors.
|
| template<class V> |
| bool | is_orthonormal (std::vector< std::reference_wrapper< const V > > basis, dolfinx::scalar_value_t< typename V::value_type > eps=std::numeric_limits< dolfinx::scalar_value_t< typename V::value_type > >::epsilon()) |
| | Test if basis is orthonormal.
|
Linear algebra interface.
Interface to linear algebra data structures and solvers.
template<typename T, int BS0 = -1, int BS1 = -1>
Compute the distributed transpose of a MatrixCSR.
Given A with row map R (n_row owned rows) and column map C (n_col owned columns plus any ghost columns from remote ranks), returns Aᵀ with: row map = ghost-free column map of A (n_col owned rows, no ghosts) col map = row map of A extended with any ghost row indices that appear as nonzeros contributed by remote ranks.
Communication strategy:
- Exchange per-neighbour entry counts (MPI_Neighbor_alltoall).
- Build displacements and pack send buffers.
- Post non-blocking data exchange (three MPI_Ineighbor_alltoallv in flight simultaneously: row global indices, column global indices, and values).
- While data exchange is in flight, compute the local (diagonal-block) part of the transpose via local_transpose.
- Wait for data, merge received entries, finalise sparsity and construct the MatrixCSR.
- Parameters
-
- Template Parameters
-
| T | Scalar type |
| BS0 | Row block size of A, or -1 for unoptimized. |
| BS1 | Col block size of A, or -1 for unoptimized. |
- Returns
- Aᵀ as a distributed MatrixCSR.