Commit ed653ee0 authored by MIJIEUX Thomas's avatar MIJIEUX Thomas

Rename class with constant naming scheme

parent 8879b360
......@@ -2,7 +2,7 @@
#define FABULOUS_ARNOLDI_HPP
namespace fabulous {
template<template<class> class HESSENBERG, class S > class Arnoldi;
template<template<class> class HESSENBERG, class S > class ArnoldiDR;
};
#include "fabulous/data/Base.hpp"
......@@ -23,11 +23,11 @@ namespace fabulous {
*
* This class support DeflatedRestarting
*/
template<template<class> class HESSENBERG, class S > class Arnoldi
template<template<class> class HESSENBERG, class S > class ArnoldiDR
{
static_assert(
arnoldiXhessenberg<fabulous::Arnoldi, HESSENBERG>::value,
"Arnoldi cannot be combined with this Hessenberg"
arnoldiXhessenberg<fabulous::ArnoldiDR, HESSENBERG>::value,
"ArnoldiDR cannot be combined with this Hessenberg"
);
public:
using value_type = typename Arithmetik<S>::value_type;
......@@ -153,7 +153,7 @@ private:
public:
template<template <class> class Restarter>
Arnoldi(Logger<P> &logger, Restarter<S> &restarter,
ArnoldiDR(Logger<P> &logger, Restarter<S> &restarter,
int dim, int nbRHS, int max_krylov_space_size):
_logger(logger),
_hess{max_krylov_space_size, nbRHS},
......
......@@ -2,7 +2,7 @@
#define FABULOUS_ARNOLDI_IB_HPP
namespace fabulous {
template<template<class> class HESSENBERG, class S> class Arnoldi_IB;
template<template<class> class HESSENBERG, class S> class ArnoldiIB;
};
#include "fabulous/data/Base.hpp"
......@@ -20,11 +20,11 @@ namespace fabulous {
*
* \warning This class does NOT support DeflatedRestarting (not implemented)
*/
template < template<class> class HESSENBERG, class S > class Arnoldi_IB
template < template<class> class HESSENBERG, class S > class ArnoldiIB
{
static_assert(
arnoldiXhessenberg<fabulous::Arnoldi_IB, HESSENBERG>::value,
"Arnoldi_IB cannot be combined with this Hessenberg"
arnoldiXhessenberg<fabulous::ArnoldiIB, HESSENBERG>::value,
"ArnoldiIB cannot be combined with this Hessenberg"
);
public:
using value_type = typename Arithmetik<S>::value_type;
......@@ -328,7 +328,7 @@ private:
public:
template<template <class> class Restarter>
Arnoldi_IB(Logger<P> &logger, Restarter<S> &restarter,
ArnoldiIB(Logger<P> &logger, Restarter<S> &restarter,
int dim, int nbRHS, int max_krylov_space_size):
_logger(logger),
L{max_krylov_space_size+1, nbRHS},
......
......@@ -50,7 +50,7 @@ inline std::string make_quad_key(int i, int j, int m, int n)
*
* \note only the upper hessenberg block are allocated.
*/
template< class S > class Hess_cham_QR {
template< class S > class HessChamQR {
private:
int _max_nb_iter;
int _mb; /**< maximum number of (big) block line (_nbRHSx_nbRHS) in hessenberg */
......@@ -81,7 +81,7 @@ private:
Block<S> _Y; /**< least square solution */
Block<S> _HR; /**< last column of hessenberg to be filled by orthogonalization */
FABULOUS_DELETE_COPY_MOVE(Hess_cham_QR);
FABULOUS_DELETE_COPY_MOVE(HessChamQR);
public:
using value_type = typename Arithmetik<S>::value_type;
......@@ -193,7 +193,7 @@ private:
}
public:
Hess_cham_QR(int max_krylov_space_size, int nbRHS):
HessChamQR(int max_krylov_space_size, int nbRHS):
_max_nb_iter{ (max_krylov_space_size/nbRHS) +1 },
_mb{ _max_nb_iter+1 },
_nb{ _max_nb_iter },
......@@ -243,7 +243,7 @@ public:
Block<S> get_H1new()
{
FABULOUS_FATAL_ERROR(
"NOT IMPLEMENTED: Hess_cham_QR not compatible with DeflatedRestarting");
"NOT IMPLEMENTED: HessChamQR not compatible with DeflatedRestarting");
return Block<S>{};
}
......@@ -286,7 +286,7 @@ public:
void compute_proj_residual(const Block<S> &)
{
FABULOUS_FATAL_ERROR(
"NOT IMPLEMENTED: Hess_cham_QR not compatible with DeflatedRestarting");
"NOT IMPLEMENTED: HessChamQR not compatible with DeflatedRestarting");
}
std::tuple<P,P,bool>
......@@ -326,7 +326,7 @@ public:
Block<S> get_hess_block()
{
FABULOUS_FATAL_ERROR(
"NOT IMPLEMENTED: Hess_cham_QR not compatible with DeflatedRestarting");
"NOT IMPLEMENTED: HessChamQR not compatible with DeflatedRestarting");
return Block<S>{};
}
......@@ -344,7 +344,7 @@ public:
void reserve_DR(int)
{
FABULOUS_FATAL_ERROR(
"NOT IMPLEMENTED: Hess_cham_QR not compatible with DeflatedRestarting");
"NOT IMPLEMENTED: HessChamQR not compatible with DeflatedRestarting");
}
inline int get_nb_vect() const { return (_nb_block_col) * _nbRHS; }
......
......@@ -4,7 +4,7 @@
#ifdef FABULOUS_USE_CHAMELEON
namespace fabulous {
template< class > class HessChamTopLevel;
template< class > class HessChamTLDR;
};
#include "fabulous/kernel/LapackInterface.hpp"
......@@ -26,7 +26,7 @@ namespace fabulous {
*
* @warning the whole matrix is allocated, its size is driven by the restart parameter.
*/
template< class S > class HessChamTopLevel : public Block<S>
template< class S > class HessChamTLDR : public Block<S>
{
public:
FABULOUS_INHERITS_BLOCK(S);
......@@ -64,8 +64,8 @@ public:
}
public:
HessChamTopLevel() = default;
HessChamTopLevel(int max_krylov_space_size, int nbRHS):
HessChamTLDR() = default;
HessChamTLDR(int max_krylov_space_size, int nbRHS):
super{ max_krylov_space_size+nbRHS, max_krylov_space_size},
_nbRHS{nbRHS},
_nb_vect{0},
......
......@@ -2,7 +2,7 @@
#define FABULOUS_HESS_STANDARD_HPP
namespace fabulous {
template< class > class HessStandard;
template< class > class HessDR;
};
#include "fabulous/kernel/LapackInterface.hpp"
......@@ -23,7 +23,7 @@ namespace fabulous {
*
* @warning the whole matrix is allocated, its size is driven by the restart parameter.
*/
template< class S > class HessStandard : public Block<S>
template< class S > class HessDR : public Block<S>
{
public:
FABULOUS_INHERITS_BLOCK(S);
......@@ -61,8 +61,8 @@ public:
}
public:
HessStandard() = default;
HessStandard(int max_krylov_space_size, int nbRHS):
HessDR() = default;
HessDR(int max_krylov_space_size, int nbRHS):
super{ max_krylov_space_size+nbRHS, max_krylov_space_size},
_nbRHS{nbRHS},
_nb_vect{0},
......
......@@ -5,7 +5,7 @@
#include <cassert>
namespace fabulous {
template<class> class HessExtended;
template<class> class HessIB;
};
#include "fabulous/data/BlockWP.hpp"
......@@ -19,7 +19,7 @@ namespace fabulous {
* This hold the matrix denoted as \f$\mathscr{F}\f$ in the paper.
*
*/
template< class S > class HessExtended : public Block<S>
template< class S > class HessIB : public Block<S>
{
public:
FABULOUS_INHERITS_BLOCK(S);
......@@ -39,7 +39,7 @@ private:
bool _solution_computed;
Block<S> _YY; /**< least square solution */
FABULOUS_DELETE_COPY_MOVE(HessExtended);
FABULOUS_DELETE_COPY_MOVE(HessIB);
public:
/** \brief number of vector in \f$\mathscr{F}\f$ */
int get_nb_vect() const { return _nb_vect; }
......@@ -51,7 +51,7 @@ public:
* \param max_krylov_space_size maximum size of Krylov search space
* \param nbRHS number of right hand side
*/
HessExtended(int max_krylov_space_size, int nbRHS):
HessIB(int max_krylov_space_size, int nbRHS):
super{max_krylov_space_size+nbRHS, max_krylov_space_size},
_nbRHS{nbRHS},
_max_krylov_space_size{max_krylov_space_size},
......@@ -121,7 +121,7 @@ public:
Block<S> subphi = new_phi->sub_block(0, 0, nj, _nbRHS);
subphi.copy(*_phi);
// Compute newphi(nj+1:nj+p,:) := W1W2^{H} * _phi(nj+1:nj+p,:)
// Compute newphi(nj+1:nj+p,:) := W1_W2^{H} * _phi(nj+1:nj+p,:)
LapackKernI::Tgemm(
_nbRHS, _nbRHS, _nbRHS,
W1_W2.get_ptr(), W1_W2.get_leading_dim(),
......
......@@ -18,7 +18,7 @@ namespace fabulous {
* \param ortho_scheme the orthogonalization scheme,
*/
template<class S>
void ArnoldiBlock(HessExtended<S> &L, Base<S> &base,
void ArnoldiBlock(HessIB<S> &L, Base<S> &base,
BlockWP<S> &WP, OrthoScheme ortho_scheme)
{
L.increase(WP.get_size_W());
......
......@@ -5,7 +5,7 @@
# error "Never include this header directly; include 'Arnoldi_Ortho.hpp' instead"
#endif
#include "fabulous/hessenberg/Hess_IB.hpp"
#include "fabulous/hessenberg/HessIB.hpp"
/* **************************** METHODS ******************************** */
......@@ -288,7 +288,7 @@ void ArnoldiRuheIB_IMGS(Matrix &A, Base<S> &base,
/* **************************** WRAPPER ******************************** */
template<class Matrix, class S>
void ArnoldiRuhe(HessExtended<S> &L, Base<S> &base,
void ArnoldiRuhe(HessIB<S> &L, Base<S> &base,
BlockWP<S> &WP, OrthoScheme ortho, Matrix& A)
{
const int iter_count = 2;
......
......@@ -58,6 +58,8 @@ void GetKIndexesComplex(Block<std::complex<P>> &alpha, Block<S> &beta,
*
* \param k number of eigen pair wanted
* \param target the targeted eigen value
* \param[in] alpha as returned by the GGEV Lapack Kernel
* \param[in] beta as returned by the GGEV Lapack Kernel
* \param[out] ind the indices of the found vectors
*
* \return the indexes of the k nearest ones to target
......
#ifndef FABULOUS_ARNOLDI_HESSENBERG_PAIR_H
#define FABULOUS_ARNOLDI_HESSENBERG_PAIR_H
#include <fabulous/arnoldi/Arnoldi_IB.hpp>
#include <fabulous/arnoldi/Arnoldi_Std_DR.hpp>
#include <fabulous/arnoldi/ArnoldiIB.hpp>
#include <fabulous/arnoldi/ArnoldiDR.hpp>
#include <fabulous/hessenberg/Hess_Std_DR.hpp>
#include <fabulous/hessenberg/Hess_Std_QR.hpp>
#include <fabulous/hessenberg/Hess_Std_QRDR.hpp>
#include <fabulous/hessenberg/Hess_Std_chamTL_DR.hpp>
#include <fabulous/hessenberg/Hess_Std_cham_QR.hpp>
#include <fabulous/hessenberg/Hess_IB.hpp>
#include <fabulous/hessenberg/HessDR.hpp>
#include <fabulous/hessenberg/HessQR.hpp>
#include <fabulous/hessenberg/HessQRDR.hpp>
#include <fabulous/hessenberg/HessChamTLDR.hpp>
#include <fabulous/hessenberg/HessChamQR.hpp>
#include <fabulous/hessenberg/HessIB.hpp>
namespace fabulous {
template<class S> using ARNOLDI_STD = Arnoldi<HessStandard, S>;
template<class S> using ARNOLDI_QR = Arnoldi<HessQR, S>;
template<class S> using ARNOLDI_QRDR = Arnoldi<HessQRDR, S>;
template<class S> using ARNOLDI_STD = ArnoldiDR<HessDR, S>;
template<class S> using ARNOLDI_QR = ArnoldiDR<HessQR, S>;
template<class S> using ARNOLDI_QRDR = ArnoldiDR<HessQRDR, S>;
template<class S> using ARNOLDI_IB = Arnoldi_IB<HessExtended, S>;
template<class S> using ARNOLDI_IB = ArnoldiIB<HessIB, S>;
#ifdef FABULOUS_USE_CHAMELEON
template<class S> using ARNOLDI_CHAM_QR = Arnoldi<Hess_cham_QR, S>;
template<class S> using ARNOLDI_CHAM_TL = Arnoldi<HessChamTopLevel, S>;
template<class S> using ARNOLDI_CHAM_QR = ArnoldiDR<HessChamQR, S>;
template<class S> using ARNOLDI_CHAM_TL = ArnoldiDR<HessChamTLDR, S>;
#endif
};
......
......@@ -9,23 +9,22 @@ template< template<class> class HESSENBERG,
template<class> class RESTARTER > struct hessenbergXrestarter;
};
#include <fabulous/arnoldi/Arnoldi_IB.hpp>
#include <fabulous/arnoldi/Arnoldi_Std_DR.hpp>
#include <fabulous/hessenberg/Hess_Std_DR.hpp>
#include <fabulous/hessenberg/Hess_Std_QR.hpp>
#include <fabulous/hessenberg/Hess_Std_QRDR.hpp>
#include <fabulous/hessenberg/Hess_Std_chamTL_DR.hpp>
#include <fabulous/hessenberg/Hess_Std_cham_QR.hpp>
#include <fabulous/hessenberg/Hess_IB.hpp>
#include <fabulous/arnoldi/ArnoldiIB.hpp>
#include <fabulous/arnoldi/ArnoldiDR.hpp>
#include <fabulous/hessenberg/HessDR.hpp>
#include <fabulous/hessenberg/HessQR.hpp>
#include <fabulous/hessenberg/HessQRDR.hpp>
#include <fabulous/hessenberg/HessChamTLDR.hpp>
#include <fabulous/hessenberg/HessChamQR.hpp>
#include <fabulous/hessenberg/HessIB.hpp>
#include <fabulous/restart/DeflatedRestart.hpp>
#include <array>
namespace fabulous {
/**
* \brief boolean field 'value' is set whether ARNOLDI is compatible with HESSENBERG
*/
template<
template<template<class> class, class> class ARNOLDI,
template<class> class HESSENBERG
......@@ -37,17 +36,21 @@ struct arnoldiXhessenberg : public std::false_type {};
struct arnoldiXhessenberg<ARNOLDI, HESSENBERG> \
: public std::true_type {}; \
ARNOLDI_X_HESSENBERG(Arnoldi, HessStandard);
ARNOLDI_X_HESSENBERG(Arnoldi, HessQR);
ARNOLDI_X_HESSENBERG(Arnoldi, HessQRDR);
ARNOLDI_X_HESSENBERG(ArnoldiDR, HessDR);
ARNOLDI_X_HESSENBERG(ArnoldiDR, HessQR);
ARNOLDI_X_HESSENBERG(ArnoldiDR, HessQRDR);
#ifdef FABULOUS_USE_CHAMELEON
ARNOLDI_X_HESSENBERG(Arnoldi, Hess_cham_QR);
ARNOLDI_X_HESSENBERG(Arnoldi, HessChamTopLevel);
ARNOLDI_X_HESSENBERG(ArnoldiDR, HessChamQR);
ARNOLDI_X_HESSENBERG(ArnoldiDR, HessChamTLDR);
#endif
ARNOLDI_X_HESSENBERG(Arnoldi_IB, HessExtended);
ARNOLDI_X_HESSENBERG(ArnoldiIB, HessIB);
/**
* \brief boolean field 'value' is set whether HESSENBERG is compatible with RESTARTER
*/
template<
template<class> class HESSENBERG,
template<class> class RESTARTER
......@@ -59,20 +62,20 @@ struct hessenbergXrestarter : public std::false_type {};
struct hessenbergXrestarter<HESSENBERG, RESTARTER> \
: public std::true_type {}; \
HESSENBERG_X_RESTARTER(HessStandard, ClassicRestarting);
HESSENBERG_X_RESTARTER(HessStandard, DeflatedRestarting);
HESSENBERG_X_RESTARTER(HessDR, ClassicRestarting);
HESSENBERG_X_RESTARTER(HessDR, DeflatedRestarting);
HESSENBERG_X_RESTARTER(HessQRDR, ClassicRestarting);
HESSENBERG_X_RESTARTER(HessQRDR, DeflatedRestarting);
HESSENBERG_X_RESTARTER(HessQR, ClassicRestarting);
#ifdef FABULOUS_USE_CHAMELEON
HESSENBERG_X_RESTARTER(Hess_cham_QR, ClassicRestarting);
HESSENBERG_X_RESTARTER(HessChamTopLevel, ClassicRestarting);
HESSENBERG_X_RESTARTER(HessChamTopLevel, DeflatedRestarting);
HESSENBERG_X_RESTARTER(HessChamQR, ClassicRestarting);
HESSENBERG_X_RESTARTER(HessChamTLDR, ClassicRestarting);
HESSENBERG_X_RESTARTER(HessChamTLDR, DeflatedRestarting);
#endif
HESSENBERG_X_RESTARTER(HessExtended, ClassicRestarting);
HESSENBERG_X_RESTARTER(HessIB, ClassicRestarting);
}; // end namespace fabulous
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment