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::ScalarHeatFlux< NumericType > Class Template Reference

Scalar heat flux component or magnitude of a heat flux vector. For a three-dimensional Euclidean heat flux vector, see PhQ::HeatFlux. For a two-dimensional Euclidean heat flux vector in the XY plane, see PhQ::PlanarHeatFlux. More...

#include "ScalarHeatFlux.hpp"

Public Member Functions

 ScalarHeatFlux ()=default
 Default constructor. Constructs a scalar heat flux with an uninitialized value. More...
 
 ScalarHeatFlux (const NumericType value, const Unit::EnergyFlux unit)
 Constructor. Constructs a scalar heat flux with a given value expressed in a given energy flux unit. More...
 
constexpr ScalarHeatFlux (const ScalarThermalConductivity< NumericType > &scalar_thermal_conductivity, const ScalarTemperatureGradient< NumericType > &scalar_temperature_gradient)
 Constructor. Constructs a scalar heat flux from a given scalar thermal conductivity and scalar temperature gradient using Fourier's law of heat conduction. Since heat flows opposite the temperature gradient, the resulting scalar heat flux is negative. More...
 
 ~ScalarHeatFlux () noexcept=default
 Destructor. Destroys this scalar heat flux. More...
 
constexpr ScalarHeatFlux (const ScalarHeatFlux< NumericType > &other)=default
 Copy constructor. Constructs a scalar heat flux by copying another one. More...
 
template<typename OtherNumericType >
constexpr ScalarHeatFlux (const ScalarHeatFlux< OtherNumericType > &other)
 Copy constructor. Constructs a scalar heat flux by copying another one. More...
 
constexpr ScalarHeatFlux (ScalarHeatFlux< NumericType > &&other) noexcept=default
 Move constructor. Constructs a scalar heat flux by moving another one. More...
 
constexpr ScalarHeatFlux< NumericType > & operator= (const ScalarHeatFlux< NumericType > &other)=default
 Copy assignment operator. Assigns this scalar heat flux by copying another one. More...
 
template<typename OtherNumericType >
constexpr ScalarHeatFlux< NumericType > & operator= (const ScalarHeatFlux< OtherNumericType > &other)
 Copy assignment operator. Assigns this scalar heat flux by copying another one. More...
 
constexpr ScalarHeatFlux< NumericType > & operator= (ScalarHeatFlux< NumericType > &&other) noexcept=default
 Move assignment operator. Assigns this scalar heat flux by moving another one. More...
 
constexpr ScalarHeatFlux< NumericType > operator+ (const ScalarHeatFlux< NumericType > &scalar_heat_flux) const
 
constexpr ScalarHeatFlux< NumericType > operator- (const ScalarHeatFlux< NumericType > &scalar_heat_flux) const
 
constexpr ScalarHeatFlux< NumericType > operator* (const NumericType number) const
 
constexpr PlanarHeatFlux< NumericType > operator* (const PlanarDirection< NumericType > &planar_direction) const
 
constexpr HeatFlux< NumericType > operator* (const Direction< NumericType > &direction) const
 
constexpr ScalarHeatFlux< NumericType > operator/ (const NumericType number) const
 
constexpr NumericType operator/ (const ScalarHeatFlux< NumericType > &scalar_heat_flux) const noexcept
 
constexpr void operator+= (const ScalarHeatFlux< NumericType > &scalar_heat_flux) noexcept
 
constexpr void operator-= (const ScalarHeatFlux< NumericType > &scalar_heat_flux) 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::EnergyFlux 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::EnergyFlux 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::EnergyFlux 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::EnergyFlux 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::EnergyFlux 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 ScalarHeatFlux< NumericType > Zero ()
 Statically creates a scalar heat flux of zero. More...
 
template<Unit::EnergyFlux Unit>
static constexpr ScalarHeatFlux< NumericType > Create (const NumericType value)
 Statically creates a scalar heat flux with a given value expressed in a given energy flux unit. More...
 
static constexpr const PhQ::DimensionsDimensions ()
 Physical dimension set of this physical quantity. More...
 
static constexpr Unit::EnergyFlux 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 ScalarHeatFlux (const NumericType value)
 Constructor. Constructs a scalar heat flux with a given value expressed in the standard energy flux unit. More...
 

Friends

template<typename OtherNumericType >
class PlanarHeatFlux
 
template<typename OtherNumericType >
class HeatFlux
 

Detailed Description

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

Scalar heat flux component or magnitude of a heat flux vector. For a three-dimensional Euclidean heat flux vector, see PhQ::HeatFlux. For a two-dimensional Euclidean heat flux vector in the XY plane, see PhQ::PlanarHeatFlux.

Definition at line 51 of file ScalarHeatFlux.hpp.

Constructor & Destructor Documentation

◆ ScalarHeatFlux() [1/7]

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

Default constructor. Constructs a scalar heat flux with an uninitialized value.

◆ ScalarHeatFlux() [2/7]

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

Constructor. Constructs a scalar heat flux with a given value expressed in a given energy flux unit.

Definition at line 58 of file ScalarHeatFlux.hpp.

◆ ScalarHeatFlux() [3/7]

template<typename NumericType = double>
constexpr PhQ::ScalarHeatFlux< NumericType >::ScalarHeatFlux ( const ScalarThermalConductivity< NumericType > &  scalar_thermal_conductivity,
const ScalarTemperatureGradient< NumericType > &  scalar_temperature_gradient 
)
inlineconstexpr

Constructor. Constructs a scalar heat flux from a given scalar thermal conductivity and scalar temperature gradient using Fourier's law of heat conduction. Since heat flows opposite the temperature gradient, the resulting scalar heat flux is negative.

Definition at line 64 of file ScalarHeatFlux.hpp.

◆ ~ScalarHeatFlux()

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

Destructor. Destroys this scalar heat flux.

◆ ScalarHeatFlux() [4/7]

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

Copy constructor. Constructs a scalar heat flux by copying another one.

◆ ScalarHeatFlux() [5/7]

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

Copy constructor. Constructs a scalar heat flux by copying another one.

Definition at line 78 of file ScalarHeatFlux.hpp.

◆ ScalarHeatFlux() [6/7]

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

Move constructor. Constructs a scalar heat flux by moving another one.

◆ ScalarHeatFlux() [7/7]

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

Constructor. Constructs a scalar heat flux with a given value expressed in the standard energy flux unit.

Definition at line 159 of file ScalarHeatFlux.hpp.

Member Function Documentation

◆ Create()

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

Statically creates a scalar heat flux with a given value expressed in a given energy flux unit.

Definition at line 107 of file ScalarHeatFlux.hpp.

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

◆ Dimensions()

static constexpr const PhQ::Dimensions& PhQ::DimensionalScalar< Unit::EnergyFlux , 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::EnergyFlux , 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::EnergyFlux , double >::JSON ( const Unit::EnergyFlux  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::EnergyFlux , 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/3]

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

Definition at line 286 of file HeatFlux.hpp.

◆ operator*() [2/3]

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

◆ operator*() [3/3]

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

Definition at line 290 of file PlanarHeatFlux.hpp.

◆ operator*=()

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

◆ operator+()

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

◆ operator+=()

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

◆ operator-()

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

◆ operator-=()

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

◆ operator/() [1/2]

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

◆ operator/() [2/2]

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

◆ operator/=()

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

◆ operator=() [1/3]

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

Copy assignment operator. Assigns this scalar heat flux by copying another one.

◆ operator=() [2/3]

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

Copy assignment operator. Assigns this scalar heat flux by copying another one.

Definition at line 90 of file ScalarHeatFlux.hpp.

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

◆ operator=() [3/3]

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

Move assignment operator. Assigns this scalar heat flux by moving another one.

◆ Print() [1/2]

std::string PhQ::DimensionalScalar< Unit::EnergyFlux , 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::EnergyFlux , double >::Print ( const Unit::EnergyFlux  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::EnergyFlux , 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::EnergyFlux , 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::EnergyFlux PhQ::DimensionalScalar< Unit::EnergyFlux , 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::EnergyFlux , 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::EnergyFlux , double >::Value ( const Unit::EnergyFlux  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::EnergyFlux , 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::EnergyFlux , double >::XML ( const Unit::EnergyFlux  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::EnergyFlux , 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::EnergyFlux , double >::YAML ( const Unit::EnergyFlux  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 ScalarHeatFlux<NumericType> PhQ::ScalarHeatFlux< NumericType >::Zero ( )
inlinestaticconstexpr

Statically creates a scalar heat flux of zero.

Definition at line 100 of file ScalarHeatFlux.hpp.

Friends And Related Function Documentation

◆ HeatFlux

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

Definition at line 166 of file ScalarHeatFlux.hpp.

◆ PlanarHeatFlux

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

Definition at line 163 of file ScalarHeatFlux.hpp.

Member Data Documentation

◆ value

double PhQ::DimensionalScalar< Unit::EnergyFlux , 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: