Go to the source code of this file.
|
class | MooseUnits |
| Physical unit management class with runtime unit string parsing, unit checking, unit conversion, and output. More...
|
|
◆ operator<<()
std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const MooseUnits & |
u |
|
) |
| |
Definition at line 569 of file Units.C.
572 static const std::vector<std::string> base_unit = {
"m",
"kg",
"s",
"A",
"K",
"at",
"cd"};
577 if (!u.
_base.empty())
583 os << (i ? (latex ?
"\\cdot " :
"*") :
"");
585 const auto & unit = base_unit[
int(u.
_base[i].first)];
587 os <<
"\\text{" << unit <<
"}";
591 if (u.
_base[i].second != 1)
594 os <<
"^{" << u.
_base[i].second <<
'}';
596 os <<
'^' << u.
_base[i].second;
std::basic_ostream< charT, traits > * os
std::vector< std::pair< BaseUnit, int > > _base
base SI units and their exponents
static int geti()
iosteam manipulator helper to toggle latex / text output
Real _factor
conversion factor w.r.t. the base SI units
void ErrorVector unsigned int
auto index_range(const T &sizable)