Project
Loading...
Searching...
No Matches
o2::fwdalign::MinResSolve Class Reference

for solving large system of linear equations More...

#include <MinResSolve.h>

Inherits TObject.

Public Types

enum  { kPreconBD = 1 , kPreconILU0 = 100 , kPreconILU10 = kPreconILU0 + 10 , kPreconsTot }
 
enum  { kSolMinRes , kSolFGMRes , kNSolvers }
 

Public Member Functions

 MinResSolve ()
 default constructor
 
 MinResSolve (const MatrixSq *mat, const TVectorD *rhs)
 copy accepting equation
 
 MinResSolve (const MatrixSq *mat, const double *rhs)
 copy accepting equation
 
 MinResSolve (const MinResSolve &src)
 copy constructor
 
 ~MinResSolve () override
 destructor
 
MinResSolveoperator= (const MinResSolve &rhs)
 assignment op.
 
Bool_t SolveMinRes (Double_t *VecSol, Int_t precon=0, int itnlim=2000, double rtol=1e-12)
 MINRES method (for symmetric matrices)
 
Bool_t SolveMinRes (TVectorD &VecSol, Int_t precon=0, int itnlim=2000, double rtol=1e-12)
 MINRES method (for symmetric matrices)
 
Bool_t SolveFGMRES (Double_t *VecSol, Int_t precon=0, int itnlim=2000, double rtol=1e-12, int nkrylov=60)
 FGMRES method (for general symmetric matrices)
 
Bool_t SolveFGMRES (TVectorD &VecSol, Int_t precon=0, int itnlim=2000, double rtol=1e-12, int nkrylov=60)
 FGMRES method (for general symmetric matrices)
 
Bool_t InitAuxMinRes ()
 init auxiliary space for MinRes
 
Bool_t InitAuxFGMRES (int nkrylov)
 init auxiliary space for fgmres
 
void ApplyPrecon (const TVectorD &vecRHS, TVectorD &vecOut) const
 apply precond.
 
void ApplyPrecon (const double *vecRHS, double *vecOut) const
 Application of preconditioner matrix: implicitly defines the matrix solving the M*VecOut = VecRHS.
 
Int_t BuildPrecon (Int_t val=0)
 preconditioner building
 
Int_t GetPrecon () const
 
void ClearAux ()
 clear aux. space
 
Int_t BuildPreconBD (Int_t hwidth)
 build Band-Diagonal preconditioner
 
Int_t BuildPreconILUK (Int_t lofM)
 ILUK preconditioner.
 
Int_t BuildPreconILUKDense (Int_t lofM)
 ILUK preconditioner.
 
Int_t PreconILUKsymb (Int_t lofM)
 ILUK preconditioner.
 
Int_t PreconILUKsymbDense (Int_t lofM)
 ILUK preconditioner.
 

Protected Member Functions

 ClassDefOverride (MinResSolve, 0)
 

Protected Attributes

Int_t fSize
 dimension of the input matrix
 
Int_t fPrecon
 preconditioner type
 
MatrixSqfMatrix
 matrix defining the equations
 
Double_t * fRHS
 right hand side
 
Double_t * fPVecY
 aux. space
 
Double_t * fPVecR1
 
Double_t * fPVecR2
 
Double_t * fPVecV
 
Double_t * fPVecW
 
Double_t * fPVecW1
 
Double_t * fPVecW2
 
Double_t ** fPvv
 
Double_t ** fPvz
 
Double_t ** fPhh
 
Double_t * fDiagLU
 
MatrixSparsefMatL
 
MatrixSparsefMatU
 
SymBDMatrixfMatBD
 

Detailed Description

for solving large system of linear equations

Includes MINRES, FGMRES methods as well as a few precondiotiong methods

Definition at line 36 of file MinResSolve.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kPreconBD 
kPreconILU0 
kPreconILU10 
kPreconsTot 

Definition at line 40 of file MinResSolve.h.

◆ anonymous enum

anonymous enum
Enumerator
kSolMinRes 
kSolFGMRes 
kNSolvers 

Definition at line 44 of file MinResSolve.h.

Constructor & Destructor Documentation

◆ MinResSolve() [1/4]

MinResSolve::MinResSolve ( )

default constructor

Definition at line 29 of file MinResSolve.cxx.

◆ MinResSolve() [2/4]

MinResSolve::MinResSolve ( const MatrixSq mat,
const TVectorD *  rhs 
)

copy accepting equation

Definition at line 76 of file MinResSolve.cxx.

◆ MinResSolve() [3/4]

MinResSolve::MinResSolve ( const MatrixSq mat,
const double *  rhs 
)

copy accepting equation

Definition at line 99 of file MinResSolve.cxx.

◆ MinResSolve() [4/4]

MinResSolve::MinResSolve ( const MinResSolve src)

copy constructor

Definition at line 52 of file MinResSolve.cxx.

◆ ~MinResSolve()

MinResSolve::~MinResSolve ( )
override

destructor

Definition at line 122 of file MinResSolve.cxx.

Member Function Documentation

◆ ApplyPrecon() [1/2]

void MinResSolve::ApplyPrecon ( const double *  vecRHS,
double *  vecOut 
) const

Application of preconditioner matrix: implicitly defines the matrix solving the M*VecOut = VecRHS.

Definition at line 659 of file MinResSolve.cxx.

◆ ApplyPrecon() [2/2]

void MinResSolve::ApplyPrecon ( const TVectorD &  vecRHS,
TVectorD &  vecOut 
) const

apply precond.

Definition at line 652 of file MinResSolve.cxx.

◆ BuildPrecon()

Int_t MinResSolve::BuildPrecon ( Int_t  val = 0)

preconditioner building

Definition at line 140 of file MinResSolve.cxx.

◆ BuildPreconBD()

Int_t MinResSolve::BuildPreconBD ( Int_t  hwidth)

build Band-Diagonal preconditioner

Definition at line 776 of file MinResSolve.cxx.

◆ BuildPreconILUK()

Int_t MinResSolve::BuildPreconILUK ( Int_t  lofM)

ILUK preconditioner.

Definition at line 810 of file MinResSolve.cxx.

◆ BuildPreconILUKDense()

Int_t MinResSolve::BuildPreconILUKDense ( Int_t  lofM)

ILUK preconditioner.

Definition at line 945 of file MinResSolve.cxx.

◆ ClassDefOverride()

o2::fwdalign::MinResSolve::ClassDefOverride ( MinResSolve  ,
 
)
protected

◆ ClearAux()

void MinResSolve::ClearAux ( )

clear aux. space

Definition at line 727 of file MinResSolve.cxx.

◆ GetPrecon()

Int_t o2::fwdalign::MinResSolve::GetPrecon ( ) const
inline

Definition at line 94 of file MinResSolve.h.

◆ InitAuxFGMRES()

Bool_t MinResSolve::InitAuxFGMRES ( int  nkrylov)

init auxiliary space for fgmres

Definition at line 706 of file MinResSolve.cxx.

◆ InitAuxMinRes()

Bool_t MinResSolve::InitAuxMinRes ( )

init auxiliary space for MinRes

Definition at line 689 of file MinResSolve.cxx.

◆ operator=()

MinResSolve & MinResSolve::operator= ( const MinResSolve rhs)

assignment op.

Definition at line 128 of file MinResSolve.cxx.

◆ PreconILUKsymb()

Int_t MinResSolve::PreconILUKsymb ( Int_t  lofM)

ILUK preconditioner.

Definition at line 1065 of file MinResSolve.cxx.

◆ PreconILUKsymbDense()

Int_t MinResSolve::PreconILUKsymbDense ( Int_t  lofM)

ILUK preconditioner.

Definition at line 1214 of file MinResSolve.cxx.

◆ SolveFGMRES() [1/2]

Bool_t o2::fwdalign::MinResSolve::SolveFGMRES ( Double_t *  VecSol,
Int_t  precon = 0,
int  itnlim = 2000,
double  rtol = 1e-12,
int  nkrylov = 60 
)

FGMRES method (for general symmetric matrices)

◆ SolveFGMRES() [2/2]

Bool_t MinResSolve::SolveFGMRES ( TVectorD &  VecSol,
Int_t  precon = 0,
int  itnlim = 2000,
double  rtol = 1e-12,
int  nkrylov = 60 
)

FGMRES method (for general symmetric matrices)

Definition at line 160 of file MinResSolve.cxx.

◆ SolveMinRes() [1/2]

Bool_t o2::fwdalign::MinResSolve::SolveMinRes ( Double_t *  VecSol,
Int_t  precon = 0,
int  itnlim = 2000,
double  rtol = 1e-12 
)

MINRES method (for symmetric matrices)

◆ SolveMinRes() [2/2]

Bool_t MinResSolve::SolveMinRes ( TVectorD &  VecSol,
Int_t  precon = 0,
int  itnlim = 2000,
double  rtol = 1e-12 
)

MINRES method (for symmetric matrices)

Definition at line 361 of file MinResSolve.cxx.

Member Data Documentation

◆ fDiagLU

Double_t* o2::fwdalign::MinResSolve::fDiagLU
protected

Definition at line 130 of file MinResSolve.h.

◆ fMatBD

SymBDMatrix* o2::fwdalign::MinResSolve::fMatBD
protected

Definition at line 133 of file MinResSolve.h.

◆ fMatL

MatrixSparse* o2::fwdalign::MinResSolve::fMatL
protected

Definition at line 131 of file MinResSolve.h.

◆ fMatrix

MatrixSq* o2::fwdalign::MinResSolve::fMatrix
protected

matrix defining the equations

Definition at line 117 of file MinResSolve.h.

◆ fMatU

MatrixSparse* o2::fwdalign::MinResSolve::fMatU
protected

Definition at line 132 of file MinResSolve.h.

◆ fPhh

Double_t** o2::fwdalign::MinResSolve::fPhh
protected

Definition at line 129 of file MinResSolve.h.

◆ fPrecon

Int_t o2::fwdalign::MinResSolve::fPrecon
protected

preconditioner type

Definition at line 116 of file MinResSolve.h.

◆ fPVecR1

Double_t* o2::fwdalign::MinResSolve::fPVecR1
protected

Definition at line 121 of file MinResSolve.h.

◆ fPVecR2

Double_t* o2::fwdalign::MinResSolve::fPVecR2
protected

Definition at line 122 of file MinResSolve.h.

◆ fPVecV

Double_t* o2::fwdalign::MinResSolve::fPVecV
protected

Definition at line 123 of file MinResSolve.h.

◆ fPVecW

Double_t* o2::fwdalign::MinResSolve::fPVecW
protected

Definition at line 124 of file MinResSolve.h.

◆ fPVecW1

Double_t* o2::fwdalign::MinResSolve::fPVecW1
protected

Definition at line 125 of file MinResSolve.h.

◆ fPVecW2

Double_t* o2::fwdalign::MinResSolve::fPVecW2
protected

Definition at line 126 of file MinResSolve.h.

◆ fPVecY

Double_t* o2::fwdalign::MinResSolve::fPVecY
protected

aux. space

Definition at line 120 of file MinResSolve.h.

◆ fPvv

Double_t** o2::fwdalign::MinResSolve::fPvv
protected

Definition at line 127 of file MinResSolve.h.

◆ fPvz

Double_t** o2::fwdalign::MinResSolve::fPvz
protected

Definition at line 128 of file MinResSolve.h.

◆ fRHS

Double_t* o2::fwdalign::MinResSolve::fRHS
protected

right hand side

Definition at line 118 of file MinResSolve.h.

◆ fSize

Int_t o2::fwdalign::MinResSolve::fSize
protected

dimension of the input matrix

Definition at line 115 of file MinResSolve.h.


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