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

Poisson's ratio of a deformable solid material. Measures the deformation of a deformable solid material subjected to a load in directions perpendicular to the direction of loading. Poisson's ratios range from -1 to 0.5, though most deformable solid materials have a Poisson's ratio between 0 and 0.5. More...

#include "PoissonRatio.hpp"

Public Member Functions

 PoissonRatio ()=default
 Default constructor. Constructs a Poisson's ratio with an uninitialized value. More...
 
constexpr PoissonRatio (const NumericType value)
 Constructor. Constructs a Poisson's ratio with a given value. More...
 
 ~PoissonRatio () noexcept=default
 Destructor. Destroys this Poisson's ratio. More...
 
constexpr PoissonRatio (const PoissonRatio< NumericType > &other)=default
 Copy constructor. Constructs a Poisson's ratio by copying another one. More...
 
template<typename OtherNumericType >
constexpr PoissonRatio (const PoissonRatio< OtherNumericType > &other)
 Copy constructor. Constructs a Poisson's ratio by copying another one. More...
 
constexpr PoissonRatio (PoissonRatio< NumericType > &&other) noexcept=default
 Move constructor. Constructs a Poisson's ratio by moving another one. More...
 
constexpr PoissonRatio< NumericType > & operator= (const PoissonRatio< NumericType > &other)=default
 Copy assignment operator. Assigns this Poisson's ratio by copying another one. More...
 
template<typename OtherNumericType >
constexpr PoissonRatio< NumericType > & operator= (const PoissonRatio< OtherNumericType > &other)
 Copy assignment operator. Assigns this Poisson's ratio by copying another one. More...
 
constexpr PoissonRatio< NumericType > & operator= (PoissonRatio< NumericType > &&other) noexcept=default
 Move assignment operator. Assigns this Poisson's ratio by moving another one. More...
 
constexpr PoissonRatio< NumericType > operator+ (const PoissonRatio< NumericType > &poisson_ratio) const
 
constexpr PoissonRatio< NumericType > operator- (const PoissonRatio< NumericType > &poisson_ratio) const
 
constexpr PoissonRatio< NumericType > operator* (const NumericType number) const
 
constexpr PoissonRatio< NumericType > operator/ (const NumericType number) const
 
constexpr NumericType operator/ (const PoissonRatio< NumericType > &poisson_ratio) const noexcept
 
constexpr void operator+= (const PoissonRatio< NumericType > &poisson_ratio) noexcept
 
constexpr void operator-= (const PoissonRatio< NumericType > &poisson_ratio) 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. More...
 
constexpr double & MutableValue () noexcept
 Returns the value of this physical quantity as a mutable value. More...
 
constexpr void SetValue (const double value) noexcept
 Sets the value of this physical quantity to the given value. More...
 
std::string Print () const
 Prints this physical quantity as a string. More...
 
std::string JSON () const
 Serializes this physical quantity as a JSON message. More...
 
std::string XML () const
 Serializes this physical quantity as an XML message. More...
 
std::string YAML () const
 Serializes this physical quantity as a YAML message. More...
 

Static Public Member Functions

static constexpr PoissonRatio< NumericType > Zero ()
 Statically creates a Poisson's ratio of zero. More...
 
static constexpr PhQ::Dimensions Dimensions ()
 Physical dimension set of this physical quantity. Since this physical quantity is dimensionless, its physical dimension set is simply the null set. More...
 

Protected Attributes

double value
 Value of this physical quantity. More...
 

Detailed Description

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

Poisson's ratio of a deformable solid material. Measures the deformation of a deformable solid material subjected to a load in directions perpendicular to the direction of loading. Poisson's ratios range from -1 to 0.5, though most deformable solid materials have a Poisson's ratio between 0 and 0.5.

Definition at line 41 of file PoissonRatio.hpp.

Constructor & Destructor Documentation

◆ PoissonRatio() [1/5]

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

Default constructor. Constructs a Poisson's ratio with an uninitialized value.

◆ PoissonRatio() [2/5]

template<typename NumericType = double>
constexpr PhQ::PoissonRatio< NumericType >::PoissonRatio ( const NumericType  value)
inlineexplicitconstexpr

Constructor. Constructs a Poisson's ratio with a given value.

Definition at line 47 of file PoissonRatio.hpp.

◆ ~PoissonRatio()

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

Destructor. Destroys this Poisson's ratio.

◆ PoissonRatio() [3/5]

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

Copy constructor. Constructs a Poisson's ratio by copying another one.

◆ PoissonRatio() [4/5]

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

Copy constructor. Constructs a Poisson's ratio by copying another one.

Definition at line 58 of file PoissonRatio.hpp.

◆ PoissonRatio() [5/5]

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

Move constructor. Constructs a Poisson's ratio by moving another one.

Member Function Documentation

◆ Dimensions()

static constexpr PhQ::Dimensions PhQ::DimensionlessScalar< double >::Dimensions ( )
inlinestaticconstexprinherited

Physical dimension set of this physical quantity. Since this physical quantity is dimensionless, its physical dimension set is simply the null set.

Definition at line 55 of file DimensionlessScalar.hpp.

◆ JSON()

std::string PhQ::DimensionlessScalar< double >::JSON ( ) const
inlineinherited

Serializes this physical quantity as a JSON message.

Definition at line 80 of file DimensionlessScalar.hpp.

◆ MutableValue()

constexpr double & PhQ::DimensionlessScalar< double >::MutableValue ( )
inlineconstexprnoexceptinherited

Returns the value of this physical quantity as a mutable value.

Definition at line 65 of file DimensionlessScalar.hpp.

◆ operator*()

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

Definition at line 93 of file PoissonRatio.hpp.

References PhQ::DimensionlessScalar< double >::value.

◆ operator*=()

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

Definition at line 113 of file PoissonRatio.hpp.

References PhQ::DimensionlessScalar< double >::value.

◆ operator+()

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

◆ operator+=()

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

Definition at line 105 of file PoissonRatio.hpp.

References PhQ::DimensionlessScalar< double >::value.

◆ operator-()

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

◆ operator-=()

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

Definition at line 109 of file PoissonRatio.hpp.

References PhQ::DimensionlessScalar< double >::value.

◆ operator/() [1/2]

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

Definition at line 97 of file PoissonRatio.hpp.

References PhQ::DimensionlessScalar< double >::value.

◆ operator/() [2/2]

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

Definition at line 101 of file PoissonRatio.hpp.

References PhQ::DimensionlessScalar< double >::value.

◆ operator/=()

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

Definition at line 117 of file PoissonRatio.hpp.

References PhQ::DimensionlessScalar< double >::value.

◆ operator=() [1/3]

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

Copy assignment operator. Assigns this Poisson's ratio by copying another one.

◆ operator=() [2/3]

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

Copy assignment operator. Assigns this Poisson's ratio by copying another one.

Definition at line 69 of file PoissonRatio.hpp.

References PhQ::DimensionlessScalar< NumericType >::Value(), and PhQ::DimensionlessScalar< double >::value.

◆ operator=() [3/3]

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

Move assignment operator. Assigns this Poisson's ratio by moving another one.

◆ Print()

std::string PhQ::DimensionlessScalar< double >::Print ( ) const
inlineinherited

Prints this physical quantity as a string.

Definition at line 75 of file DimensionlessScalar.hpp.

◆ SetValue()

constexpr void PhQ::DimensionlessScalar< double >::SetValue ( const NumericType  value)
inlineconstexprnoexceptinherited

Sets the value of this physical quantity to the given value.

Definition at line 70 of file DimensionlessScalar.hpp.

◆ Value()

constexpr double PhQ::DimensionlessScalar< double >::Value ( ) const
inlineconstexprnoexceptinherited

Value of this physical quantity.

Definition at line 60 of file DimensionlessScalar.hpp.

◆ XML()

std::string PhQ::DimensionlessScalar< double >::XML ( ) const
inlineinherited

Serializes this physical quantity as an XML message.

Definition at line 85 of file DimensionlessScalar.hpp.

◆ YAML()

std::string PhQ::DimensionlessScalar< double >::YAML ( ) const
inlineinherited

Serializes this physical quantity as a YAML message.

Definition at line 90 of file DimensionlessScalar.hpp.

◆ Zero()

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

Statically creates a Poisson's ratio of zero.

Definition at line 79 of file PoissonRatio.hpp.

Member Data Documentation

◆ value

double PhQ::DimensionlessScalar< double >::value
protectedinherited

Value of this physical quantity.

Definition at line 143 of file DimensionlessScalar.hpp.


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