16#include "libmesh/string_to_enum.h"
17#include "libmesh/point.h"
168 return Utility::string_to_enum<QuadratureType>(
"Q" + s);
175 std::string upper(s);
176 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
178 if (upper.compare(
"AUTO") == 0)
179 return INVALID_ORDER;
181 return Utility::string_to_enum<Order>(upper);
190 std::string upper(s);
191 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
194 mooseError(
"Unknown coordinate system type: ", upper);
205 std::string upper(s);
206 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
220 std::string upper(s);
221 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
224 mooseError(
"Unknown eigen solve type: ", upper);
235 std::string upper(s);
236 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
239 mooseError(
"Unknown eigen problem type: ", upper);
250 std::string upper(s);
251 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
254 mooseError(
"Unknown type of WhichEigenPairs: ", upper);
265 std::string upper(s);
266 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
269 mooseError(
"Unknown line search type: ", upper);
280 std::string upper(s);
281 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
284 mooseError(
"Unknown time integrator: ", upper);
295 std::string upper(s);
296 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
310 std::string upper(s);
311 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
314 mooseError(
"Unknown RelationshipManager type: ", upper);
320#include "libmesh/ignore_warnings.h"
335 return "GEOMETRIC and ALGEBRAIC";
337 return "ALGEBRAIC and COUPLING";
340 return "GEOMETRIC and ALGEBRAIC and COUPLING";
344 mooseError(
"Unknown RelationshipManagerType");
354 return "IMPLICIT_EULER";
356 return "EXPLICIT_EULER";
358 return "CRANK_NICOLSON";
362 return "EXPLICIT_MIDPOINT";
364 return "LSTABLE_DIRK2";
366 return "EXPLICIT_TVDRK2";
379#include "libmesh/restore_warnings.h"
391 return "Preconditioned JFNK";
410 return "KRYLOVSCHUR";
412 return "Jacobi Davidson";
414 return "Nonlinear Power";
416 return "PJFNK with Matrix Only";
422 return "Preconditioned JFNK";
456 return "multiapp_fixed_point";
458 return "multisystem_fixed_point";
460 mooseError(
"Unhandled SolutionIterationType");
496 const unsigned int max_digits10 =
497 std::floor(std::numeric_limits<Real>::digits * std::log10(2) + 2);
499 std::ostringstream os;
500 os << std::setprecision(max_digits10) << t;
507 mooseAssert(pos.size() == LIBMESH_DIM,
"Wrong array size while converting into a point");
508 return Point(pos[0], pos[1], pos[2]);
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
std::map< std::string, LineSearchType > line_search_type_to_enum
SolveType stringToEnum< SolveType >(const std::string &s)
void initEigenProlemType()
LineSearchType stringToEnum< LineSearchType >(const std::string &s)
void initCoordinateSystemType()
MffdType stringToEnum< MffdType >(const std::string &s)
SolveType
Type of the solve.
@ ST_FD
Use finite differences to compute Jacobian.
@ ST_LINEAR
Solving a linear problem.
@ ST_NEWTON
Full Newton Solve.
@ ST_JFNK
Jacobian-Free Newton Krylov.
@ ST_PJFNK
Preconditioned Jacobian-Free Newton Krylov.
QuadratureType stringToEnum< QuadratureType >(const std::string &s)
EigenProblemType stringToEnum< EigenProblemType >(const std::string &s)
std::map< std::string, CoordinateSystemType > coordinate_system_type_to_enum
TimeIntegratorType
Time integrators.
void initLineSearchType()
RelationshipManagerType stringToEnum< RelationshipManagerType >(const std::string &s)
LineSearchType
Type of the line search.
TimeIntegratorType stringToEnum< TimeIntegratorType >(const std::string &s)
std::map< std::string, TimeIntegratorType > time_integrator_to_enum
CoordinateSystemType stringToEnum< CoordinateSystemType >(const std::string &s)
void initEigenSolveType()
std::map< std::string, SolveType > solve_type_to_enum
std::map< std::string, RelationshipManagerType > rm_type_to_enum
void initWhichEigenPairs()
std::string stringify(const T &t)
conversion to string
RelationshipManagerType
Main types of Relationship Managers.
Point toPoint(const std::vector< Real > &pos)
std::map< std::string, EigenProblemType > eigen_problem_type_to_enum
WhichEigenPairs
Which eigen pairs.
@ WEP_TARGET_MAGNITUDE
target magnitude
@ WEP_LARGEST_IMAGINARY
largest imaginary
@ WEP_TARGET_IMAGINARY
target imaginary
@ WEP_SMALLEST_REAL
smallest real
@ WEP_SLEPC_DEFAULT
use whatever we have in SLEPC
@ WEP_LARGEST_MAGNITUDE
largest magnitude
@ WEP_SMALLEST_MAGNITUDE
smallest magnitude
@ WEP_ALL_EIGENVALUES
all eigenvalues
@ WEP_SMALLEST_IMAGINARY
smallest imaginary
@ WEP_TARGET_REAL
target real
@ WEP_LARGEST_REAL
largest real
void initTimeIntegratorsType()
std::map< std::string, MffdType > mffd_type_to_enum
std::string stringifyExact(Real)
Stringify Reals with enough precision to guarantee lossless Real -> string -> Real roundtrips.
EigenSolveType
Type of the eigen solve.
@ EST_PJFNKMO
The same as PJFNK except that matrix-vector multiplication is employed to replace residual evaluation...
@ EST_JACOBI_DAVIDSON
Jacobi-Davidson.
@ EST_KRYLOVSCHUR
Krylov-Schur.
@ EST_JFNK
Jacobian-free Newton Krylov.
@ EST_NEWTON
Newton-based eigensolver with an assembled Jacobian matrix (fully coupled by default)
@ EST_POWER
Power / Inverse / RQI.
@ EST_NONLINEAR_POWER
Nonlinear inverse power.
@ EST_PJFNK
Preconditioned Jacobian-free Newton Krylov.
Order stringToEnum< Order >(const std::string &s)
std::map< std::string, WhichEigenPairs > which_eigen_pairs_to_enum
EigenProblemType
Type of the eigen problem.
@ EPT_GEN_INDEFINITE
Generalized Hermitian indefinite.
@ EPT_NON_HERMITIAN
Non-Hermitian.
@ EPT_GEN_HERMITIAN
Generalized Hermitian.
@ EPT_HERMITIAN
Hermitian.
@ EPT_GEN_NON_HERMITIAN
Generalized Non-Hermitian.
@ EPT_POS_GEN_NON_HERMITIAN
Generalized Non-Hermitian with positive (semi-)definite B.
@ EPT_SLEPC_DEFAULT
use whatever SLPEC has by default
std::map< std::string, EigenSolveType > eigen_solve_type_to_enum
WhichEigenPairs stringToEnum< WhichEigenPairs >(const std::string &s)
EigenSolveType stringToEnum< EigenSolveType >(const std::string &s)
MffdType
Type of the matrix-free finite-differencing parameter.
std::string enum_to_string(const T e)