Physical Quantities  v1.0.0
C++ library of physical quantities, physical models, and units of measure for scientific computing. https://github.com/acodcha/phq
Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
PhQ::ScalarTemperatureGradient< NumericType > Class Template Reference

Scalar temperature gradient component or magnitude of a temperature gradient vector. For a three-dimensional Euclidean temperature gradient vector, see PhQ::TemperatureGradient. For a two-dimensional Euclidean temperature gradient vector in the XY plane, see PhQ::PlanarTemperatureGradient. More...

#include "ScalarTemperatureGradient.hpp"

Public Member Functions

 ScalarTemperatureGradient ()=default
 Default constructor. Constructs a scalar temperature gradient with an uninitialized value. More...
 
 ScalarTemperatureGradient (const NumericType value, const Unit::TemperatureGradient unit)
 Constructor. Constructs a scalar temperature gradient with a given value expressed in a given temperature gradient unit. More...
 
constexpr ScalarTemperatureGradient (const TemperatureDifference< NumericType > &temperature_difference, const Length< NumericType > &length)
 Constructor. Constructs a scalar temperature gradient from a given temperature difference and length using the definition of temperature gradient. More...
 
 ~ScalarTemperatureGradient () noexcept=default
 Destructor. Destroys this scalar temperature gradient. More...
 
constexpr ScalarTemperatureGradient (const ScalarTemperatureGradient< NumericType > &other)=default
 Copy constructor. Constructs a scalar temperature gradient by copying another one. More...
 
template<typename OtherNumericType >
constexpr ScalarTemperatureGradient (const ScalarTemperatureGradient< OtherNumericType > &other)
 Copy constructor. Constructs a scalar temperature gradient by copying another one. More...
 
constexpr ScalarTemperatureGradient (ScalarTemperatureGradient< NumericType > &&other) noexcept=default
 Move constructor. Constructs a scalar temperature gradient by moving another one. More...
 
constexpr ScalarTemperatureGradient< NumericType > & operator= (const ScalarTemperatureGradient< NumericType > &other)=default
 Copy assignment operator. Assigns this scalar temperature gradient by copying another one. More...
 
template<typename OtherNumericType >
constexpr ScalarTemperatureGradient< NumericType > & operator= (const ScalarTemperatureGradient< OtherNumericType > &other)
 Copy assignment operator. Assigns this scalar temperature gradient by copying another one. More...
 
constexpr ScalarTemperatureGradient< NumericType > & operator= (ScalarTemperatureGradient< NumericType > &&other) noexcept=default
 Move assignment operator. Assigns this scalar temperature gradient by moving another one. More...
 
constexpr ScalarTemperatureGradient< NumericType > operator+ (const ScalarTemperatureGradient< NumericType > &scalar_temperature_gradient) const
 
constexpr ScalarTemperatureGradient< NumericType > operator- (const ScalarTemperatureGradient< NumericType > &scalar_temperature_gradient) const
 
constexpr ScalarTemperatureGradient< NumericType > operator* (const NumericType number) const
 
constexpr TemperatureDifference< NumericType > operator* (const Length< NumericType > &length) const
 
constexpr PlanarTemperatureGradient< NumericType > operator* (const PlanarDirection< NumericType > &planar_direction) const
 
constexpr TemperatureGradient< NumericType > operator* (const Direction< NumericType > &direction) const
 
constexpr ScalarTemperatureGradient< NumericType > operator/ (const NumericType number) const
 
constexpr NumericType operator/ (const ScalarTemperatureGradient< NumericType > &scalar_temperature_gradient) const noexcept
 
constexpr void operator+= (const ScalarTemperatureGradient< NumericType > &scalar_temperature_gradient) noexcept
 
constexpr void operator-= (const ScalarTemperatureGradient< NumericType > &scalar_temperature_gradient) noexcept
 
constexpr void operator*= (const NumericType number) noexcept
 
constexpr void operator/= (const NumericType number) noexcept
 
constexpr double Value () const noexcept
 Value of this physical quantity expressed in its standard unit of measure. More...
 
double Value (const Unit::TemperatureGradient unit) const
 Value of this physical quantity expressed in a given unit of measure. More...
 
constexpr double StaticValue () const
 Value of this physical quantity expressed in a given unit of measure. This method can be evaluated statically at compile-time. More...
 
constexpr double & MutableValue () noexcept
 Returns the value of this physical quantity expressed in its standard unit of measure as a mutable value. More...
 
constexpr void SetValue (const double value) noexcept
 Sets the value of this physical quantity expressed in its standard unit of measure to the given value. More...
 
std::string Print () const
 Prints this physical quantity as a string. This physical quantity's value is expressed in its standard unit of measure. More...
 
std::string Print (const Unit::TemperatureGradient unit) const
 Prints this physical quantity as a string. This physical quantity's value is expressed in the given unit of measure. More...
 
std::string JSON () const
 Serializes this physical quantity as a JSON message. This physical quantity's value is expressed in its standard unit of measure. More...
 
std::string JSON (const Unit::TemperatureGradient unit) const
 Serializes this physical quantity as a JSON message. This physical quantity's value is expressed in the given unit of measure. More...
 
std::string XML () const
 Serializes this physical quantity as an XML message. This physical quantity's value is expressed in its standard unit of measure. More...
 
std::string XML (const Unit::TemperatureGradient unit) const
 Serializes this physical quantity as an XML message. This physical quantity's value is expressed in the given unit of measure. More...
 
std::string YAML () const
 Serializes this physical quantity as a YAML message. This physical quantity's value is expressed in its standard unit of measure. More...
 
std::string YAML (const Unit::TemperatureGradient unit) const
 Serializes this physical quantity as a YAML message. This physical quantity's value is expressed in the given unit of measure. More...
 

Static Public Member Functions

static constexpr ScalarTemperatureGradient< NumericType > Zero ()
 Statically creates a scalar temperature gradient of zero. More...
 
template<Unit::TemperatureGradient Unit>
static constexpr ScalarTemperatureGradient< NumericType > Create (const NumericType value)
 Statically creates a scalar temperature gradient with a given value expressed in a given temperature gradient unit. More...
 
static constexpr const PhQ::DimensionsDimensions ()
 Physical dimension set of this physical quantity. More...
 
static constexpr Unit::TemperatureGradient Unit ()
 Standard unit of measure for this physical quantity. This physical quantity's value is stored internally in this unit of measure. More...
 

Protected Attributes

double value
 Value of this physical quantity expressed in its standard unit of measure. More...
 

Private Member Functions

constexpr ScalarTemperatureGradient (const NumericType value)
 Constructor. Constructs a scalar temperature gradient with a given value expressed in the standard temperature gradient unit. More...
 

Friends

template<typename OtherNumericType >
class PlanarTemperatureGradient
 
template<typename OtherNumericType >
class TemperatureGradient
 Temperature gradient units. More...
 

Detailed Description

template<typename NumericType = double>
class PhQ::ScalarTemperatureGradient< NumericType >

Scalar temperature gradient component or magnitude of a temperature gradient vector. For a three-dimensional Euclidean temperature gradient vector, see PhQ::TemperatureGradient. For a two-dimensional Euclidean temperature gradient vector in the XY plane, see PhQ::PlanarTemperatureGradient.

Definition at line 60 of file ScalarTemperatureGradient.hpp.

Constructor & Destructor Documentation

◆ ScalarTemperatureGradient() [1/7]

template<typename NumericType = double>
PhQ::ScalarTemperatureGradient< NumericType >::ScalarTemperatureGradient ( )
default

Default constructor. Constructs a scalar temperature gradient with an uninitialized value.

◆ ScalarTemperatureGradient() [2/7]

template<typename NumericType = double>
PhQ::ScalarTemperatureGradient< NumericType >::ScalarTemperatureGradient ( const NumericType  value,
const Unit::TemperatureGradient  unit 
)
inline

Constructor. Constructs a scalar temperature gradient with a given value expressed in a given temperature gradient unit.

Definition at line 68 of file ScalarTemperatureGradient.hpp.

◆ ScalarTemperatureGradient() [3/7]

template<typename NumericType = double>
constexpr PhQ::ScalarTemperatureGradient< NumericType >::ScalarTemperatureGradient ( const TemperatureDifference< NumericType > &  temperature_difference,
const Length< NumericType > &  length 
)
inlineconstexpr

Constructor. Constructs a scalar temperature gradient from a given temperature difference and length using the definition of temperature gradient.

Definition at line 73 of file ScalarTemperatureGradient.hpp.

◆ ~ScalarTemperatureGradient()

template<typename NumericType = double>
PhQ::ScalarTemperatureGradient< NumericType >::~ScalarTemperatureGradient ( )
defaultnoexcept

Destructor. Destroys this scalar temperature gradient.

◆ ScalarTemperatureGradient() [4/7]

template<typename NumericType = double>
constexpr PhQ::ScalarTemperatureGradient< NumericType >::ScalarTemperatureGradient ( const ScalarTemperatureGradient< NumericType > &  other)
constexprdefault

Copy constructor. Constructs a scalar temperature gradient by copying another one.

◆ ScalarTemperatureGradient() [5/7]

template<typename NumericType = double>
template<typename OtherNumericType >
constexpr PhQ::ScalarTemperatureGradient< NumericType >::ScalarTemperatureGradient ( const ScalarTemperatureGradient< OtherNumericType > &  other)
inlineexplicitconstexpr

Copy constructor. Constructs a scalar temperature gradient by copying another one.

Definition at line 87 of file ScalarTemperatureGradient.hpp.

◆ ScalarTemperatureGradient() [6/7]

template<typename NumericType = double>
constexpr PhQ::ScalarTemperatureGradient< NumericType >::ScalarTemperatureGradient ( ScalarTemperatureGradient< NumericType > &&  other)
constexprdefaultnoexcept

Move constructor. Constructs a scalar temperature gradient by moving another one.

◆ ScalarTemperatureGradient() [7/7]

template<typename NumericType = double>
constexpr PhQ::ScalarTemperatureGradient< NumericType >::ScalarTemperatureGradient ( const NumericType  value)
inlineexplicitconstexprprivate

Constructor. Constructs a scalar temperature gradient with a given value expressed in the standard temperature gradient unit.

Definition at line 183 of file ScalarTemperatureGradient.hpp.

Member Function Documentation

◆ Create()

template<typename NumericType = double>
template<Unit::TemperatureGradient Unit>
static constexpr ScalarTemperatureGradient<NumericType> PhQ::ScalarTemperatureGradient< NumericType >::Create ( const NumericType  value)
inlinestaticconstexpr

Statically creates a scalar temperature gradient with a given value expressed in a given temperature gradient unit.

Definition at line 122 of file ScalarTemperatureGradient.hpp.

References PhQ::DimensionalScalar< Unit::TemperatureGradient, double >::value.

◆ Dimensions()

static constexpr const PhQ::Dimensions& PhQ::DimensionalScalar< Unit::TemperatureGradient , double >::Dimensions ( )
inlinestaticconstexprinherited

Physical dimension set of this physical quantity.

Definition at line 54 of file DimensionalScalar.hpp.

◆ JSON() [1/2]

std::string PhQ::DimensionalScalar< Unit::TemperatureGradient , double >::JSON ( ) const
inlineinherited

Serializes this physical quantity as a JSON message. This physical quantity's value is expressed in its standard unit of measure.

Definition at line 107 of file DimensionalScalar.hpp.

◆ JSON() [2/2]

std::string PhQ::DimensionalScalar< Unit::TemperatureGradient , double >::JSON ( const Unit::TemperatureGradient  unit) const
inlineinherited

Serializes this physical quantity as a JSON message. This physical quantity's value is expressed in the given unit of measure.

Definition at line 117 of file DimensionalScalar.hpp.

◆ MutableValue()

constexpr double & PhQ::DimensionalScalar< Unit::TemperatureGradient , double >::MutableValue ( )
inlineconstexprnoexceptinherited

Returns the value of this physical quantity expressed in its standard unit of measure as a mutable value.

Definition at line 83 of file DimensionalScalar.hpp.

◆ operator*() [1/4]

template<typename NumericType >
constexpr TemperatureGradient< NumericType > PhQ::ScalarTemperatureGradient< NumericType >::operator* ( const Direction< NumericType > &  direction) const
inlineconstexpr

Definition at line 286 of file TemperatureGradient.hpp.

◆ operator*() [2/4]

template<typename NumericType = double>
constexpr TemperatureDifference<NumericType> PhQ::ScalarTemperatureGradient< NumericType >::operator* ( const Length< NumericType > &  length) const
inlineconstexpr

Definition at line 143 of file ScalarTemperatureGradient.hpp.

◆ operator*() [3/4]

template<typename NumericType = double>
constexpr ScalarTemperatureGradient<NumericType> PhQ::ScalarTemperatureGradient< NumericType >::operator* ( const NumericType  number) const
inlineconstexpr

◆ operator*() [4/4]

template<typename NumericType >
constexpr PlanarTemperatureGradient< NumericType > PhQ::ScalarTemperatureGradient< NumericType >::operator* ( const PlanarDirection< NumericType > &  planar_direction) const
inlineconstexpr

Definition at line 293 of file PlanarTemperatureGradient.hpp.

◆ operator*=()

template<typename NumericType = double>
constexpr void PhQ::ScalarTemperatureGradient< NumericType >::operator*= ( const NumericType  number)
inlineconstexprnoexcept

◆ operator+()

template<typename NumericType = double>
constexpr ScalarTemperatureGradient<NumericType> PhQ::ScalarTemperatureGradient< NumericType >::operator+ ( const ScalarTemperatureGradient< NumericType > &  scalar_temperature_gradient) const
inlineconstexpr

◆ operator+=()

template<typename NumericType = double>
constexpr void PhQ::ScalarTemperatureGradient< NumericType >::operator+= ( const ScalarTemperatureGradient< NumericType > &  scalar_temperature_gradient)
inlineconstexprnoexcept

◆ operator-()

template<typename NumericType = double>
constexpr ScalarTemperatureGradient<NumericType> PhQ::ScalarTemperatureGradient< NumericType >::operator- ( const ScalarTemperatureGradient< NumericType > &  scalar_temperature_gradient) const
inlineconstexpr

◆ operator-=()

template<typename NumericType = double>
constexpr void PhQ::ScalarTemperatureGradient< NumericType >::operator-= ( const ScalarTemperatureGradient< NumericType > &  scalar_temperature_gradient)
inlineconstexprnoexcept

◆ operator/() [1/2]

template<typename NumericType = double>
constexpr ScalarTemperatureGradient<NumericType> PhQ::ScalarTemperatureGradient< NumericType >::operator/ ( const NumericType  number) const
inlineconstexpr

◆ operator/() [2/2]

template<typename NumericType = double>
constexpr NumericType PhQ::ScalarTemperatureGradient< NumericType >::operator/ ( const ScalarTemperatureGradient< NumericType > &  scalar_temperature_gradient) const
inlineconstexprnoexcept

◆ operator/=()

template<typename NumericType = double>
constexpr void PhQ::ScalarTemperatureGradient< NumericType >::operator/= ( const NumericType  number)
inlineconstexprnoexcept

◆ operator=() [1/3]

template<typename NumericType = double>
constexpr ScalarTemperatureGradient<NumericType>& PhQ::ScalarTemperatureGradient< NumericType >::operator= ( const ScalarTemperatureGradient< NumericType > &  other)
constexprdefault

Copy assignment operator. Assigns this scalar temperature gradient by copying another one.

◆ operator=() [2/3]

template<typename NumericType = double>
template<typename OtherNumericType >
constexpr ScalarTemperatureGradient<NumericType>& PhQ::ScalarTemperatureGradient< NumericType >::operator= ( const ScalarTemperatureGradient< OtherNumericType > &  other)
inlineconstexpr

Copy assignment operator. Assigns this scalar temperature gradient by copying another one.

Definition at line 103 of file ScalarTemperatureGradient.hpp.

References PhQ::DimensionalScalar< UnitType, NumericType >::Value(), and PhQ::DimensionalScalar< Unit::TemperatureGradient, double >::value.

◆ operator=() [3/3]

template<typename NumericType = double>
constexpr ScalarTemperatureGradient<NumericType>& PhQ::ScalarTemperatureGradient< NumericType >::operator= ( ScalarTemperatureGradient< NumericType > &&  other)
constexprdefaultnoexcept

Move assignment operator. Assigns this scalar temperature gradient by moving another one.

◆ Print() [1/2]

std::string PhQ::DimensionalScalar< Unit::TemperatureGradient , double >::Print ( ) const
inlineinherited

Prints this physical quantity as a string. This physical quantity's value is expressed in its standard unit of measure.

Definition at line 95 of file DimensionalScalar.hpp.

◆ Print() [2/2]

std::string PhQ::DimensionalScalar< Unit::TemperatureGradient , double >::Print ( const Unit::TemperatureGradient  unit) const
inlineinherited

Prints this physical quantity as a string. This physical quantity's value is expressed in the given unit of measure.

Definition at line 101 of file DimensionalScalar.hpp.

◆ SetValue()

constexpr void PhQ::DimensionalScalar< Unit::TemperatureGradient , double >::SetValue ( const double  value)
inlineconstexprnoexceptinherited

Sets the value of this physical quantity expressed in its standard unit of measure to the given value.

Definition at line 89 of file DimensionalScalar.hpp.

◆ StaticValue()

constexpr double PhQ::DimensionalScalar< Unit::TemperatureGradient , double >::StaticValue ( ) const
inlineconstexprinherited

Value of this physical quantity expressed in a given unit of measure. This method can be evaluated statically at compile-time.

Definition at line 77 of file DimensionalScalar.hpp.

◆ Unit()

static constexpr Unit::TemperatureGradient PhQ::DimensionalScalar< Unit::TemperatureGradient , double >::Unit ( )
inlinestaticconstexprinherited

Standard unit of measure for this physical quantity. This physical quantity's value is stored internally in this unit of measure.

Definition at line 60 of file DimensionalScalar.hpp.

◆ Value() [1/2]

constexpr double PhQ::DimensionalScalar< Unit::TemperatureGradient , double >::Value ( ) const
inlineconstexprnoexceptinherited

Value of this physical quantity expressed in its standard unit of measure.

Definition at line 65 of file DimensionalScalar.hpp.

◆ Value() [2/2]

double PhQ::DimensionalScalar< Unit::TemperatureGradient , double >::Value ( const Unit::TemperatureGradient  unit) const
inlineinherited

Value of this physical quantity expressed in a given unit of measure.

Definition at line 70 of file DimensionalScalar.hpp.

◆ XML() [1/2]

std::string PhQ::DimensionalScalar< Unit::TemperatureGradient , double >::XML ( ) const
inlineinherited

Serializes this physical quantity as an XML message. This physical quantity's value is expressed in its standard unit of measure.

Definition at line 127 of file DimensionalScalar.hpp.

◆ XML() [2/2]

std::string PhQ::DimensionalScalar< Unit::TemperatureGradient , double >::XML ( const Unit::TemperatureGradient  unit) const
inlineinherited

Serializes this physical quantity as an XML message. This physical quantity's value is expressed in the given unit of measure.

Definition at line 137 of file DimensionalScalar.hpp.

◆ YAML() [1/2]

std::string PhQ::DimensionalScalar< Unit::TemperatureGradient , double >::YAML ( ) const
inlineinherited

Serializes this physical quantity as a YAML message. This physical quantity's value is expressed in its standard unit of measure.

Definition at line 147 of file DimensionalScalar.hpp.

◆ YAML() [2/2]

std::string PhQ::DimensionalScalar< Unit::TemperatureGradient , double >::YAML ( const Unit::TemperatureGradient  unit) const
inlineinherited

Serializes this physical quantity as a YAML message. This physical quantity's value is expressed in the given unit of measure.

Definition at line 157 of file DimensionalScalar.hpp.

◆ Zero()

template<typename NumericType = double>
static constexpr ScalarTemperatureGradient<NumericType> PhQ::ScalarTemperatureGradient< NumericType >::Zero ( )
inlinestaticconstexpr

Statically creates a scalar temperature gradient of zero.

Definition at line 115 of file ScalarTemperatureGradient.hpp.

Friends And Related Function Documentation

◆ PlanarTemperatureGradient

template<typename NumericType = double>
template<typename OtherNumericType >
friend class PlanarTemperatureGradient
friend

Definition at line 187 of file ScalarTemperatureGradient.hpp.

◆ TemperatureGradient

template<typename NumericType = double>
template<typename OtherNumericType >
friend class TemperatureGradient
friend

Temperature gradient units.

Definition at line 190 of file ScalarTemperatureGradient.hpp.

Member Data Documentation

◆ value

double PhQ::DimensionalScalar< Unit::TemperatureGradient , double >::value
protectedinherited

Value of this physical quantity expressed in its standard unit of measure.

Definition at line 221 of file DimensionalScalar.hpp.


The documentation for this class was generated from the following files: