libMesh
condensed_eigen_system.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2017 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() libmesh_override;
100 
107  virtual std::pair<Real, Real> get_eigenpair(dof_id_type i) libmesh_override;
108 
113 
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
This is the EquationSystems class.
UniquePtr< SparseMatrix< Number > > condensed_matrix_B
A second (condensed) system matrix for generalized eigenvalue problems.
CondensedEigenSystem sys_type
The type of system.
virtual void solve() libmesh_override
Override to solve the condensed eigenproblem with the dofs in local_non_condensed_dofs_vector strippe...
CondensedEigenSystem(EquationSystems &es, const std::string &name_in, const unsigned int number_in)
Constructor.
The libMesh namespace provides an interface to certain functionality in the library.
std::unique_ptr< T > UniquePtr
Definition: auto_ptr.h:46
void initialize_condensed_dofs(const std::set< dof_id_type > &global_condensed_dofs_set=std::set< dof_id_type >())
Loop over the dofs on each processor to initialize the list of non-condensed dofs.
This class extends EigenSystem to allow a simple way of solving (standard or generalized) eigenvalue ...
UniquePtr< SparseMatrix< Number > > condensed_matrix_A
The (condensed) system matrix for standard eigenvalue problems.
EigenSystem Parent
The type of the parent.
std::vector< dof_id_type > local_non_condensed_dofs_vector
Vector storing the local dof indices that will not be condensed.
bool condensed_dofs_initialized
A private flag to indicate whether the condensed dofs have been initialized.
This class provides a specific system class.
Definition: eigen_system.h:50
virtual std::pair< Real, Real > get_eigenpair(dof_id_type i) libmesh_override
Override get_eigenpair() to retrieve the eigenpair for the condensed eigensolve.
dof_id_type n_global_non_condensed_dofs() const
uint8_t dof_id_type
Definition: id_types.h:64