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" 330 if (t == RelationshipManagerType::DEFAULT)
332 if (t == RelationshipManagerType::GEOMETRIC)
334 if (t == RelationshipManagerType::ALGEBRAIC)
336 if (t == (RelationshipManagerType::GEOMETRIC | RelationshipManagerType::ALGEBRAIC))
337 return "GEOMETRIC and ALGEBRAIC";
338 if (t == (RelationshipManagerType::ALGEBRAIC | RelationshipManagerType::COUPLING))
339 return "ALGEBRAIC and COUPLING";
340 if (t == (RelationshipManagerType::GEOMETRIC | RelationshipManagerType::ALGEBRAIC |
341 RelationshipManagerType::COUPLING))
342 return "GEOMETRIC and ALGEBRAIC and COUPLING";
343 if (t == RelationshipManagerType::COUPLING)
346 mooseError(
"Unknown RelationshipManagerType");
356 #include "libmesh/restore_warnings.h" 368 return "Preconditioned JFNK";
387 return "KRYLOVSCHUR";
389 return "Jacobi Davidson";
391 return "Nonlinear Power";
393 return "PJFNK with Matrix Only";
399 return "Preconditioned JFNK";
428 case SolutionIterationType::Time:
430 case SolutionIterationType::Nonlinear:
433 mooseError(
"Unhandled SolutionIterationType");
442 case ElementType::Element:
446 case ElementType::Lower:
469 const unsigned int max_digits10 =
470 std::floor(std::numeric_limits<Real>::digits * std::log10(2) + 2);
472 std::ostringstream
os;
473 os << std::setprecision(max_digits10) << t;
480 mooseAssert(pos.size() == LIBMESH_DIM,
"Wrong array size while converting into a point");
481 return Point(pos[0], pos[1], pos[2]);
Generalized Non-Hermitian.
std::map< std::string, EigenSolveType > eigen_solve_type_to_enum
Generalized Hermitian indefinite.
Newton-based eigensolver with an assembled Jacobian matrix (fully coupled by default) ...
std::map< std::string, CoordinateSystemType > coordinate_system_type_to_enum
EigenSolveType
Type of the eigen solve.
RelationshipManagerType
Main types of Relationship Managers.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
The same as PJFNK except that matrix-vector multiplication is employed to replace residual evaluation...
EigenProblemType stringToEnum< EigenProblemType >(const std::string &s)
std::map< std::string, EigenProblemType > eigen_problem_type_to_enum
std::map< std::string, WhichEigenPairs > which_eigen_pairs_to_enum
CoordinateSystemType stringToEnum< CoordinateSystemType >(const std::string &s)
void initCoordinateSystemType()
Solving a linear problem.
use whatever SLPEC has by default
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
std::basic_ostream< charT, traits > * os
TimeIntegratorType stringToEnum< TimeIntegratorType >(const std::string &s)
Generalized Non-Hermitian with positive (semi-)definite B.
MffdType
Type of the matrix-free finite-differencing parameter.
Order stringToEnum< Order >(const std::string &s)
MffdType stringToEnum< MffdType >(const std::string &s)
void initLineSearchType()
std::string stringifyExact(Real)
Stringify Reals with enough precision to guarantee lossless Real -> string -> Real roundtrips...
Preconditioned Jacobian-free Newton Krylov.
WhichEigenPairs
Which eigen pairs.
LineSearchType
Type of the line search.
std::map< std::string, TimeIntegratorType > time_integrator_to_enum
Jacobian-Free Newton Krylov.
Point toPoint(const std::vector< Real > &pos)
Convert point represented as std::vector into Point.
QuadratureType stringToEnum< QuadratureType >(const std::string &s)
Use finite differences to compute Jacobian.
WhichEigenPairs stringToEnum< WhichEigenPairs >(const std::string &s)
void initEigenProlemType()
std::string stringify(const T &t)
conversion to string
LineSearchType stringToEnum< LineSearchType >(const std::string &s)
SolveType stringToEnum< SolveType >(const std::string &s)
std::map< std::string, MffdType > mffd_type_to_enum
std::string enum_to_string(const T e)
std::map< std::string, LineSearchType > line_search_type_to_enum
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void initTimeIntegratorsType()
std::map< std::string, RelationshipManagerType > rm_type_to_enum
Jacobian-free Newton Krylov.
TimeIntegratorType
Time integrators.
RelationshipManagerType stringToEnum< RelationshipManagerType >(const std::string &s)
Preconditioned Jacobian-Free Newton Krylov.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
use whatever we have in SLEPC
SolveType
Type of the solve.
void initWhichEigenPairs()
EigenSolveType stringToEnum< EigenSolveType >(const std::string &s)
std::map< std::string, SolveType > solve_type_to_enum
void initEigenSolveType()