19#ifndef LIBMESH_CONDENSED_EIGEN_SYSTEM_H
20#define LIBMESH_CONDENSED_EIGEN_SYSTEM_H
22#include "libmesh/libmesh_config.h"
26#if defined(LIBMESH_HAVE_SLEPC)
29#include "libmesh/eigen_system.h"
30#include "libmesh/sparse_matrix.h"
54 const std::string & name_in,
55 const unsigned int number_in);
96 global_condensed_dofs_set =
97 std::set<dof_id_type>());
109 virtual void solve()
override;
111 virtual void clear ()
override;
190 virtual void reinit()
override;
This class extends EigenSystem to allow a simple way of solving (standard or generalized) eigenvalue ...
virtual bool condense_constrained_dofs() const override final
Whether this object should condense out constrained degrees of freedom.
virtual void add_matrices() override
Adds the necessary matrices and shell matrices.
void dont_create_submatrices_in_solve()
Instructs not to create the condensed submatrices from the global matrices right before the solve.
void copy_super_to_sub(NumericVector< Number > &super, NumericVector< Number > &sub)
Copy a logically super-vector into a sub-vector.
bool have_condensed_dofs() const
bool _have_condensed_dofs
Whether there are any condensed degrees of freedom.
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.
virtual void solve() override
Override to solve the condensed eigenproblem with the dofs in local_non_condensed_dofs_vector strippe...
EigenSystem Parent
The type of the parent.
bool _create_submatrices_in_solve
Denotes whether to create the condensed submatrices from the global matrices in the solve.
void copy_sub_to_super(const NumericVector< Number > &sub, NumericVector< Number > &super)
Copy a logically sub-vector into a super-vector.
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.
SparseMatrix< Number > & get_condensed_matrix_B()
std::unique_ptr< SparseMatrix< Number > > _condensed_matrix_A
The (condensed) system matrix for standard eigenvalue problems.
virtual void clear() override
Clear all the data structures associated with the system.
void initialize_condensed_matrices()
Initializes the condensed matrices.
CondensedEigenSystem(CondensedEigenSystem &&)=default
std::unique_ptr< SparseMatrix< Number > > _condensed_precond_matrix
The condensed preconditioning matrix.
virtual std::pair< Real, Real > get_eigenpair(dof_id_type i) override
Override get_eigenpair() to retrieve the eigenpair for the condensed eigensolve.
CondensedEigenSystem & operator=(const CondensedEigenSystem &)=delete
CondensedEigenSystem(const CondensedEigenSystem &)=delete
Special functions.
bool has_condensed_matrix_B() const
std::unique_ptr< SparseMatrix< Number > > _condensed_matrix_B
A second (condensed) system matrix for generalized eigenvalue problems.
SparseMatrix< Number > & get_condensed_precond_matrix()
CondensedEigenSystem sys_type
The type of system.
bool has_condensed_precond_matrix() const
bool has_condensed_matrix_A() const
dof_id_type n_global_non_condensed_dofs() const
virtual void reinit() override
Reinitializes the member data fields associated with the system, so that, e.g., assemble() may be use...
virtual ~CondensedEigenSystem()
SparseMatrix< Number > & get_condensed_matrix_A()
Manages consistently variables, degrees of freedom, and coefficient vectors for eigenvalue problems.
This is the EquationSystems class.
Provides a uniform interface to vector storage schemes for different linear algebra libraries.
The libMesh namespace provides an interface to certain functionality in the library.