arpackFabric.hh

Go to the documentation of this file.
1 
6 #ifndef arpackFabric_hh
7 #define arpackFabric_hh
8 
9 #include <memory>
10 #include "operator/compositions.hh"
11 #include "ARPACKsymm.hh"
12 #include "solverFabric.hh"
13 
14 namespace eigensolver {
15 
16  // ********************************************************** ArPackFabric **
17 
24  class ArPackFabric : public SolverFabric<Real> {
25  public:
36  ArPackFabric(int kmax = 1, Real tol = 0.0, const int maxiter = 300,
37  enum ArPackSymm::which target = ArPackSymm::SM,
39  const Real sigma = 0.0,
40  const concepts::Vector<Real>* start = 0) :
41  solver_(nullptr), OP_(nullptr), B_(nullptr), tmp1_(nullptr), tmp2_(nullptr), kmax_(kmax),
42  maxiter_(maxiter), tol_(tol), target_(target), mode_(mode),
43  sigma_(sigma), start_(start) {}
44  virtual ~ArPackFabric();
47  protected:
48  virtual std::ostream& info(std::ostream& os) const;
49  private:
50  std::unique_ptr<ArPackSymm> solver_;
51  std::unique_ptr<concepts::Operator<Real> > OP_, B_, tmp1_, tmp2_;
53  int kmax_;
55  int maxiter_;
63  const Real sigma_;
67 
78  };
79 
80 } // namespace eigensolver
81 
82 #endif // arpackFabric_hh
void normalMode_(concepts::Operator< Real > &stiff, concepts::Operator< Real > &mass)
std::unique_ptr< ArPackSymm > solver_
Definition: arpackFabric.hh:50
std::unique_ptr< concepts::Operator< Real > > tmp2_
Definition: arpackFabric.hh:51
ArPackFabric(const ArPackFabric &)
Fabric class for ARPACK eigenvalue solver for a constrained problem.
Definition: arpackFabric.hh:24
std::unique_ptr< concepts::Operator< Real > > tmp1_
Definition: arpackFabric.hh:51
enum ArPackSymm::modus mode_
Mode in which ARPACK should be used.
Definition: arpackFabric.hh:61
int kmax_
Number of eigenpairs to be computed.
Definition: arpackFabric.hh:53
which
Specify which of the Ritz values of OP (described in modus) to compute.
Definition: ARPACKsymm.hh:70
std::unique_ptr< concepts::Operator< Real > > OP_
Definition: arpackFabric.hh:51
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
Real tol_
Convergence tolerance for the eigenpairs.
Definition: arpackFabric.hh:57
std::unique_ptr< concepts::Operator< Real > > B_
Definition: arpackFabric.hh:51
void shiftinvMode_(concepts::Operator< Real > &stiff, concepts::Operator< Real > &mass)
Eigenvalue solver using ArPack, the routine dsaupd.
Definition: ARPACKsymm.hh:65
void reginvMode_(concepts::Operator< Real > &stiff, concepts::Operator< Real > &mass)
const concepts::Vector< Real > * start_
Starting vector, if not given ARPACK invents one.
Definition: arpackFabric.hh:65
Abstract fabric class for eigenvalue solvers.
Definition: solverFabric.hh:31
virtual ArPackSymm & operator()(concepts::Operator< Real > &stiff, concepts::Operator< Real > &mass)
Creates an eigenvalue solver which solves the abstract eigenvalue problem defined by stiff and mass.
const Real sigma_
Shift for the shift-invert, Buckling or Cayley mode.
Definition: arpackFabric.hh:63
int maxiter_
Maximum number of Arnoldi iterations allowed.
Definition: arpackFabric.hh:55
ArPackFabric(int kmax=1, Real tol=0.0, const int maxiter=300, enum ArPackSymm::which target=ArPackSymm::SM, enum ArPackSymm::modus mode=ArPackSymm::REGINV, const Real sigma=0.0, const concepts::Vector< Real > *start=0)
Constructor.
Definition: arpackFabric.hh:36
void bucklingMode_(concepts::Operator< Real > &stiff, concepts::Operator< Real > &mass)
void cayleyMode_(concepts::Operator< Real > &stiff, concepts::Operator< Real > &mass)
Eigenvalue solvers.
Definition: ARPACK.hh:19
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
enum ArPackSymm::which target_
What sort of eigenvalues to compute.
Definition: arpackFabric.hh:59
modus
Specify mode of ArPackSymm which should be used to compute the Ritz values of OP.
Definition: ARPACKsymm.hh:87
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich