constrained.hh

Go to the documentation of this file.
1 
6 #ifndef constrainedEV_hh
7 #define constrainedEV_hh
8 
9 #include <memory>
10 #include <cstdlib>
11 #include "eigens.hh"
12 #include "solverFabric.hh"
13 #include "space/space.hh"
14 #include "operator/compositions.hh"
15 #include "operator/sparseMatrix.hh"
16 #include "operator/permutation.hh"
18 
19 namespace eigensolver {
20 
21  // *********************************************************** Constrained **
22 
54  class Constrained : public EigenSolver<Real> {
55  public:
64  solver_(solver), computed_(false), A_(A), M_(M), C_(C),
65  lambda_(0), eigenvectors_(0), ev_(0), kmax_(0),
66  Pr(0), Prt(nullptr), Qgt(0), Qg(0), ext(0), restr(0), PrQgt(nullptr),
67  QgPrt(nullptr), restrPrQgt(nullptr), QgPrtext(nullptr), restrPrQgtA(nullptr),
68  restrPrQgtAQgPrtext(nullptr), restrPrQgtM(nullptr), restrPrQgtMQgPrtext(nullptr),
69  it_(0), k_conv_(0) {}
70  virtual ~Constrained();
71  virtual const concepts::Array<Real>& getEV();
73  virtual uint iterations() const { return it_; }
74  virtual uint converged() const { return k_conv_; }
75  protected:
76  virtual std::ostream& info(std::ostream& os) const;
77  private:
80 
84  void compute_();
86  bool computed_;
87 
94 
101 
103  uint kmax_;
104 
106  std::unique_ptr<concepts::Permutation<Real> > Prt;
109  std::unique_ptr<concepts::Compose<Real> > PrQgt, QgPrt, restrPrQgt,
112 
114  uint it_, k_conv_;
115  };
116 
117 } // namespace eigensolver
118 
119 #endif // constrainedEV_hh
Interafce for eigenvalue solvers.
Definition: eigens.hh:23
std::unique_ptr< concepts::Compose< Real > > restrPrQgtMQgPrtext
Definition: constrained.hh:111
std::unique_ptr< concepts::Permutation< Real > > Prt
Definition: constrained.hh:106
std::unique_ptr< concepts::Compose< Real > > restrPrQgtAQgPrtext
Definition: constrained.hh:110
concepts::TrivExtendRestrict< Real > * restr
Definition: constrained.hh:108
virtual const concepts::Array< Real > & getEV()
Returns an array with the eigen values.
SolverFabric< Real > & solver_
Fabric for the eigenvalue solver.
Definition: constrained.hh:79
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
std::unique_ptr< concepts::Compose< Real > > restrPrQgtA
Definition: constrained.hh:110
std::unique_ptr< concepts::Compose< Real > > restrPrQgt
Definition: constrained.hh:109
sparseqr::GivensRotations< Real > * Qgt
Definition: constrained.hh:107
const concepts::SparseMatrix< Real > & C_
Matrix of constraints. is enforced.
Definition: constrained.hh:93
concepts::TrivExtendRestrict< Real > * ext
Definition: constrained.hh:108
concepts::Permutation< Real > * Pr
Definition: constrained.hh:105
concepts::Operator< Real > & A_
Stiffness matrix.
Definition: constrained.hh:89
void compute_()
The real compute routine.
Constrained(concepts::Operator< Real > &A, concepts::Operator< Real > &M, const concepts::SparseMatrix< Real > &C, SolverFabric< Real > &solver)
Constructor.
Definition: constrained.hh:62
std::unique_ptr< concepts::Compose< Real > > restrPrQgtM
Definition: constrained.hh:110
concepts::Array< Real > lambda_
Storage space for eigenvalues.
Definition: constrained.hh:96
virtual uint iterations() const
Definition: constrained.hh:73
std::unique_ptr< concepts::Compose< Real > > QgPrt
Definition: constrained.hh:109
Solves a generalized eigenvalue problem subject to linear, homogeneous constraints.
Definition: constrained.hh:54
virtual const concepts::Array< concepts::Vector< Real > * > & getEF()
std::unique_ptr< concepts::Compose< Real > > QgPrtext
Definition: constrained.hh:110
uint kmax_
Maximal number of eigenvalues which can be computed.
Definition: constrained.hh:103
sparseqr::GivensRotations< Real > * Qg
Definition: constrained.hh:107
concepts::Array< concepts::Vector< Real > * > ev_
References into storage for eigenvectors.
Definition: constrained.hh:100
virtual uint converged() const
Definition: constrained.hh:74
concepts::Operator< Real > & M_
Mass matrix.
Definition: constrained.hh:91
concepts::Array< Real > eigenvectors_
Storage space for eigenvectors.
Definition: constrained.hh:98
Eigenvalue solvers.
Definition: ARPACK.hh:19
bool computed_
If false, the code will have to compute, otherwise not.
Definition: constrained.hh:86
std::unique_ptr< concepts::Compose< Real > > PrQgt
Definition: constrained.hh:109
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich