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;
Nonlinear eigenvalue system to be solved.
const NonlinearEigenSystem *const _nl_eigen
Nonlinear eigen-system to get the eigenvalues from.
This class is here to combine the VectorPostprocessor interface and the base class VectorPostprocesso...
static InputParameters validParams()
const std::vector< std::pair< Real, Real > > & getAllConvergedEigenvalues() const
Get the number of converged eigenvalues.
const bool _inverse
Whether to report the inverse of the eigenvalues.
Eigenvalues(const InputParameters ¶meters)
registerMooseObject("MooseApp", Eigenvalues)
static InputParameters validParams()
VectorPostprocessorValue & _eigen_values_real
Real part of the eigenvalues.
virtual void execute() override
Execute method.
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
VectorPostprocessorValue & _eigen_values_imag
Imaginary part of the eigenvalues.