MGIS 3.1.0
Loading...
Searching...
No Matches
QuantityView.hxx File Reference

File which defines the QuantityView class, a view returning the values of a function with one component as TFEL's quantities, i.e. scalar values associated with a physical unit. More...

Classes

struct  mgis::function::internals::FunctionResultTypeTraits<::tfel::math::qt_ref< UnitType, real > >
 partial specialization allowing functions to return a mutable reference to a quantity, i.e. a qt_ref object of TFEL/Math More...
struct  mgis::function::QuantityView< FunctionType, UnitType >
 a view returning the values of a function as quantities More...
struct  mgis::function::LightweightViewTraits< QuantityView< FunctionType, UnitType > >
 partial specialisation stating that a QuantityView is its own view: it only stores a view of the underlying function, so copying it is cheap More...

Namespaces

namespace  mgis
 the namespace mgis encloses all the MGIS project.

Functions

template<FunctionConcept FunctionType, ::tfel::math::unit::UnitConcept UnitType>
constexpr decltype(auto) mgis::function::getSpace (const QuantityView< FunctionType, UnitType > &)
 return the underlying space
template<FunctionConcept FunctionType, ::tfel::math::unit::UnitConcept UnitType>
constexpr bool mgis::function::check (AbstractErrorHandler &, const QuantityView< FunctionType, UnitType > &)
 perform consistency checks
template<FunctionConcept FunctionType, ::tfel::math::unit::UnitConcept UnitType>
constexpr size_type mgis::function::getNumberOfComponents (const QuantityView< FunctionType, UnitType > &) MGIS_NOEXCEPT
 return the number of components

Detailed Description

File which defines the QuantityView class, a view returning the values of a function with one component as TFEL's quantities, i.e. scalar values associated with a physical unit.

Author
Thomas Helfer
Date
15/08/2026

Function Documentation

◆ check()

template<FunctionConcept FunctionType, ::tfel::math::unit::UnitConcept UnitType>
bool mgis::function::check ( AbstractErrorHandler & eh,
const QuantityView< FunctionType, UnitType > & v )
nodiscardconstexpr

perform consistency checks

Template Parameters
FunctionTypetype of the underlying function
UnitTypeunit of the quantities returned by the view
Parameters
[in]eherror handler used to report the errors
[in]vquantity view
Returns
true if the values returned by the view are valid

◆ getNumberOfComponents()

template<FunctionConcept FunctionType, ::tfel::math::unit::UnitConcept UnitType>
size_type mgis::function::getNumberOfComponents ( const QuantityView< FunctionType, UnitType > & v)
nodiscardconstexpr

return the number of components

Template Parameters
FunctionTypetype of the underlying function
UnitTypeunit of the quantities returned by the view
Parameters
[in]vquantity view
Returns
the number of components of the view, which is one

◆ getSpace()

template<FunctionConcept FunctionType, ::tfel::math::unit::UnitConcept UnitType>
decltype(auto) mgis::function::getSpace ( const QuantityView< FunctionType, UnitType > & v)
nodiscardconstexpr

return the underlying space

Template Parameters
FunctionTypetype of the underlying function
UnitTypeunit of the quantities returned by the view
Parameters
[in]vquantity view
Returns
the space on which the view is defined