DOLFINx 0.11.0.0
DOLFINx C++ interface
Loading...
Searching...
No Matches
SuperLUDistSolver< T > Class Template Reference

SuperLU_DIST linear solver interface. More...

#include <superlu_dist.h>

Public Member Functions

 SuperLUDistSolver (std::shared_ptr< const SuperLUDistMatrix< T > > A)
 Create solver for a SuperLU_DIST matrix operator.
 SuperLUDistSolver (const SuperLUDistSolver &)=delete
 Copy constructor.
SuperLUDistSolveroperator= (const SuperLUDistSolver &)=delete
 Copy assignment.
void set_option (std::string name, std::string value)
 Set solver option name to value.
void set_options (SuperLUDistStructs::superlu_dist_options_t options)
 Set all solver options (native struct).
void set_A (std::shared_ptr< const SuperLUDistMatrix< T > > A)
 Set assembled left-hand side matrix A.
int solve (const Vector< T > &b, Vector< T > &u) const
 Solve linear system Au = b.

Detailed Description

template<typename T>
class dolfinx::la::SuperLUDistSolver< T >

SuperLU_DIST linear solver interface.

Constructor & Destructor Documentation

◆ SuperLUDistSolver()

template<typename T>
SuperLUDistSolver ( std::shared_ptr< const SuperLUDistMatrix< T > > A)

Create solver for a SuperLU_DIST matrix operator.

Solves linear system Au = b via LU decomposition.

The SuperLU_DIST solver has options set to upstream defaults, except PrintStat (verbose solver output) set to NO.

Template Parameters
TScalar type.
Parameters
AAssembled left-hand side matrix.

Member Function Documentation

◆ set_A()

template<typename T>
void set_A ( std::shared_ptr< const SuperLUDistMatrix< T > > A)

Set assembled left-hand side matrix A.

For advanced use with SuperLU_DIST option Factor allowing use of previously computed permutations when solving with new matrix A.

Parameters
AAssembled left-hand side matrix.

◆ set_option()

template<typename T>
void set_option ( std::string name,
std::string value )

Set solver option name to value.

See SuperLU_DIST User's Guide for option names and values.

Parameters
nameOption name.
valueOption value.

◆ set_options()

template<typename T>
void set_options ( SuperLUDistStructs::superlu_dist_options_t options)

Set all solver options (native struct).

See SuperLU_DIST User's Guide for option names and values.

Callers must complete the forward declared struct, e.g.:

#include <superlu_defs.h>
: public ::superlu_dist_options_t
{
};
set_default_options_dist(&options);
options.PrintStat = YES;
// Setup SuperLUDistSolver
solver.set_options(options);
Parameters
optionsSuperLU_DIST option struct.

◆ solve()

template<typename T>
int solve ( const Vector< T > & b,
la::Vector< T > & u ) const

Solve linear system Au = b.

Parameters
bRight-hand side vector.
uSolution vector, overwritten during solve.
Returns
SuperLU_DIST info integer.
Note
Vectors must have size and parallel layout compatible with A.
The caller must check the return code for success (== 0).
The caller must u.scatter_forward() after the solve.
The values of A are modified in-place during the solve.
To solve with successive right-hand sides the caller must solver.set_options("Factor", "FACTORED") after the first solve.

The documentation for this class was generated from the following files: