SPH
Classes | Functions | Variables
Units.cpp File Reference
#include "physics/Units.h"
#include "objects/containers/FlatSet.h"

Go to the source code of this file.

Classes

struct  UnitDesc
 

Functions

std::ostream & operator<< (std::ostream &stream, const Unit &u)
 
Expected< UnitparseUnit (const std::string &text)
 

Variables

NAMESPACE_SPH_BEGIN UnitSystem CODE_UNITS = UnitSystem::SI()
 
FlatMap< BasicDimension, FlatSet< UnitDesc > > UNITS
 

Function Documentation

◆ operator<<()

std::ostream& operator<< ( std::ostream &  stream,
const Unit u 
)

Prints in the most suitable units (so that the value is as close to 1 as possible).

Can be only used with base units.

Definition at line 50 of file Units.cpp.

◆ parseUnit()

Expected<Unit> parseUnit ( const std::string &  text)

Definition at line 86 of file Units.cpp.

Variable Documentation

◆ CODE_UNITS

Definition at line 6 of file Units.cpp.

◆ UNITS

Definition at line 17 of file Units.cpp.