condensed_eigen_system.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2018 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 
19 #ifndef LIBMESH_CONDENSED_EIGEN_SYSTEM_H
20 #define LIBMESH_CONDENSED_EIGEN_SYSTEM_H
21 
22 #include "libmesh/libmesh_config.h"
23 
24 // Currently, the EigenSystem should only be available
25 // if SLEPc support is enabled.
26 #if defined(LIBMESH_HAVE_SLEPC)
27 
28 // Local Includes
29 #include "libmesh/eigen_system.h"
30 #include "libmesh/sparse_matrix.h"
31 
32 namespace libMesh
33 {
34 
47 {
48 public:
49 
55  const std::string & name_in,
56  const unsigned int number_in);
57 
62 
67 
71  sys_type & system () { return *this; }
72 
85  void initialize_condensed_dofs(const std::set<dof_id_type> &
86  global_condensed_dofs_set =
87  std::set<dof_id_type>());
88 
93 
99  virtual void solve() override;
100 
107  virtual std::pair<Real, Real> get_eigenpair(dof_id_type i) override;
108 
112  std::unique_ptr<SparseMatrix<Number>> condensed_matrix_A;
113 
117  std::unique_ptr<SparseMatrix<Number>> condensed_matrix_B;
118 
124  std::vector<dof_id_type> local_non_condensed_dofs_vector;
125 
126 private:
127 
133 };
134 
135 
136 } // namespace libMesh
137 
138 
139 #endif // LIBMESH_HAVE_SLEPC
140 
141 #endif // LIBMESH_CONDENSED_EIGEN_SYSTEM_H
Manages multiples systems of equations.
std::unique_ptr< SparseMatrix< Number > > condensed_matrix_A
CondensedEigenSystem(EquationSystems &es, const std::string &name_in, const unsigned int number_in)
dof_id_type n_global_non_condensed_dofs() const
void initialize_condensed_dofs(const std::set< dof_id_type > &global_condensed_dofs_set=std::set< dof_id_type >())
Extends EigenSystem to allow certain DOFs to be condensed out.
std::unique_ptr< SparseMatrix< Number > > condensed_matrix_B
virtual std::pair< Real, Real > get_eigenpair(dof_id_type i) override
std::vector< dof_id_type > local_non_condensed_dofs_vector
Manages consistently variables, degrees of freedom, and coefficient vectors for eigenvalue problems...
Definition: eigen_system.h:54
uint8_t dof_id_type
Definition: id_types.h:64