Documentation 6b54b78464
Loading...
Searching...
No Matches
CPastixWrapper< ScalarType > Class Template Reference

Wrapper class that converts between SU2 sparse format and PaStiX format and simplifies calls to the external solver. More...

#include <CPastixWrapper.hpp>

Inheritance diagram for CPastixWrapper< ScalarType >:
[legend]

Public Member Functions

 CPastixWrapper ()=default
 
 CPastixWrapper (CPastixWrapper &&)=delete
 
 CPastixWrapper (const CPastixWrapper &)=delete
 
CPastixWrapper & operator= (CPastixWrapper &&)=delete
 
CPastixWrapper & operator= (const CPastixWrapper &)=delete
 
 ~CPastixWrapper ()
 Class destructor.
 
bool IsSetup () const
 Returns true once SetLDU has been called.
 
void SetLDU (unsigned long nVar, unsigned long nPoint, unsigned long nPointDomain, const su2uint *row_ptr_l, const su2uint *col_ind_l, const su2uint *row_ptr_u, const su2uint *col_ind_u, const ScalarType *d, const ScalarType *l, const ScalarType *u)
 Set LDU structure and value pointers; builds and owns assembled CSR (called once).
 
void Factorize (CGeometry *geometry, const CConfig *config, unsigned short kind_fact)
 Factorize matrix.
 
void SetTransposedSolve (bool transposed=true)
 Request solves with the transposed matrix.
 
template<class T >
void Solve (const T &rhs, T &sol)
 Runs the "solve" task for any rhs/sol with operator [].
 

Detailed Description

template<class ScalarType>
class CPastixWrapper< ScalarType >

Wrapper class that converts between SU2 sparse format and PaStiX format and simplifies calls to the external solver.

Constructor & Destructor Documentation

◆ CPastixWrapper() [1/3]

template<class ScalarType >
CPastixWrapper< ScalarType >::CPastixWrapper ( )
default

◆ CPastixWrapper() [2/3]

template<class ScalarType >
CPastixWrapper< ScalarType >::CPastixWrapper ( CPastixWrapper< ScalarType > &&  )
delete

◆ CPastixWrapper() [3/3]

template<class ScalarType >
CPastixWrapper< ScalarType >::CPastixWrapper ( const CPastixWrapper< ScalarType > &  )
delete

◆ ~CPastixWrapper()

template<class ScalarType >
CPastixWrapper< ScalarType >::~CPastixWrapper ( )
inline

Class destructor.

Member Function Documentation

◆ Factorize()

template<class ScalarType >
void CPastixWrapper< ScalarType >::Factorize ( CGeometry *  geometry,
const CConfig *  config,
unsigned short  kind_fact 
)

Factorize matrix.

Parameters
[in]geometry- Geometrical definition of the problem.
[in]config- Definition of the particular problem.
[in]kind_fact- Type of factorization.

◆ IsSetup()

template<class ScalarType >
bool CPastixWrapper< ScalarType >::IsSetup ( ) const
inline

Returns true once SetLDU has been called.

◆ operator=() [1/2]

template<class ScalarType >
CPastixWrapper & CPastixWrapper< ScalarType >::operator= ( const CPastixWrapper< ScalarType > &  )
delete

◆ operator=() [2/2]

template<class ScalarType >
CPastixWrapper & CPastixWrapper< ScalarType >::operator= ( CPastixWrapper< ScalarType > &&  )
delete

◆ SetLDU()

template<class ScalarType >
void CPastixWrapper< ScalarType >::SetLDU ( unsigned long  nVar,
unsigned long  nPoint,
unsigned long  nPointDomain,
const su2uint *  row_ptr_l,
const su2uint *  col_ind_l,
const su2uint *  row_ptr_u,
const su2uint *  col_ind_u,
const ScalarType *  d,
const ScalarType *  l,
const ScalarType *  u 
)
inline

Set LDU structure and value pointers; builds and owns assembled CSR (called once).

Parameters
[in]nVar- DOF per point (square blocks: nVar x nVar).
[in]nPoint- Total number of points including halos.
[in]nPointDomain- Number of internal points (domain rows).
[in]row_ptr_l/u- LDU lower/upper row pointers (geometry-owned, must outlive wrapper).
[in]col_ind_l/u- LDU lower/upper column indices (geometry-owned).
[in]d/l/u- LDU value blocks (matrix-owned, must outlive wrapper).

◆ SetTransposedSolve()

template<class ScalarType >
void CPastixWrapper< ScalarType >::SetTransposedSolve ( bool  transposed = true)
inline

Request solves with the transposed matrix.

Parameters
[in]transposed- Yes or no.

◆ Solve()

template<class ScalarType >
template<class T >
void CPastixWrapper< ScalarType >::Solve ( const T &  rhs,
T &  sol 
)
inline

Runs the "solve" task for any rhs/sol with operator [].

Parameters
[in]rhs- Right hand side of the linear system.
[out]sol- Solution of the system.

Member Data Documentation

◆ blkSz

template<class ScalarType >
unsigned long CPastixWrapper< ScalarType >::blkSz = 0

Block size (nVar * nVar) for value assembly.

◆ d

template<class ScalarType >
const ScalarType* CPastixWrapper< ScalarType >::d = nullptr

Diagonal blocks (matrix-owned).

◆ l

template<class ScalarType >
const ScalarType* CPastixWrapper< ScalarType >::l = nullptr

Lower blocks (matrix-owned).

◆ nPoint

template<class ScalarType >
unsigned long CPastixWrapper< ScalarType >::nPoint = 0

◆ nPointDomain

template<class ScalarType >
unsigned long CPastixWrapper< ScalarType >::nPointDomain = 0

◆ nVar

template<class ScalarType >
unsigned long CPastixWrapper< ScalarType >::nVar = 0

◆ row_ptr_l

template<class ScalarType >
const su2uint* CPastixWrapper< ScalarType >::row_ptr_l = nullptr

LDU lower row pointers (geometry-owned).

◆ row_ptr_u

template<class ScalarType >
const su2uint* CPastixWrapper< ScalarType >::row_ptr_u = nullptr

LDU upper row pointers (geometry-owned).

◆ u

template<class ScalarType >
const ScalarType* CPastixWrapper< ScalarType >::u = nullptr

Upper blocks (matrix-owned).


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