11#include <dolfinx/common/MPI.h>
12#include <dolfinx/la/MatrixCSR.h>
13#include <dolfinx/la/Vector.h>
47constexpr bool always_false_v =
false;
52 static_assert(always_false_v<T>,
"Invalid scalar type");
59 using ScalePermstruct_t = SuperLUDistStructs::dScalePermstruct_t;
60 using LUstruct_t = SuperLUDistStructs::dLUstruct_t;
61 using SOLVEstruct_t = SuperLUDistStructs::dSOLVEstruct_t;
68 using ScalePermstruct_t = SuperLUDistStructs::sScalePermstruct_t;
69 using LUstruct_t = SuperLUDistStructs::sLUstruct_t;
70 using SOLVEstruct_t = SuperLUDistStructs::sSOLVEstruct_t;
75struct map<std::complex<double>>
77 using ScalePermstruct_t = SuperLUDistStructs::zScalePermstruct_t;
78 using LUstruct_t = SuperLUDistStructs::zLUstruct_t;
79 using SOLVEstruct_t = SuperLUDistStructs::zSOLVEstruct_t;
118 MPI_Comm
comm()
const;
126 std::vector<T> _matA_values;
129 std::unique_ptr<SuperLUDistStructs::vec_int_t> _cols;
130 std::unique_ptr<SuperLUDistStructs::vec_int_t> _rowptr;
133 std::unique_ptr<SuperLUDistStructs::SuperMatrix, SuperMatrixDeleter>
216 void set_option(std::string name, std::string value);
268 std::shared_ptr<const SuperLUDistMatrix<T>> _superlu_matA;
271 std::unique_ptr<SuperLUDistStructs::superlu_dist_options_t> _options;
274 std::unique_ptr<SuperLUDistStructs::gridinfo_t, GridInfoDeleter> _gridinfo;
280 std::unique_ptr<typename map_t<T>::LUstruct_t,
LUStructDeleter> _lustruct;
287 bool _factored =
false;
A duplicate MPI communicator and manage lifetime of the communicator.
Definition MPI.h:42
Distributed sparse matrix using compressed sparse row storage.
Definition MatrixCSR.h:70
SuperLU_DIST matrix interface.
Definition superlu_dist.h:101
SuperLUDistMatrix & operator=(const SuperLUDistMatrix &)=delete
Copy assignment (deleted).
SuperLUDistStructs::SuperMatrix * supermatrix() const
Get pointer to SuperLU_DIST SuperMatrix (non-const).
Definition superlu_dist.cpp:234
SuperLUDistMatrix(const MatrixCSR< T > &A)
Create SuperLU_DIST matrix operator.
Definition superlu_dist.cpp:219
MPI_Comm comm() const
Get MPI communicator that matrix is defined on.
Definition superlu_dist.cpp:228
SuperLUDistMatrix(const SuperLUDistMatrix &)=delete
Copy constructor (deleted).
void set_option(std::string name, std::string value)
Set solver option name to value.
Definition superlu_dist.cpp:470
SuperLUDistSolver(std::shared_ptr< const SuperLUDistMatrix< T > > A)
Create solver for a SuperLU_DIST matrix operator.
Definition superlu_dist.cpp:390
SuperLUDistSolver & operator=(const SuperLUDistSolver &)=delete
Copy assignment.
SuperLUDistSolver(const SuperLUDistSolver &)=delete
Copy constructor.
void set_options(SuperLUDistStructs::superlu_dist_options_t options)
Set all solver options (native struct).
Definition superlu_dist.cpp:463
int solve(const Vector< T > &b, Vector< T > &u)
Solve linear system Au = b.
Definition superlu_dist.cpp:609
~SuperLUDistSolver()
Destructor. Frees internal LU arrays before LUstructFree.
Definition superlu_dist.cpp:547
void set_A(std::shared_ptr< const SuperLUDistMatrix< T > > A, std::string fact)
Set assembled left-hand side matrix A.
Definition superlu_dist.cpp:564
Forward declare structs to avoid exposing SuperLU_DIST headers.
Definition superlu_dist.h:21
A vector that can be distributed across processes.
Definition Vector.h:50
Fetch the rows of B that correspond to the ghost columns of A.
Definition matmul.h:36
Linear algebra interface.
Definition dolfinx_la.h:7
impl::map< T > map_t
Map scalar type to SuperLU_DIST 'typed' structs.
Definition superlu_dist.h:87
Definition superlu_dist.h:140
void operator()(SuperLUDistStructs::gridinfo_t *g) const noexcept
Deletion of gridinfo_t.
Definition superlu_dist.cpp:316
Definition superlu_dist.h:161
void operator()(SuperLUDistStructs::dLUstruct_t *l) const noexcept
double implementation
Definition superlu_dist.cpp:344
Definition superlu_dist.h:149
void operator()(SuperLUDistStructs::dScalePermstruct_t *s) const noexcept
double implementation
Definition superlu_dist.cpp:323
Definition superlu_dist.h:173
void operator()(SuperLUDistStructs::dSOLVEstruct_t *S) const noexcept
double implementation
Definition superlu_dist.cpp:365
SuperLUDistStructs::superlu_dist_options_t * o
Pointer to options - required for *SOLVEstruct_t cleanup function.
Definition superlu_dist.h:175
Definition superlu_dist.cpp:32
Definition superlu_dist.cpp:293
Definition superlu_dist.cpp:305
Definition superlu_dist.cpp:279
Definition superlu_dist.cpp:269
Definition superlu_dist.cpp:297
Definition superlu_dist.cpp:309
Definition superlu_dist.cpp:284
Definition superlu_dist.cpp:274
Struct holding vector of type int_t.
Definition superlu_dist.cpp:37
Definition superlu_dist.cpp:301
Definition superlu_dist.cpp:313
Definition superlu_dist.cpp:289
Definition superlu_dist.h:92
void operator()(SuperLUDistStructs::SuperMatrix *A) const noexcept
Deletion on SuperMatrix.
Definition superlu_dist.cpp:42