SMG2S
Sparse Matrix Generator with Given Spectrum
SMG2S

This module relates to multiple implementation of SMG2S to generate a non-Symmetric/Hermitian sparse matrix with it. More...

Functions

template<typename T , typename S >
parMatrixSparse< T, S > nonherm (S probSize, Nilpotent< S > nilp, initMat< S > init, std::string spectrum, MPI_Comm comm)
 Generating a non-Hermitian sparse matrix using the spectrum stored in local file. More...
 
template<typename T , typename S >
parMatrixSparse< T, S > nonherm (S probSize, Nilpotent< S > nilp, initMat< S > init, parVector< T, S > spec)
 Generating a non-Hermitian sparse matrix using the spectrum stored in a parVector object. More...
 
template<typename T , typename S >
void nonherm (S probSize, Nilpotent< S > nilp, parMatrixSparse< T, S > *Am, parVector< T, S > spec)
 Generating a non-Hermitian sparse matrix using the spectrum stored in a parVector object and user-provided initial matrix stored in a parMatrixSparse object. More...
 
template<typename T , typename S >
parMatrixSparse< T, S > nonsymm (S probSize, Nilpotent< S > nilp, initMat< S > init, std::string spectrum, MPI_Comm comm)
 Generating a non-Symmetric sparse matrix using the spectrum stored in local file. More...
 
template<typename T , typename S >
parMatrixSparse< T, S > nonsymm (S probSize, Nilpotent< S > nilp, initMat< S > init, parVector< T, S > spec)
 Generating a non-Symmetric sparse matrix using the spectrum stored in a parVector object. More...
 
template<typename T , typename S >
void nonsymm (S probSize, Nilpotent< S > nilp, parMatrixSparse< T, S > *Am, parVector< T, S > spec)
 Generating a non-Symmetric sparse matrix using the spectrum stored in a parVector object and user-provided initial matrix stored in a parMatrixSparse object. More...
 
template<typename T , typename S >
parMatrixSparse< T, S > nonsymmconj (S probSize, Nilpotent< S > nilp, initMat< S > init, parVector< std::complex< T >, S > spec)
 Generating a non-Symmetric sparse matrix using the spectrum stored in a parVector object. More...
 
template<typename T , typename S >
void nonsymmconj (S probSize, Nilpotent< S > nilp, parMatrixSparse< T, S > *Am, parVector< std::complex< T >, S > spec)
 Generating a non-Symmetric sparse matrix using the spectrum stored in a parVector object and user-provided initial matrix stored in a parMatrixSparse object. More...
 

Detailed Description

This module relates to multiple implementation of SMG2S to generate a non-Symmetric/Hermitian sparse matrix with it.

Function Documentation

◆ nonherm() [1/3]

template<typename T , typename S >
parMatrixSparse<T,S> nonherm ( probSize,
Nilpotent< S >  nilp,
initMat< S >  init,
parVector< T, S >  spec 
)

Generating a non-Hermitian sparse matrix using the spectrum stored in a parVector object.

Parameters
[in]probSizerow and column number of the sparse matrix to be generated
[in]nilpa Nilpotent object which determines the nilpotent matrix used by SMG2S
[in]inita initMat object which determines the way of initialization of matrix, which will be further operated by SMG2S
[in]speca parVector object which stores the given spectrum by users
  • The distribution of generated matrix across MPI procs is the same as the one of `spec` which provides the spectrum.

◆ nonherm() [2/3]

template<typename T , typename S >
parMatrixSparse<T,S> nonherm ( probSize,
Nilpotent< S >  nilp,
initMat< S >  init,
std::string  spectrum,
MPI_Comm  comm 
)

Generating a non-Hermitian sparse matrix using the spectrum stored in local file.

Parameters
[in]probSizerow and column number of the sparse matrix to be generated
[in]nilpa Nilpotent object which determines the nilpotent matrix used by SMG2S
[in]inita initMat object which determines the way of initialization of matrix, which will be further operated by SMG2S
[in]spectrumpath and file name of a local file which provides the spectrum
[in]commthe working MPI communicator
  • The distribution of sparse matrix and vector is determined internally by this function. If you can cosider to use your own distribution scheme, please consider other two implementations of SMG2S for non-Hermitian matrix.

◆ nonherm() [3/3]

template<typename T , typename S >
void nonherm ( probSize,
Nilpotent< S >  nilp,
parMatrixSparse< T, S > *  Am,
parVector< T, S >  spec 
)

Generating a non-Hermitian sparse matrix using the spectrum stored in a parVector object and user-provided initial matrix stored in a parMatrixSparse object.

Parameters
[in]probSizerow and column number of the sparse matrix to be generated
[in]nilpa Nilpotent object which determines the nilpotent matrix used by SMG2S
[in]Ama parMatrixSparse provided by the users as a initial matrix of SMG2S, it can only be any sparse lower-triangular matrix
[in]speca parVector object which stores the given spectrum by users
[out]Amfor the output, it is overwritten by the generated non-Hermtian matrix
  • The distribution of generated matrix across MPI procs is the same as the one of `spec` which provides the spectrum.
  • The distribution scheme of `Am` and `spec` should be the same.

◆ nonsymm() [1/3]

template<typename T , typename S >
parMatrixSparse<T,S> nonsymm ( probSize,
Nilpotent< S >  nilp,
initMat< S >  init,
parVector< T, S >  spec 
)

Generating a non-Symmetric sparse matrix using the spectrum stored in a parVector object.

Parameters
[in]probSizerow and column number of the sparse matrix to be generated
[in]nilpa Nilpotent object which determines the nilpotent matrix used by SMG2S
[in]inita initMat object which determines the way of initialization of matrix, which will be further operated by SMG2S
[in]speca parVector object which stores the given spectrum by users
  • The distribution of generated matrix across MPI procs is the same as the one of `spec` which provides the spectrum.
  • It works only with eigenvalues in real.

◆ nonsymm() [2/3]

template<typename T , typename S >
parMatrixSparse<T,S> nonsymm ( probSize,
Nilpotent< S >  nilp,
initMat< S >  init,
std::string  spectrum,
MPI_Comm  comm 
)

Generating a non-Symmetric sparse matrix using the spectrum stored in local file.

Parameters
[in]probSizerow and column number of the sparse matrix to be generated
[in]nilpa Nilpotent object which determines the nilpotent matrix used by SMG2S
[in]inita initMat object which determines the way of initialization of matrix, which will be further operated by SMG2S
[in]spectrumpath and file name of a local file which provides the spectrum
[in]commthe working MPI communicator
  • The distribution of sparse matrix and vector is determined internally by this function. If you can cosider to use your own distribution scheme, please consider other two implementations of SMG2S for non-Hermitian matrix.
  • It can manage both the case with eigenvalues in real and the case with conjugate eigenvalues. The function will internally check whhich type of spectrum is provided in the local file

◆ nonsymm() [3/3]

template<typename T , typename S >
void nonsymm ( probSize,
Nilpotent< S >  nilp,
parMatrixSparse< T, S > *  Am,
parVector< T, S >  spec 
)

Generating a non-Symmetric sparse matrix using the spectrum stored in a parVector object and user-provided initial matrix stored in a parMatrixSparse object.

Parameters
[in]probSizerow and column number of the sparse matrix to be generated
[in]nilpa Nilpotent object which determines the nilpotent matrix used by SMG2S
[in]Ama parMatrixSparse provided by the users as a initial matrix of SMG2S, it can only be any sparse lower-triangular matrix
[in]speca parVector object which stores the given spectrum by users
[out]Amfor the output, it is overwritten by the generated matrix
  • The distribution of generated matrix across MPI procs is the same as the one of `spec` which provides the spectrum.
  • The distribution scheme of `Am` and `spec` should be the same.
  • It works only with eigenvalues in real.

◆ nonsymmconj() [1/2]

template<typename T , typename S >
parMatrixSparse<T,S> nonsymmconj ( probSize,
Nilpotent< S >  nilp,
initMat< S >  init,
parVector< std::complex< T >, S >  spec 
)

Generating a non-Symmetric sparse matrix using the spectrum stored in a parVector object.

Parameters
[in]probSizerow and column number of the sparse matrix to be generated
[in]nilpa Nilpotent object which determines the nilpotent matrix used by SMG2S
[in]inita initMat object which determines the way of initialization of matrix, which will be further operated by SMG2S
[in]speca parVector object which stores the given spectrum by users
  • The distribution of generated matrix across MPI procs is the same as the one of `spec` which provides the spectrum.
  • It targets the case with conjugate eigenvalues.

◆ nonsymmconj() [2/2]

template<typename T , typename S >
void nonsymmconj ( probSize,
Nilpotent< S >  nilp,
parMatrixSparse< T, S > *  Am,
parVector< std::complex< T >, S >  spec 
)

Generating a non-Symmetric sparse matrix using the spectrum stored in a parVector object and user-provided initial matrix stored in a parMatrixSparse object.

Parameters
[in]probSizerow and column number of the sparse matrix to be generated
[in]nilpa Nilpotent object which determines the nilpotent matrix used by SMG2S
[in]Ama parMatrixSparse provided by the users as a initial matrix of SMG2S, it can only be any sparse lower-triangular matrix
[in]speca parVector object which stores the given spectrum by users
[out]Amfor the output, it is overwritten by the generated matrix
  • The distribution of generated matrix across MPI procs is the same as the one of `spec` which provides the spectrum.
  • The distribution scheme of `Am` and `spec` should be the same.
  • It targets the case with conjugate eigenvalues.