16#include "libmesh/string_to_enum.h"
17#include "libmesh/point.h"
170 return Utility::string_to_enum<QuadratureType>(
"Q" + s);
177 std::string upper(s);
178 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
180 if (upper.compare(
"AUTO") == 0)
183 return Utility::string_to_enum<Order>(upper);
192 std::string upper(s);
193 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
196 mooseError(
"Unknown coordinate system type: ", upper);
207 std::string upper(s);
208 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
222 std::string upper(s);
223 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
226 mooseError(
"Unknown eigen solve type: ", upper);
237 std::string upper(s);
238 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
241 mooseError(
"Unknown eigen problem type: ", upper);
252 std::string upper(s);
253 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
256 mooseError(
"Unknown type of WhichEigenPairs: ", upper);
267 std::string upper(s);
268 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
271 mooseError(
"Unknown line search type: ", upper);
282 std::string upper(s);
283 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
286 mooseError(
"Unknown time integrator: ", upper);
297 std::string upper(s);
298 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
312 std::string upper(s);
313 std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
316 mooseError(
"Unknown RelationshipManager type: ", upper);
322#include "libmesh/ignore_warnings.h"
337 return "GEOMETRIC and ALGEBRAIC";
339 return "ALGEBRAIC and COUPLING";
342 return "GEOMETRIC and ALGEBRAIC and COUPLING";
346 mooseError(
"Unknown RelationshipManagerType");
356 return "IMPLICIT_EULER";
358 return "EXPLICIT_EULER";
360 return "CRANK_NICOLSON";
364 return "EXPLICIT_MIDPOINT";
366 return "LSTABLE_DIRK2";
368 return "EXPLICIT_TVDRK2";
381#include "libmesh/restore_warnings.h"
393 return "Preconditioned JFNK";
412 return "KRYLOVSCHUR";
414 return "Jacobi Davidson";
416 return "Nonlinear Power";
418 return "PJFNK with Matrix Only";
424 return "Preconditioned JFNK";
458 return "multiapp_fixed_point";
460 return "multisystem_fixed_point";
462 mooseError(
"Unhandled SolutionIterationType");
498 const unsigned int max_digits10 =
499 std::floor(std::numeric_limits<Real>::digits * std::log10(2) + 2);
501 std::ostringstream os;
502 os << std::setprecision(max_digits10) << t;
509 mooseAssert(pos.size() == LIBMESH_DIM,
"Wrong array size while converting into a point");
510 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)
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real