specieExponent Class Reference

Type for exponents of species in reaction. Can take either integer or scalar value, and powers are optimised in the integer case. More...

Public Member Functions

 specieExponent ()
 Construct null. More...
 
 specieExponent (const label integerExponent)
 Construct from integer. More...
 
 specieExponent (const scalar scalarExponent)
 Construct from scalar. More...
 
 operator scalar () const
 Cast to scalar. More...
 
specieExponentoperator= (const label integerExponent)
 Assign to integer. More...
 
specieExponentoperator= (const scalar scalarExponent)
 Assign to scalar. More...
 
specieExponent operator- () const
 Negate a specie exponent. More...
 

Friends

scalar pow (const scalar x, const specieExponent &e)
 Compute the power of a number to a specie exponent. More...
 
specieExponent operator+ (const specieExponent &a, const specieExponent &b)
 Sum two specie exponents. More...
 
specieExponent operator- (const specieExponent &a, const specieExponent &b)
 Subtract two specie exponents. More...
 
Ostreamoperator<< (Ostream &os, const specieExponent &e)
 Write to output stream. More...
 

Detailed Description

Type for exponents of species in reaction. Can take either integer or scalar value, and powers are optimised in the integer case.

Source files

Definition at line 61 of file specieExponent.H.

Constructor & Destructor Documentation

◆ specieExponent() [1/3]

specieExponent ( )
inline

Construct null.

Definition at line 38 of file specieExponentI.H.

◆ specieExponent() [2/3]

specieExponent ( const label  integerExponent)
inline

Construct from integer.

Definition at line 45 of file specieExponentI.H.

◆ specieExponent() [3/3]

specieExponent ( const scalar  scalarExponent)
inline

Construct from scalar.

Definition at line 52 of file specieExponentI.H.

Member Function Documentation

◆ operator scalar()

operator scalar ( ) const
inline

Cast to scalar.

Definition at line 67 of file specieExponentI.H.

◆ operator=() [1/2]

Foam::specieExponent & operator= ( const label  integerExponent)
inline

Assign to integer.

Definition at line 74 of file specieExponentI.H.

◆ operator=() [2/2]

Foam::specieExponent & operator= ( const scalar  scalarExponent)
inline

Assign to scalar.

Definition at line 81 of file specieExponentI.H.

◆ operator-()

Foam::specieExponent operator- ( ) const
inline

Negate a specie exponent.

Definition at line 87 of file specieExponentI.H.

Friends And Related Function Documentation

◆ pow

scalar pow ( const scalar  x,
const specieExponent e 
)
friend

Compute the power of a number to a specie exponent.

◆ operator+

specieExponent operator+ ( const specieExponent a,
const specieExponent b 
)
friend

Sum two specie exponents.

◆ operator-

specieExponent operator- ( const specieExponent a,
const specieExponent b 
)
friend

Subtract two specie exponents.

◆ operator<<

Ostream& operator<< ( Ostream os,
const specieExponent e 
)
friend

Write to output stream.


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