16#include "libmesh/string_to_enum.h"
17#include "libmesh/point.h"
18#include "libmesh/fe_type.h"
169 return Utility::string_to_enum<QuadratureType>(
"Q" + s);
176 std::string upper(s);
177 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
179 if (upper.compare(
"AUTO") == 0)
180 return INVALID_ORDER;
182 return Utility::string_to_enum<Order>(upper);
191 std::string upper(s);
192 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
195 mooseError(
"Unknown coordinate system type: ", upper);
206 std::string upper(s);
207 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
221 std::string upper(s);
222 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
225 mooseError(
"Unknown eigen solve type: ", upper);
236 std::string upper(s);
237 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
240 mooseError(
"Unknown eigen problem type: ", upper);
251 std::string upper(s);
252 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
255 mooseError(
"Unknown type of WhichEigenPairs: ", upper);
266 std::string upper(s);
267 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
270 mooseError(
"Unknown line search type: ", upper);
281 std::string upper(s);
282 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
285 mooseError(
"Unknown time integrator: ", upper);
296 std::string upper(s);
297 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
311 std::string upper(s);
312 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
315 mooseError(
"Unknown RelationshipManager type: ", upper);
321#include "libmesh/ignore_warnings.h"
336 return "GEOMETRIC and ALGEBRAIC";
338 return "ALGEBRAIC and COUPLING";
341 return "GEOMETRIC and ALGEBRAIC and COUPLING";
345 mooseError(
"Unknown RelationshipManagerType");
355 return "IMPLICIT_EULER";
357 return "EXPLICIT_EULER";
359 return "CRANK_NICOLSON";
363 return "EXPLICIT_MIDPOINT";
365 return "LSTABLE_DIRK2";
367 return "EXPLICIT_TVDRK2";
380#include "libmesh/restore_warnings.h"
388 msg += t.
p_refinement ?
" with p-refinement" :
" without p-refinement";
402 return "Preconditioned JFNK";
421 return "KRYLOVSCHUR";
423 return "Jacobi Davidson";
425 return "Nonlinear Power";
427 return "PJFNK with Matrix Only";
433 return "Preconditioned JFNK";
467 return "multiapp_fixed_point";
469 return "multisystem_fixed_point";
471 mooseError(
"Unhandled SolutionIterationType");
507 const unsigned int max_digits10 =
508 std::floor(std::numeric_limits<Real>::digits * std::log10(2) + 2);
510 std::ostringstream os;
511 os << std::setprecision(max_digits10) << t;
518 mooseAssert(pos.size() == LIBMESH_DIM,
"Wrong array size while converting into a point");
519 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)