22 #if defined(LIBMESH_HAVE_SLEPC) 37 const std::string & name_in,
38 const unsigned int number_in)
39 :
Parent(es, name_in, number_in),
42 condensed_dofs_initialized(false)
52 std::set<dof_id_type> local_non_condensed_dofs_set;
55 local_non_condensed_dofs_set.insert(i);
58 for (
const auto & dof : global_dirichlet_dofs_set)
60 local_non_condensed_dofs_set.erase(dof);
65 for (
const auto & dof : local_non_condensed_dofs_set)
81 this->
comm().
sum(n_global_non_condensed_dofs);
90 LOG_SCOPE(
"solve()",
"CondensedEigenSystem");
141 const unsigned int maxits =
142 es.
parameters.
get<
unsigned int>(
"linear solver maximum iterations");
144 const unsigned int nev =
147 const unsigned int ncv =
150 std::pair<unsigned int, unsigned int> solve_data;
176 LOG_SCOPE(
"get_eigenpair()",
"CondensedEigenSystem");
194 temp->init (n, n_local,
false,
PARALLEL);
196 std::pair<Real, Real> eval =
eigen_solver->get_eigenpair (i, *temp);
203 solution->set(index,(*temp)(temp->first_local_index()+j));
218 #endif // LIBMESH_HAVE_SLEPC virtual std::pair< Real, Real > get_eigenpair(dof_id_type i)
Manages multiples systems of equations.
std::unique_ptr< SparseMatrix< Number > > condensed_matrix_A
const EquationSystems & get_equation_systems() const
CondensedEigenSystem(EquationSystems &es, const std::string &name_in, const unsigned int number_in)
const Parallel::Communicator & comm() const
virtual void solve() override
dof_id_type n_dofs() const
virtual void assemble() override
Manages the degrees of freedom (DOFs) in a simulation.
std::unique_ptr< SparseMatrix< Number > > matrix_A
dof_id_type n_global_non_condensed_dofs() const
void set_n_iterations(unsigned int its)
std::unique_ptr< NumericVector< Number > > solution
bool is_constrained_dof(const dof_id_type dof) const
void set_n_converged(unsigned int nconv)
void initialize_condensed_dofs(const std::set< dof_id_type > &global_condensed_dofs_set=std::set< dof_id_type >())
static std::unique_ptr< NumericVector< T > > build(const Parallel::Communicator &comm, const SolverPackage solver_package=libMesh::default_solver_package())
virtual void solve() override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::unique_ptr< EigenSolver< Number > > eigen_solver
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
const T & get(const std::string &) const
bool condensed_dofs_initialized
std::unique_ptr< SparseMatrix< Number > > matrix_B
bool have_parameter(const std::string &) const
dof_id_type end_dof(const processor_id_type proc) const
Manages consistently variables, degrees of freedom, and coefficient vectors for eigenvalue problems...
bool assemble_before_solve
const DofMap & get_dof_map() const