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;
171 #ifdef LIBMESH_ENABLE_DEPRECATED 208 virtual void reinit()
override;
216 #ifdef LIBMESH_ENABLE_DEPRECATED 256 #endif // LIBMESH_HAVE_SLEPC 258 #endif // LIBMESH_CONDENSED_EIGEN_SYSTEM_H
void initialize_condensed_matrices()
Initializes the condensed matrices.
This is the EquationSystems class.
bool _condensed_dofs_initialized
A private flag to indicate whether the condensed dofs have been initialized.
bool has_condensed_matrix_A() const
CondensedEigenSystem & operator=(const CondensedEigenSystem &)=delete
SparseMatrix< Number > & get_condensed_precond_matrix()
CondensedEigenSystem sys_type
The type of system.
bool has_condensed_precond_matrix() const
CondensedEigenSystem(EquationSystems &es, const std::string &name_in, const unsigned int number_in)
Constructor.
SparseMatrix< Number > * condensed_matrix_B
A second (condensed) system matrix for generalized eigenvalue problems.
virtual void clear() override
Clear all the data structures associated with the system.
virtual ~CondensedEigenSystem()
The libMesh namespace provides an interface to certain functionality in the library.
bool have_condensed_dofs() const
void copy_super_to_sub(NumericVector< Number > &super, NumericVector< Number > &sub)
Copy a logically super-vector into a sub-vector.
SparseMatrix< Number > * condensed_matrix_A
The (condensed) system matrix for standard eigenvalue problems.
void dont_create_submatrices_in_solve()
Instructs not to create the condensed submatrices from the global matrices right before the solve...
virtual void solve() override
Override to solve the condensed eigenproblem with the dofs in local_non_condensed_dofs_vector strippe...
SparseMatrix< Number > & get_condensed_matrix_A()
dof_id_type n_global_non_condensed_dofs() const
void copy_sub_to_super(const NumericVector< Number > &sub, NumericVector< Number > &super)
Copy a logically sub-vector into a super-vector.
bool _have_condensed_dofs
Whether there are any condensed degrees of freedom.
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 ...
virtual void add_matrices() override
Adds the necessary matrices and shell matrices.
std::unique_ptr< SparseMatrix< Number > > _condensed_matrix_B
A second (condensed) system matrix for generalized eigenvalue problems.
EigenSystem Parent
The type of the parent.
virtual std::pair< Real, Real > get_eigenpair(dof_id_type i) override
Override get_eigenpair() to retrieve the eigenpair for the condensed eigensolve.
std::vector< dof_id_type > local_non_condensed_dofs_vector
Vector storing the local dof indices that will not be condensed.
bool _create_submatrices_in_solve
Denotes whether to create the condensed submatrices from the global matrices in the solve...
bool has_condensed_matrix_B() const
virtual void reinit() override
Reinitializes the member data fields associated with the system, so that, e.g., assemble() may be use...
SparseMatrix< Number > & get_condensed_matrix_B()
Manages consistently variables, degrees of freedom, and coefficient vectors for eigenvalue problems...
std::unique_ptr< SparseMatrix< Number > > _condensed_precond_matrix
The condensed preconditioning matrix.
std::unique_ptr< SparseMatrix< Number > > _condensed_matrix_A
The (condensed) system matrix for standard eigenvalue problems.
virtual bool condense_constrained_dofs() const override final
Whether this object should condense out constrained degrees of freedom.