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

Dynamic kinematic pressure, which is dynamic pressure divided by mass density; see PhQ::DynamicPressure and PhQ::MassDensity. More...

#include "DynamicKinematicPressure.hpp"

Public Member Functions

 DynamicKinematicPressure ()=default
 Default constructor. Constructs a dynamic kinematic pressure with an uninitialized value. More...
 
 DynamicKinematicPressure (const NumericType value, const Unit::SpecificEnergy unit)
 Constructor. Constructs a dynamic kinematic pressure with a given value expressed in a given specific energy unit. More...
 
constexpr DynamicKinematicPressure (const Speed< NumericType > &speed)
 Constructor. Constructs a dynamic kinematic pressure from a given speed using the definition of dynamic kinematic pressure. More...
 
constexpr DynamicKinematicPressure (const TotalKinematicPressure< NumericType > &total_kinematic_pressure, const StaticKinematicPressure< NumericType > &static_kinematic_pressure)
 Constructor. Constructs a dynamic kinematic pressure from a given total kinematic pressure and static kinematic pressure using the definition of total kinematic pressure. More...
 
constexpr DynamicKinematicPressure (const DynamicPressure< NumericType > &dynamic_pressure, const MassDensity< NumericType > &mass_density)
 Constructor. Constructs a dynamic kinematic pressure from a given dynamic pressure and mass density using the definition of dynamic kinematic pressure. More...
 
 ~DynamicKinematicPressure () noexcept=default
 Destructor. Destroys this dynamic kinematic pressure. More...
 
constexpr DynamicKinematicPressure (const DynamicKinematicPressure< NumericType > &other)=default
 Copy constructor. Constructs a dynamic kinematic pressure by copying another one. More...
 
template<typename OtherNumericType >
constexpr DynamicKinematicPressure (const DynamicKinematicPressure< OtherNumericType > &other)
 Copy constructor. Constructs a dynamic kinematic pressure by copying another one. More...
 
constexpr DynamicKinematicPressure (DynamicKinematicPressure< NumericType > &&other) noexcept=default
 Move constructor. Constructs a dynamic kinematic pressure by moving another one. More...
 
constexpr DynamicKinematicPressure< NumericType > & operator= (const DynamicKinematicPressure< NumericType > &other)=default
 Copy assignment operator. Assigns this dynamic kinematic pressure by copying another one. More...
 
template<typename OtherNumericType >
constexpr DynamicKinematicPressure< NumericType > & operator= (const DynamicKinematicPressure< OtherNumericType > &other)
 Copy assignment operator. Assigns this dynamic kinematic pressure by copying another one. More...
 
constexpr DynamicKinematicPressure< NumericType > & operator= (DynamicKinematicPressure< NumericType > &&other) noexcept=default
 Move assignment operator. Assigns this dynamic kinematic pressure by moving another one. More...
 
constexpr DynamicKinematicPressure< NumericType > operator+ (const DynamicKinematicPressure< NumericType > &dynamic_kinematic_pressure) const
 
constexpr TotalKinematicPressure< NumericType > operator+ (const StaticKinematicPressure< NumericType > &static_kinematic_pressure) const
 
constexpr DynamicKinematicPressure< NumericType > operator- (const DynamicKinematicPressure< NumericType > &dynamic_kinematic_pressure) const
 
constexpr DynamicKinematicPressure< NumericType > operator* (const NumericType number) const
 
constexpr DynamicKinematicPressure< NumericType > operator/ (const NumericType number) const
 
constexpr NumericType operator/ (const DynamicKinematicPressure< NumericType > &dynamic_kinematic_pressure) const noexcept
 
constexpr void operator+= (const DynamicKinematicPressure< NumericType > &dynamic_kinematic_pressure) noexcept
 
constexpr void operator-= (const DynamicKinematicPressure< NumericType > &dynamic_kinematic_pressure) 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::SpecificEnergy 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::SpecificEnergy 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::SpecificEnergy 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::SpecificEnergy 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::SpecificEnergy 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 DynamicKinematicPressure< NumericType > Zero ()
 Statically creates a dynamic kinematic pressure of zero. More...
 
template<Unit::SpecificEnergy Unit>
static constexpr DynamicKinematicPressure< NumericType > Create (const NumericType value)
 Statically creates a dynamic kinematic pressure with a given value expressed in a given specific energy unit. More...
 
static constexpr const PhQ::DimensionsDimensions ()
 Physical dimension set of this physical quantity. More...
 
static constexpr Unit::SpecificEnergy 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 DynamicKinematicPressure (const NumericType value)
 Constructor. Constructs a dynamic kinematic pressure with a given value expressed in the standard specific energy unit. More...
 

Detailed Description

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

Dynamic kinematic pressure, which is dynamic pressure divided by mass density; see PhQ::DynamicPressure and PhQ::MassDensity.

Definition at line 45 of file DynamicKinematicPressure.hpp.

Constructor & Destructor Documentation

◆ DynamicKinematicPressure() [1/9]

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

Default constructor. Constructs a dynamic kinematic pressure with an uninitialized value.

◆ DynamicKinematicPressure() [2/9]

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

Constructor. Constructs a dynamic kinematic pressure with a given value expressed in a given specific energy unit.

Definition at line 53 of file DynamicKinematicPressure.hpp.

◆ DynamicKinematicPressure() [3/9]

template<typename NumericType = double>
constexpr PhQ::DynamicKinematicPressure< NumericType >::DynamicKinematicPressure ( const Speed< NumericType > &  speed)
inlineexplicitconstexpr

Constructor. Constructs a dynamic kinematic pressure from a given speed using the definition of dynamic kinematic pressure.

Definition at line 58 of file DynamicKinematicPressure.hpp.

◆ DynamicKinematicPressure() [4/9]

template<typename NumericType >
constexpr PhQ::DynamicKinematicPressure< NumericType >::DynamicKinematicPressure ( const TotalKinematicPressure< NumericType > &  total_kinematic_pressure,
const StaticKinematicPressure< NumericType > &  static_kinematic_pressure 
)
inlineconstexpr

Constructor. Constructs a dynamic kinematic pressure from a given total kinematic pressure and static kinematic pressure using the definition of total kinematic pressure.

Definition at line 233 of file TotalKinematicPressure.hpp.

◆ DynamicKinematicPressure() [5/9]

template<typename NumericType = double>
constexpr PhQ::DynamicKinematicPressure< NumericType >::DynamicKinematicPressure ( const DynamicPressure< NumericType > &  dynamic_pressure,
const MassDensity< NumericType > &  mass_density 
)
inlineconstexpr

Constructor. Constructs a dynamic kinematic pressure from a given dynamic pressure and mass density using the definition of dynamic kinematic pressure.

Definition at line 69 of file DynamicKinematicPressure.hpp.

◆ ~DynamicKinematicPressure()

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

Destructor. Destroys this dynamic kinematic pressure.

◆ DynamicKinematicPressure() [6/9]

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

Copy constructor. Constructs a dynamic kinematic pressure by copying another one.

◆ DynamicKinematicPressure() [7/9]

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

Copy constructor. Constructs a dynamic kinematic pressure by copying another one.

Definition at line 81 of file DynamicKinematicPressure.hpp.

◆ DynamicKinematicPressure() [8/9]

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

Move constructor. Constructs a dynamic kinematic pressure by moving another one.

◆ DynamicKinematicPressure() [9/9]

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

Constructor. Constructs a dynamic kinematic pressure with a given value expressed in the standard specific energy unit.

Definition at line 169 of file DynamicKinematicPressure.hpp.

Member Function Documentation

◆ Create()

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

Statically creates a dynamic kinematic pressure with a given value expressed in a given specific energy unit.

Definition at line 116 of file DynamicKinematicPressure.hpp.

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

◆ Dimensions()

static constexpr const PhQ::Dimensions& PhQ::DimensionalScalar< Unit::SpecificEnergy , 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::SpecificEnergy , 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::SpecificEnergy , double >::JSON ( const Unit::SpecificEnergy  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::SpecificEnergy , 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*()

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

◆ operator*=()

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

◆ operator+() [1/2]

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

◆ operator+() [2/2]

template<typename NumericType >
constexpr TotalKinematicPressure< NumericType > PhQ::DynamicKinematicPressure< NumericType >::operator+ ( const StaticKinematicPressure< NumericType > &  static_kinematic_pressure) const
inlineconstexpr

Definition at line 248 of file TotalKinematicPressure.hpp.

◆ operator+=()

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

◆ operator-()

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

◆ operator-=()

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

◆ operator/() [1/2]

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

◆ operator/() [2/2]

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

◆ operator/=()

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

◆ operator=() [1/3]

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

Copy assignment operator. Assigns this dynamic kinematic pressure by copying another one.

◆ operator=() [2/3]

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

Copy assignment operator. Assigns this dynamic kinematic pressure by copying another one.

Definition at line 97 of file DynamicKinematicPressure.hpp.

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

◆ operator=() [3/3]

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

Move assignment operator. Assigns this dynamic kinematic pressure by moving another one.

◆ Print() [1/2]

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

Statically creates a dynamic kinematic pressure of zero.

Definition at line 109 of file DynamicKinematicPressure.hpp.

Member Data Documentation

◆ value

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