15#include "libmesh/libmesh_config.h"
26 params.
addParam<
bool>(
"inverse_eigenvalue",
false,
"True to evaluate the inverse of eigenvalues");
32 _inverse(getParam<bool>(
"inverse_eigenvalue")),
33 _eigen_values_real(declareVector(
"eigen_values_real")),
34 _eigen_values_imag(declareVector(
"eigen_values_imag")),
38 mooseError(
"Given system is not a NonlinearEigenSystem \n");
51#ifdef LIBMESH_HAVE_SLEPC
53 unsigned int n_converged_eigenvalues = eigenvalues.size();
56 for (
unsigned int n = 0; n < n_converged_eigenvalues; n++)
58 std::complex<Real> e(eigenvalues[n].first, eigenvalues[n].second);
59 std::complex<Real> inv =
_inverse ? 1. / e : e;
registerMooseObject("MooseApp", Eigenvalues)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
VectorPostprocessorValue & _eigen_values_imag
Imaginary part of the eigenvalues.
const bool _inverse
Whether to report the inverse of the eigenvalues.
static InputParameters validParams()
const NonlinearEigenSystem *const _nl_eigen
Nonlinear eigen-system to get the eigenvalues from.
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
Eigenvalues(const InputParameters ¶meters)
VectorPostprocessorValue & _eigen_values_real
Real part of the eigenvalues.
virtual void execute() override
Execute method.
This class is here to combine the VectorPostprocessor interface and the base class VectorPostprocesso...
static InputParameters validParams()
Nonlinear eigenvalue system to be solved.
const std::vector< std::pair< Real, Real > > & getAllConvergedEigenvalues() const
Get the number of converged eigenvalues.