AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::klee Namespace Reference

Namespaces

 internal
 

Classes

struct  TransformableGeometryProperties
 
class  Geometry
 
class  GeometryOperator
 
class  MatrixOperator
 
class  CompositeOperator
 
class  Translation
 
class  Rotation
 
class  Scale
 
class  UnitConverter
 
class  SliceOperator
 
class  GeometryOperatorVisitor
 
class  KleeError
 
class  Shape
 
class  ShapeSet
 

Enumerations

enum class  Dimensions : int { Two = 2 , Three = 3 }
 
enum class  LengthUnit {
  km , m , dm , cm ,
  mm , um , nm , angstrom ,
  miles , feet , inches , mils ,
  unspecified
}
 

Functions

bool operator== (const TransformableGeometryProperties &lhs, const TransformableGeometryProperties &rhs)
 
bool operator!= (const TransformableGeometryProperties &lhs, const TransformableGeometryProperties &rhs)
 
ShapeSet readShapeSet (std::istream &stream)
 
ShapeSet readShapeSet (const std::string &filePath)
 
LengthUnit parseLengthUnits (const std::string &unitsAsString, const std::string &path)
 
LengthUnit parseLengthUnits (const inlet::Proxy &unitsAsProxy)
 
double getConversionFactor (LengthUnit sourceUnits, LengthUnit targetUnits)
 
double convert (double sourceValue, LengthUnit sourceUnits, LengthUnit targetUnits)
 
template<typename T >
void convertAll (T &values, LengthUnit sourceUnits, LengthUnit targetUnits)
 

Enumeration Type Documentation

◆ Dimensions

enum axom::klee::Dimensions : int
strong

The dimensions that are supported for specifying operations in Klee.

Enumerator
Two 
Three 

◆ LengthUnit

Units of length in which users can express lengths and in which client codes can request them.

Enumerator
km 
dm 
cm 
mm 
um 
nm 
angstrom 
miles 
feet 
inches 
mils 
unspecified 

Function Documentation

◆ operator==()

bool axom::klee::operator== ( const TransformableGeometryProperties lhs,
const TransformableGeometryProperties rhs 
)

Compare transformable properties for equality.

Parameters
lhsthe left-hand-side operand
rhsthe right-hand-side operand
Returns
true if and only if all properties are equal

◆ operator!=()

bool axom::klee::operator!= ( const TransformableGeometryProperties lhs,
const TransformableGeometryProperties rhs 
)
inline

Compare transformable properties for inequality.

Parameters
lhsthe left-hand-side operand
rhsthe right-hand-side operand
Returns
false if and only if all properties are equal

◆ readShapeSet() [1/2]

ShapeSet axom::klee::readShapeSet ( std::istream &  stream)

Read a ShapeSet from an input stream.

Parameters
streamthe stream from which to read the ShapeSet
Exceptions
runtime_errorif the input is invalid

◆ readShapeSet() [2/2]

ShapeSet axom::klee::readShapeSet ( const std::string &  filePath)

Read a ShapeSet from a specified file

Parameters
filePaththe file from which to read the ShapeSet
Returns
the ShapeSet read from the file
Exceptions
runtime_errorif the input is invalid

◆ parseLengthUnits() [1/2]

LengthUnit axom::klee::parseLengthUnits ( const std::string &  unitsAsString,
const std::string &  path 
)

Convert a string to a LengthUnit.

Parameters
unitsAsStringthe units as a string
paththe Path where the length units were found in the document. Used for error reporting.
Returns
the parsed units
Exceptions
KleeErrorif the string does not represent known units

◆ parseLengthUnits() [2/2]

LengthUnit axom::klee::parseLengthUnits ( const inlet::Proxy unitsAsProxy)

Convert a proxy to a LengthUnit.

Parameters
unitsAsProxythe units as a proxy
Returns
the parsed units
Exceptions
KleeErrorif the string does not represent known units

◆ getConversionFactor()

double axom::klee::getConversionFactor ( LengthUnit  sourceUnits,
LengthUnit  targetUnits 
)

Get the conversion factor to convert from the given source units to the target units.

Parameters
sourceUnitsthe original units
targetUnitsthe units to convert to
Returns
the value by which to multiply lengths in the original units to get the target units

◆ convert()

double axom::klee::convert ( double  sourceValue,
LengthUnit  sourceUnits,
LengthUnit  targetUnits 
)

Convert a value from one set of units to another.

Parameters
sourceValuethe value of the length in the original units
sourceUnitsthe original units
targetUnitsthe units to convert to
Returns
the value of the length in the new units

◆ convertAll()

template<typename T >
void axom::klee::convertAll ( T &  values,
LengthUnit  sourceUnits,
LengthUnit  targetUnits 
)

Convert multiple lengths in place.

Template Parameters
Tthe type containing the units. Must be iterable.
Parameters
valuesthe value of the length in the original units
sourceUnitsthe original units
targetUnitsthe units to convert to

References getConversionFactor().