https://mooseframework.inl.gov
Namespaces | Functions
Conversion.h File Reference

Go to the source code of this file.

Namespaces

 libMesh
 The following methods are specializations for using the libMesh::Parallel::packed_range_* routines for std::strings.
 
 Moose
 MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to address this in their environment if C++17 compatibility isn't found.
 
 Moose::internal
 

Functions

template<typename T >
Moose::stringToEnum (const std::string &s)
 
template<>
libMesh::QuadratureType Moose::stringToEnum< libMesh::QuadratureType > (const std::string &s)
 
template<>
libMesh::Order Moose::stringToEnum< libMesh::Order > (const std::string &s)
 
template<>
CoordinateSystemType Moose::stringToEnum< CoordinateSystemType > (const std::string &s)
 
template<>
SolveType Moose::stringToEnum< SolveType > (const std::string &s)
 
template<>
LineSearchType Moose::stringToEnum< LineSearchType > (const std::string &s)
 
template<>
TimeIntegratorType Moose::stringToEnum< TimeIntegratorType > (const std::string &s)
 
template<>
RelationshipManagerType Moose::stringToEnum< RelationshipManagerType > (const std::string &s)
 
template<typename T >
std::vector< T > Moose::vectorStringsToEnum (const MultiMooseEnum &v)
 
template<typename T >
std::string Moose::stringify (const T &t)
 conversion to string More...
 
std::string Moose::stringify (bool v)
 
std::string Moose::stringify (int v)
 
std::string Moose::stringify (long v)
 
std::string Moose::stringify (long long v)
 
std::string Moose::stringify (unsigned int v)
 
std::string Moose::stringify (unsigned long v)
 
std::string Moose::stringify (unsigned long long v)
 
template<typename T , typename V >
std::string Moose::internal::stringify_variant (const V &value)
 
template<typename... T>
std::string Moose::stringify (std::variant< T... > v)
 
std::string Moose::stringify (const SolveType &t)
 Convert solve type into human readable string. More...
 
std::string Moose::stringify (const EigenSolveType &t)
 Convert eigen solve type into human readable string. More...
 
std::string Moose::stringify (const VarFieldType &t)
 Convert variable field type into human readable string. More...
 
std::string Moose::stringify (const std::string &s)
 Add no-op stringify if the argument already is a string (must use overloading) More...
 
std::string Moose::stringify (libMesh::FEFamily f)
 Convert FEType from libMesh into string. More...
 
std::string Moose::stringify (SolutionIterationType t)
 Convert SolutionIterationType into string. More...
 
std::string Moose::stringify (ElementType t)
 Convert ElementType into string. More...
 
std::string Moose::stringify (libMesh::ElemType t)
 Convert the libmesh ElemType into string. More...
 
template<typename T , typename U >
std::string Moose::stringify (const std::pair< T, U > &p, const std::string &delim=":")
 Add pair stringify to support maps. More...
 
template<template< typename... > class T, typename... U>
std::string Moose::stringify (const T< U... > &c, const std::string &delim=", ", const std::string &elem_encl="", bool enclose_list_in_curly_braces=false)
 Convert a container to a string with elements separated by delimiter of user's choice. More...
 
std::string Moose::stringifyExact (Real)
 Stringify Reals with enough precision to guarantee lossless Real -> string -> Real roundtrips. More...
 
template<typename T1 , typename T2 >
std::vector< T2 > vectorCast (std::vector< T2 > in)
 
Point toPoint (const std::vector< Real > &pos)
 Convert point represented as std::vector into Point. More...
 

Function Documentation

◆ toPoint()

Point toPoint ( const std::vector< Real > &  pos)

Convert point represented as std::vector into Point.

Parameters
posPoint represented as a vector
Returns
Converted point

Definition at line 478 of file Conversion.C.

479 {
480  mooseAssert(pos.size() == LIBMESH_DIM, "Wrong array size while converting into a point");
481  return Point(pos[0], pos[1], pos[2]);
482 }

◆ vectorCast()

template<typename T1 , typename T2 >
std::vector<T2> vectorCast ( std::vector< T2 >  in)

Definition at line 200 of file Conversion.h.

201 {
202  std::vector<T2> out(in.begin(), in.end());
203  return out;
204 }
OStreamProxy out