Hex: LUft Class Reference

| Hex 2.2 Hydrogen-electron collision solver

Public Member Functions
LUft Class Referenceabstract

LU factorization object. More...

`#include <luft.h>`

Inheritance diagram for LUft:
[legend]

## Public Member Functions

| baseClassRunTimeSelectionDefinitions (LUft,()) LUft()
| Default constructor. More...
virtual | ~LUft ()
| Destructor. More...
virtual void | factorize (CsrMatrix< LU_int_t, Complex > const &matrix, LUftData data=defaultLUftData)=0
| Factorize. More...
virtual bool | valid () const
| Validity indicator. More...
virtual void | drop ()
| Free memory. More...
virtual std::size_t | size () const
| Size of the numerical data. More...
virtual Real | cond () const
| Estimation of the condition number. More...
virtual void | solve (const cArrayView b, cArrayView x, int eqs) const =0
| Solve equations. More...
virtual cArray | solve (const cArrayView b, int eqs=1) const
| Solve equations. More...
virtual void | link (std::string name)
| Link to a disk file. More...
virtual void | unlink ()
| Unlink disk file. More...
virtual std::string | filename () const
| Name of the linked disk file. More...
virtual void | save (std::string name) const =0
| Save factorization object to a disk file. More...
virtual void | save () const
virtual void | load (std::string name, bool throw_on_io_failure=true)=0
| Load factorization object from a disk file. More...
virtual void | load ()
virtual void | silent_load ()

## Detailed Description

This class is returned by the function CsrMatrix::factorize() and it provides some functions that can be used when solving equations with that LU factorization. Also, it is possible to store the decomposition to disk (link, save), destroy the data (drop) and load later when needed (load). The most important function is "solve".

## Constructor & Destructor Documentation

## ◆ ~LUft()

virtual LUft::~LUft | ( |  | ) |

inlinevirtual

## Member Function Documentation

## ◆ baseClassRunTimeSelectionDefinitions()

LUft::baseClassRunTimeSelectionDefinitions | ( | LUft | ,
|  | () |
| ) |  |

inline

## ◆ cond()

virtual Real LUft::cond | ( |  | ) | const

inlinevirtual

Note: Currently implemented only for UMFPACK backend.

Reimplemented in LUft_UMFPACK, and LUft_MUMPS.

## ◆ drop()

virtual void LUft::drop | ( |  | ) |

inlinevirtual

Release memory occupied by the LU-factorization numeric object.

Reimplemented in LUft_MUMPS, LUft_UMFPACK, and LUft_LAPACK.

## ◆ factorize()

virtual void LUft::factorize | ( | CsrMatrix< LU_int_t, Complex > const & | matrix,
|  | LUftData | data = `defaultLUftData`
| ) |  |

pure virtual

Implemented in LUft_UMFPACK, LUft_MUMPS, and LUft_LAPACK.

## ◆ filename()

virtual std::string LUft::filename | ( |  | ) | const

inlinevirtual

## ◆ link()

virtual void LUft::link | ( | std::string | name | ) |

inlinevirtual

This function will set a filename that will be used if any of the functions save or load is used without a specific filename.

## ◆ load() [1/2]

virtual void LUft::load | ( | std::string | name,
|  | bool | throw_on_io_failure = `true`
| ) |  |

pure virtual

Implemented in LUft_MUMPS, LUft_UMFPACK, and LUft_LAPACK.

## ◆ load() [2/2]

virtual void LUft::load | ( |  | ) |

inlinevirtual

## ◆ save() [1/2]

virtual void LUft::save | ( | std::string | name | ) | const

pure virtual

Stores the LU-factorization data to a disk file in the native format of the library used.

Implemented in LUft_MUMPS, LUft_UMFPACK, and LUft_LAPACK.

## ◆ save() [2/2]

virtual void LUft::save | ( |  | ) | const

inlinevirtual

## ◆ silent_load()

virtual void LUft::silent_load | ( |  | ) |

inlinevirtual

## ◆ size()

virtual std::size_t LUft::size | ( |  | ) | const

inlinevirtual

Return the number of bytes occupied by the stored elements of the LU-factorization. This doesn't contain any other structural data.

Reimplemented in LUft_UMFPACK, LUft_MUMPS, and LUft_LAPACK.

## ◆ solve() [1/2]

virtual void LUft::solve | ( | const cArrayView | b,
|  | cArrayView | x,
|  | int | eqs
| ) |  | const

pure virtual

The parameter "b" is assumed to contain several right hand side vectors (their count is supplied as the optional parameter "eqs"). The results are stored in "x", which has the same size as "b".

Implemented in LUft_MUMPS, LUft_UMFPACK, and LUft_LAPACK.

## ◆ solve() [2/2]

virtual cArray LUft::solve | ( | const cArrayView | b,
|  | int | eqs = `1`
| ) |  | const

inlinevirtual

The parameter "b" is assumed to contain several right hand side vectors (their count is supplied as the optional parameter "eqs").

## ◆ unlink()

virtual void LUft::unlink | ( |  | ) |

inlinevirtual

## ◆ valid()

virtual bool LUft::valid | ( |  | ) | const

inlinevirtual

Returns true when the object contains a valid LU factorization.

Reimplemented in LUft_UMFPACK, LUft_MUMPS, and LUft_LAPACK.

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

- src/luft.h