Hex  2.2
Hydrogen-electron collision solver
Public Member Functions | Protected Attributes
NoPreconditioner Class Reference

Solution driver without actual preconditioner. More...

#include <NoPreconditioner.h>

Inheritance diagram for NoPreconditioner:
Inheritance graph
[legend]
Collaboration diagram for NoPreconditioner:
Collaboration graph
[legend]

Public Member Functions

 preconditionerRunTimeSelectionDefinitions (NoPreconditioner, "none") NoPreconditioner()
 
 NoPreconditioner (CommandLine const &cmd, InputFile const &inp, Parallel const &par, AngularBasis const &ang, Bspline const &bspline_inner, Bspline const &bspline_full, Bspline const &bspline_panel_x, Bspline const &bspline_panel_y)
 
 ~NoPreconditioner ()
 
virtual std::string description () const
 Description of the preconditioner. More...
 
virtual void setup ()
 Initialize the preconditioner. More...
 
virtual void update (Real E)
 Update the preconditioner for the next energy. More...
 
virtual std::pair< int, int > bstates (Real E, int l1, int l2) const
 Get the number of allowed bound states. More...
 
virtual void finish ()
 Clean up memory etc. More...
 
virtual void rhs (BlockArray< Complex > &chi, int ienergy, int instate) const
 Calculate the right-hand side. More...
 
virtual void multiply (BlockArray< Complex > const &p, BlockArray< Complex > &q, MatrixSelection::Selection tri=MatrixSelection::Both) const
 Multiply by the matrix equation. More...
 
virtual void precondition (BlockArray< Complex > const &r, BlockArray< Complex > &z) const
 Precondition the equation. More...
 
BlockSymBandMatrix< Complex > calc_A_block (int ill, int illp, bool twoel=true) const
 
RadialIntegrals const & rad_inner () const
 
RadialIntegrals const & rad_full () const
 
RadialIntegrals const & rad_panel () const
 
- Public Member Functions inherited from PreconditionerBase
 baseClassRunTimeSelectionDefinitions (PreconditionerBase,(CommandLine const &cmd, InputFile const &inp, Parallel const &par, AngularBasis const &ang, Bspline const &bspline_inner, Bspline const &bspline_full, Bspline const &bspline_panel_x, Bspline const &bspline_panel_y)) PreconditionerBase()
 Dummy default constructor needed by the run-time selection. More...
 
virtual ~PreconditionerBase ()
 Virtual destructor. More...
 
virtual void verbose (bool b)
 Set verbosity level. More...
 

Protected Attributes

Real E_
 
CommandLine const * cmd_
 
Parallel const * par_
 
InputFile const * inp_
 
AngularBasis const * ang_
 
std::vector< BlockSymBandMatrix< Complex > > A_blocks_
 
std::vector< std::vector< SymBandMatrix< Complex > > > B1_blocks_
 
std::vector< std::vector< SymBandMatrix< Complex > > > B2_blocks_
 
std::vector< CooMatrix< LU_int_t, Complex > > Cu_blocks_
 
std::vector< CooMatrix< LU_int_t, Complex > > Cl_blocks_
 
std::vector< BlockSymBandMatrix< Complex > > E_blocks_
 
std::vector< CooMatrix< LU_int_t, Complex > > Fu_blocks_
 
std::vector< CooMatrix< LU_int_t, Complex > > Fl_blocks_
 
int max_n_
 
std::vector< std::pair< int, int > > Nchan_
 
RadialIntegralsrad_inner_
 
RadialIntegralsrad_full_
 
RadialIntegralsrad_panel_
 
std::array< Array< cArrays >, 2 > Xp_
 
std::array< Array< cArrays >, 2 > Sp_
 
std::array< cArrays, 2 > Eb_
 
std::array< std::vector< HlData >, 2 > Hl_
 
std::shared_ptr< LUftluS_
 
- Protected Attributes inherited from PreconditionerBase
bool verbose_
 

Detailed Description

This class "preconditions" by identity matrix, but implements all other important routines, that can be used by derived classes, namely:

Constructor & Destructor Documentation

◆ NoPreconditioner()

NoPreconditioner::NoPreconditioner ( CommandLine const &  cmd,
InputFile const &  inp,
Parallel const &  par,
AngularBasis const &  ang,
Bspline const &  bspline_inner,
Bspline const &  bspline_full,
Bspline const &  bspline_panel_x,
Bspline const &  bspline_panel_y 
)

◆ ~NoPreconditioner()

NoPreconditioner::~NoPreconditioner ( )

Member Function Documentation

◆ bstates()

std::pair< int, int > NoPreconditioner::bstates ( Real  E,
int  l1,
int  l2 
) const
virtual

Returns the number of energetically allowed bound states of the first and second particle with specific angular momenta. This is necessary because it determines the size of the solution vector.

This function can be called only after a call to the setup function, where it is assumed that the initialization of these numbers takes place.

The energy is in Ry.

Reimplemented from PreconditionerBase.

◆ calc_A_block()

BlockSymBandMatrix< Complex > NoPreconditioner::calc_A_block ( int  ill,
int  illp,
bool  twoel = true 
) const

◆ description()

std::string NoPreconditioner::description ( ) const
virtual

◆ finish()

void NoPreconditioner::finish ( )
virtual

This function is called when the preconditioner will no longer be used to release resources. To re-enable the same preconditioner then would require a new call to setup.

Reimplemented from PreconditionerBase.

Reimplemented in GPUCGPreconditioner, KPACGPreconditioner, HybCGPreconditioner, DOMPreconditioner, ILUCGPreconditioner, CGPreconditioner, and CoupledPreconditioner.

◆ multiply()

void NoPreconditioner::multiply ( BlockArray< Complex > const &  p,
BlockArray< Complex > &  q,
MatrixSelection::Selection  tri = MatrixSelection::Both 
) const
virtual

This function implements matrix multiplication by the matrix of the set of equations that is to be solved.

Reimplemented from PreconditionerBase.

Reimplemented in GPUCGPreconditioner.

◆ precondition()

void NoPreconditioner::precondition ( BlockArray< Complex > const &  r,
BlockArray< Complex > &  z 
) const
virtual

This function preconditions the equation, solving the preconditioner equation

\[ \mathbf{M}\mathbf{z} = \mathbf{r} \ . \]

It may use the MPI environment.

Reimplemented from PreconditionerBase.

Reimplemented in GPUCGPreconditioner, DOMPreconditioner, CGPreconditioner, GMGPreconditioner, and CoupledPreconditioner.

◆ preconditionerRunTimeSelectionDefinitions()

NoPreconditioner::preconditionerRunTimeSelectionDefinitions ( NoPreconditioner  ,
"none"   
)

◆ rad_full()

RadialIntegrals const& NoPreconditioner::rad_full ( ) const
inline

◆ rad_inner()

RadialIntegrals const& NoPreconditioner::rad_inner ( ) const
inline

◆ rad_panel()

RadialIntegrals const& NoPreconditioner::rad_panel ( ) const
inline

◆ rhs()

void NoPreconditioner::rhs ( BlockArray< Complex > &  chi,
int  ie,
int  instate 
) const
virtual

Reimplemented from PreconditionerBase.

◆ setup()

void NoPreconditioner::setup ( )
virtual

This function contains all computation intensive preparations for the preconditioner, e.g. computation of radial integrals. It may use only SMP environment.

Reimplemented from PreconditionerBase.

Reimplemented in GPUCGPreconditioner, KPACGPreconditioner, HybCGPreconditioner, DOMPreconditioner, ILUCGPreconditioner, and GMGPreconditioner.

◆ update()

void NoPreconditioner::update ( Real  E)
virtual

This function updates the preconditioner for another right hand side. It may use the MPI environment. The energy is in Ry.

Reimplemented from PreconditionerBase.

Reimplemented in HybCGPreconditioner, DOMPreconditioner, ILUCGPreconditioner, GMGPreconditioner, and CoupledPreconditioner.

Field Documentation

◆ A_blocks_

std::vector<BlockSymBandMatrix<Complex> > NoPreconditioner::A_blocks_
protected

◆ ang_

AngularBasis const* NoPreconditioner::ang_
protected

◆ B1_blocks_

std::vector<std::vector<SymBandMatrix<Complex> > > NoPreconditioner::B1_blocks_
protected

◆ B2_blocks_

std::vector<std::vector<SymBandMatrix<Complex> > > NoPreconditioner::B2_blocks_
protected

◆ Cl_blocks_

std::vector<CooMatrix<LU_int_t,Complex> > NoPreconditioner::Cl_blocks_
protected

◆ cmd_

CommandLine const* NoPreconditioner::cmd_
protected

◆ Cu_blocks_

std::vector<CooMatrix<LU_int_t,Complex> > NoPreconditioner::Cu_blocks_
protected

◆ E_

Real NoPreconditioner::E_
protected

◆ E_blocks_

std::vector<BlockSymBandMatrix<Complex> > NoPreconditioner::E_blocks_
protected

◆ Eb_

std::array<cArrays,2> NoPreconditioner::Eb_
protected

◆ Fl_blocks_

std::vector<CooMatrix<LU_int_t,Complex> > NoPreconditioner::Fl_blocks_
protected

◆ Fu_blocks_

std::vector<CooMatrix<LU_int_t,Complex> > NoPreconditioner::Fu_blocks_
protected

◆ Hl_

std::array<std::vector<HlData>,2> NoPreconditioner::Hl_
mutableprotected

◆ inp_

InputFile const* NoPreconditioner::inp_
protected

◆ luS_

std::shared_ptr<LUft> NoPreconditioner::luS_
protected

◆ max_n_

int NoPreconditioner::max_n_
protected

◆ Nchan_

std::vector<std::pair<int,int> > NoPreconditioner::Nchan_
protected

◆ par_

Parallel const* NoPreconditioner::par_
protected

◆ rad_full_

RadialIntegrals * NoPreconditioner::rad_full_
protected

◆ rad_inner_

RadialIntegrals* NoPreconditioner::rad_inner_
protected

◆ rad_panel_

RadialIntegrals * NoPreconditioner::rad_panel_
protected

◆ Sp_

std::array<Array<cArrays>,2> NoPreconditioner::Sp_
protected

◆ Xp_

std::array<Array<cArrays>,2> NoPreconditioner::Xp_
protected

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