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 | List of all members
PhQ::TemperatureGradient< NumericType > Class Template Reference

Three-dimensional Euclidean temperature gradient vector. Contains three components in Cartesian coordinates: x, y, and z. For a two-dimensional Euclidean temperature gradient vector in the XY plane, see PhQ::PlanarTemperatureGradient. For scalar temperature gradient components or for the magnitude of a temperature gradient vector, see PhQ::ScalarTemperatureGradient. More...

#include "TemperatureGradient.hpp"

Public Member Functions

 TemperatureGradient ()=default
 Default constructor. Constructs a temperature gradient vector with an uninitialized value. More...
 
 TemperatureGradient (const Vector< NumericType > &value, const Unit::TemperatureGradient unit)
 Constructor. Constructs a temperature gradient vector with a given value expressed in a given temperature gradient unit. More...
 
 TemperatureGradient (const ScalarTemperatureGradient< NumericType > &x, const ScalarTemperatureGradient< NumericType > &y, const ScalarTemperatureGradient< NumericType > &z)
 Constructor. Constructs a temperature gradient vector from a given set of scalar temperature gradient components. More...
 
constexpr TemperatureGradient (const ScalarTemperatureGradient< NumericType > &scalar_temperature_gradient, const Direction< NumericType > &direction)
 Constructor. Constructs a temperature gradient vector from a given scalar temperature gradient magnitude and direction. More...
 
constexpr TemperatureGradient (const PlanarTemperatureGradient< NumericType > &planar_temperature_gradient)
 Constructor. Constructs a temperature gradient vector from a given planar temperature gradient vector in the XY plane. This temperature gradient vector's z-component is initialized to zero. More...
 
 ~TemperatureGradient () noexcept=default
 Destructor. Destroys this temperature gradient vector. More...
 
constexpr TemperatureGradient (const TemperatureGradient< NumericType > &other)=default
 Copy constructor. Constructs a temperature gradient vector by copying another one. More...
 
template<typename OtherNumericType >
constexpr TemperatureGradient (const TemperatureGradient< OtherNumericType > &other)
 Copy constructor. Constructs a temperature gradient vector by copying another one. More...
 
constexpr TemperatureGradient (TemperatureGradient< NumericType > &&other) noexcept=default
 Move constructor. Constructs a temperature gradient vector by moving another one. More...
 
constexpr TemperatureGradient< NumericType > & operator= (const TemperatureGradient< NumericType > &other)=default
 Copy assignment operator. Assigns this temperature gradient vector by copying another one. More...
 
template<typename OtherNumericType >
constexpr TemperatureGradient< NumericType > & operator= (const TemperatureGradient< OtherNumericType > &other)
 Copy assignment operator. Assigns this temperature gradient vector by copying another one. More...
 
constexpr TemperatureGradient< NumericType > & operator= (TemperatureGradient< NumericType > &&other) noexcept=default
 Move assignment operator. Assigns this temperature gradient vector by moving another one. More...
 
constexpr ScalarTemperatureGradient< NumericType > x () const noexcept
 Returns the x Cartesian component of this temperature gradient vector. More...
 
constexpr ScalarTemperatureGradient< NumericType > y () const noexcept
 Returns the y Cartesian component of this temperature gradient vector. More...
 
constexpr ScalarTemperatureGradient< NumericType > z () const noexcept
 Returns the z Cartesian component of this temperature gradient vector. More...
 
ScalarTemperatureGradient< NumericType > Magnitude () const
 Returns the magnitude of this temperature gradient vector. More...
 
PhQ::Direction< NumericType > Direction () const
 Returns the direction of this temperature gradient vector. More...
 
PhQ::Angle< NumericType > Angle (const TemperatureGradient< NumericType > &temperature_gradient) const
 Returns the angle between this temperature gradient vector and another one. More...
 
constexpr TemperatureGradient< NumericType > operator+ (const TemperatureGradient< NumericType > &temperature_gradient) const
 
constexpr TemperatureGradient< NumericType > operator- (const TemperatureGradient< NumericType > &temperature_gradient) const
 
constexpr TemperatureGradient< NumericType > operator* (const NumericType number) const
 
constexpr TemperatureGradient< NumericType > operator/ (const NumericType number) const
 
constexpr void operator+= (const TemperatureGradient< NumericType > &temperature_gradient) noexcept
 
constexpr void operator-= (const TemperatureGradient< NumericType > &temperature_gradient) noexcept
 
constexpr void operator*= (const NumericType number) noexcept
 
constexpr void operator/= (const NumericType number) noexcept
 
constexpr const PhQ::Vector< double > & Value () const noexcept
 Value of this physical quantity expressed in its standard unit of measure. More...
 
PhQ::Vector< double > Value (const Unit::TemperatureGradient unit) const
 Value of this physical quantity expressed in a given unit of measure. More...
 
constexpr PhQ::Vector< 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 PhQ::Vector< 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 PhQ::Vector< 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 TemperatureGradient< NumericType > Zero ()
 Statically creates a temperature gradient vector of zero. More...
 
template<Unit::TemperatureGradient Unit>
static constexpr TemperatureGradient< NumericType > Create (const NumericType x, const NumericType y, const NumericType z)
 Statically creates a temperature gradient vector from the given x, y, and z Cartesian components expressed in a given temperature gradient unit. More...
 
template<Unit::TemperatureGradient Unit>
static constexpr TemperatureGradient< NumericType > Create (const std::array< NumericType, 3 > &x_y_z)
 Statically creates a temperature gradient vector from the given x, y, and z Cartesian components expressed in a given temperature gradient unit. More...
 
template<Unit::TemperatureGradient Unit>
static constexpr TemperatureGradient< NumericType > Create (const Vector< NumericType > &value)
 Statically creates a temperature gradient vector 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

PhQ::Vector< double > value
 Value of this physical quantity expressed in its standard unit of measure. More...
 

Private Member Functions

constexpr TemperatureGradient (const Vector< NumericType > &value)
 Constructor. Constructs a temperature gradient vector with a given value expressed in the standard temperature gradient unit. More...
 

Detailed Description

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

Three-dimensional Euclidean temperature gradient vector. Contains three components in Cartesian coordinates: x, y, and z. For a two-dimensional Euclidean temperature gradient vector in the XY plane, see PhQ::PlanarTemperatureGradient. For scalar temperature gradient components or for the magnitude of a temperature gradient vector, see PhQ::ScalarTemperatureGradient.

Definition at line 48 of file TemperatureGradient.hpp.

Constructor & Destructor Documentation

◆ TemperatureGradient() [1/9]

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

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

◆ TemperatureGradient() [2/9]

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

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

Definition at line 56 of file TemperatureGradient.hpp.

◆ TemperatureGradient() [3/9]

template<typename NumericType = double>
PhQ::TemperatureGradient< NumericType >::TemperatureGradient ( const ScalarTemperatureGradient< NumericType > &  x,
const ScalarTemperatureGradient< NumericType > &  y,
const ScalarTemperatureGradient< NumericType > &  z 
)
inline

Constructor. Constructs a temperature gradient vector from a given set of scalar temperature gradient components.

Definition at line 61 of file TemperatureGradient.hpp.

References PhQ::TemperatureGradient< NumericType >::x(), PhQ::TemperatureGradient< NumericType >::y(), and PhQ::TemperatureGradient< NumericType >::z().

◆ TemperatureGradient() [4/9]

template<typename NumericType = double>
constexpr PhQ::TemperatureGradient< NumericType >::TemperatureGradient ( const ScalarTemperatureGradient< NumericType > &  scalar_temperature_gradient,
const Direction< NumericType > &  direction 
)
inlineconstexpr

Constructor. Constructs a temperature gradient vector from a given scalar temperature gradient magnitude and direction.

Definition at line 68 of file TemperatureGradient.hpp.

◆ TemperatureGradient() [5/9]

template<typename NumericType = double>
constexpr PhQ::TemperatureGradient< NumericType >::TemperatureGradient ( const PlanarTemperatureGradient< NumericType > &  planar_temperature_gradient)
inlineexplicitconstexpr

Constructor. Constructs a temperature gradient vector from a given planar temperature gradient vector in the XY plane. This temperature gradient vector's z-component is initialized to zero.

Definition at line 76 of file TemperatureGradient.hpp.

References PhQ::DimensionalPlanarVector< UnitType, NumericType >::Value().

◆ ~TemperatureGradient()

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

Destructor. Destroys this temperature gradient vector.

◆ TemperatureGradient() [6/9]

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

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

◆ TemperatureGradient() [7/9]

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

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

Definition at line 88 of file TemperatureGradient.hpp.

◆ TemperatureGradient() [8/9]

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

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

◆ TemperatureGradient() [9/9]

template<typename NumericType = double>
constexpr PhQ::TemperatureGradient< NumericType >::TemperatureGradient ( const Vector< NumericType > &  value)
inlineexplicitconstexprprivate

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

Definition at line 216 of file TemperatureGradient.hpp.

Member Function Documentation

◆ Angle()

template<typename NumericType = double>
PhQ::Angle<NumericType> PhQ::TemperatureGradient< NumericType >::Angle ( const TemperatureGradient< NumericType > &  temperature_gradient) const
inline

Returns the angle between this temperature gradient vector and another one.

Definition at line 174 of file TemperatureGradient.hpp.

◆ Create() [1/3]

template<typename NumericType = double>
template<Unit::TemperatureGradient Unit>
static constexpr TemperatureGradient<NumericType> PhQ::TemperatureGradient< NumericType >::Create ( const NumericType  x,
const NumericType  y,
const NumericType  z 
)
inlinestaticconstexpr

Statically creates a temperature gradient vector from the given x, y, and z Cartesian components expressed in a given temperature gradient unit.

Definition at line 121 of file TemperatureGradient.hpp.

References PhQ::TemperatureGradient< NumericType >::x(), PhQ::TemperatureGradient< NumericType >::y(), and PhQ::TemperatureGradient< NumericType >::z().

◆ Create() [2/3]

template<typename NumericType = double>
template<Unit::TemperatureGradient Unit>
static constexpr TemperatureGradient<NumericType> PhQ::TemperatureGradient< NumericType >::Create ( const std::array< NumericType, 3 > &  x_y_z)
inlinestaticconstexpr

Statically creates a temperature gradient vector from the given x, y, and z Cartesian components expressed in a given temperature gradient unit.

Definition at line 131 of file TemperatureGradient.hpp.

◆ Create() [3/3]

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

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

Definition at line 141 of file TemperatureGradient.hpp.

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

◆ Dimensions()

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

Physical dimension set of this physical quantity.

Definition at line 50 of file DimensionalVector.hpp.

◆ Direction()

template<typename NumericType = double>
PhQ::Direction<NumericType> PhQ::TemperatureGradient< NumericType >::Direction ( ) const
inline

Returns the direction of this temperature gradient vector.

Definition at line 169 of file TemperatureGradient.hpp.

References PhQ::Vector< NumericType >::Direction(), and PhQ::DimensionalVector< Unit::TemperatureGradient, double >::value.

◆ JSON() [1/2]

std::string PhQ::DimensionalVector< 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 103 of file DimensionalVector.hpp.

◆ JSON() [2/2]

std::string PhQ::DimensionalVector< 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 113 of file DimensionalVector.hpp.

◆ Magnitude()

template<typename NumericType = double>
ScalarTemperatureGradient<NumericType> PhQ::TemperatureGradient< NumericType >::Magnitude ( ) const
inline

Returns the magnitude of this temperature gradient vector.

Definition at line 164 of file TemperatureGradient.hpp.

References PhQ::Vector< NumericType >::Magnitude(), and PhQ::DimensionalVector< Unit::TemperatureGradient, double >::value.

◆ MutableValue()

constexpr PhQ::Vector<double >& PhQ::DimensionalVector< 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 79 of file DimensionalVector.hpp.

◆ operator*()

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

◆ operator*=()

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

◆ operator+()

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

◆ operator+=()

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

◆ operator-()

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

◆ operator-=()

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

◆ operator/()

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

◆ operator/=()

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

◆ operator=() [1/3]

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

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

◆ operator=() [2/3]

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

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

Definition at line 102 of file TemperatureGradient.hpp.

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

◆ operator=() [3/3]

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

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

◆ Print() [1/2]

std::string PhQ::DimensionalVector< 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 91 of file DimensionalVector.hpp.

◆ Print() [2/2]

std::string PhQ::DimensionalVector< 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 97 of file DimensionalVector.hpp.

◆ SetValue()

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

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

Definition at line 85 of file DimensionalVector.hpp.

◆ StaticValue()

constexpr PhQ::Vector<double > PhQ::DimensionalVector< 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 73 of file DimensionalVector.hpp.

◆ Unit()

static constexpr Unit::TemperatureGradient PhQ::DimensionalVector< 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 56 of file DimensionalVector.hpp.

◆ Value() [1/2]

constexpr const PhQ::Vector<double >& PhQ::DimensionalVector< Unit::TemperatureGradient , double >::Value ( ) const
inlineconstexprnoexceptinherited

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

Definition at line 61 of file DimensionalVector.hpp.

◆ Value() [2/2]

PhQ::Vector<double > PhQ::DimensionalVector< 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 66 of file DimensionalVector.hpp.

◆ x()

template<typename NumericType = double>
constexpr ScalarTemperatureGradient<NumericType> PhQ::TemperatureGradient< NumericType >::x ( ) const
inlineconstexprnoexcept

◆ XML() [1/2]

std::string PhQ::DimensionalVector< 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 123 of file DimensionalVector.hpp.

◆ XML() [2/2]

std::string PhQ::DimensionalVector< 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 133 of file DimensionalVector.hpp.

◆ y()

template<typename NumericType = double>
constexpr ScalarTemperatureGradient<NumericType> PhQ::TemperatureGradient< NumericType >::y ( ) const
inlineconstexprnoexcept

◆ YAML() [1/2]

std::string PhQ::DimensionalVector< 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 143 of file DimensionalVector.hpp.

◆ YAML() [2/2]

std::string PhQ::DimensionalVector< 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 153 of file DimensionalVector.hpp.

◆ z()

template<typename NumericType = double>
constexpr ScalarTemperatureGradient<NumericType> PhQ::TemperatureGradient< NumericType >::z ( ) const
inlineconstexprnoexcept

◆ Zero()

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

Statically creates a temperature gradient vector of zero.

Definition at line 114 of file TemperatureGradient.hpp.

References PhQ::Vector< NumericType >::Zero().

Member Data Documentation

◆ value

PhQ::Vector<double > PhQ::DimensionalVector< Unit::TemperatureGradient , double >::value
protectedinherited

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

Definition at line 217 of file DimensionalVector.hpp.


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