Class xlifepp::HMatrix#
-
template<typename T, typename I>
class HMatrix#
-
Inheritence diagram for xlifepp::HMatrix:
Collaboration diagram for xlifepp::HMatrix:
describes a matrix represented by a hierarchical structure (tree), each node being a block matrix a leaf is either a standard matrix or an approximate matrix
Public Functions
-
HMatrix(ClusterTree<I>&, ClusterTree<I>&, number_t, number_t, number_t = 0, const string_t& = "", SymType = _noSymmetry, HMatrixMethod = _standardHM, HMAdmissibilityRule = _boxesRule, real_t = 1)#
-
main constructor
-
void addFELargeMatrix(const LargeMatrix<T>&)#
-
add FE LargeMatrix to current HMatrix
-
void buildTree()#
-
build the tree
-
inline HMatrixNode<T, I> *child(number_t d = 1)#
-
access to child at depth d
-
void clear()#
-
clear all and deallocate matrix pointers
-
inline void clearMatrices()#
-
clear matrices
-
inline const ClusterTree<I> *colTree() const#
-
access to col cluster tree pointer
-
std::list<HMatrixNode<T, I>*> getLeaves(AccessType, number_t, number_t&, bool = true) const#
-
get all leaves ordered by row/col to avoid data races
-
std::list<HMatrixNode<T, I>*> getLeaves(bool = true) const#
-
get all leaves
-
void initCounter(number_t n = 0)#
-
initialize internal counter of HMatrixNode<T,I> for counting some operations
-
void load(const LargeMatrix<T>&, HMApproximationMethod = _noHMApproximation)#
-
load Hmatrix<T> from LargeMatrix<T>
-
void lu()#
-
LU Factorization.
-
std::vector<T> &multMatrixVector(const std::vector<T>&, std::vector<T>&) const#
-
matrix vector product (recursive)
Hmatrix * Vector.
-
std::vector<T> &multMatrixVectorOmp(const std::vector<T>&, std::vector<T>&) const#
-
matrix vector product (non recursive-omp)
-
real_t norm2() const#
-
Frobenius norm.
-
real_t norminfty() const#
-
infinite norm
-
void printStructure(std::ostream&, bool all = false, bool shift = false) const#
-
print matrix structure
-
inline HMatrixNode<T, I> *root()#
-
access to root node
-
inline const ClusterTree<I> *rowTree() const#
-
access to row cluster tree pointer
-
void saveStructureToFile(const string_t&) const#
-
save matrix structure to file
-
void setClusterCol(ClusterTree<I>*)#
-
change the col ClusterTree pointer
-
void setClusterRow(ClusterTree<I>*)#
-
change the row ClusterTree pointer
-
void stopCounter()#
-
stop internal counter of HMatrixNode<T,I>
-
LargeMatrix<T> toLargeMatrix(StorageType st = _dense, AccessType at = _row) const#
-
convert HMatrix to LargeMatrix
-
void updateInfo()#
-
update tree info (depth, number of nodes, …)
Public Members
-
HMAdmissibilityRule admRule_#
-
block admissible rule
-
real_t eta_#
-
ratio in the criteria diam(Br) < 2*eta*dist(Br,Bc) (default eta = 1)
-
FactorizationType factorization_#
-
one of _noFactorization, _lu, _ldlt, _ldlstar; default is _noFactorization
-
HMatrixMethod method_#
-
method to define admissible block
-
string_t name#
-
optional name, useful for documentation
-
HMatrix(ClusterTree<I>&, ClusterTree<I>&, number_t, number_t, number_t = 0, const string_t& = "", SymType = _noSymmetry, HMatrixMethod = _standardHM, HMAdmissibilityRule = _boxesRule, real_t = 1)#