www.mooseframework.org
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.
 

Functions

template<typename T >
Moose::stringToEnum (const std::string &s)
 
template<>
QuadratureType Moose::stringToEnum< QuadratureType > (const std::string &s)
 
template<>
Order Moose::stringToEnum< 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)
 
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 (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 476 of file Conversion.C.

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

◆ vectorCast()

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

Definition at line 181 of file Conversion.h.

182 {
183  std::vector<T2> out(in.begin(), in.end());
184  return out;
185 }
OStreamProxy out