Reaktoro
A unified framework for modeling chemically reactive systems
ThermoVectorBase< V, T, P > Class Template Reference

A template base class to represent a vector of thermodynamic scalars and their partial derivatives. More...

#include <ThermoVector.hpp>

Collaboration diagram for ThermoVectorBase< V, T, P >:
[legend]

Public Member Functions

 ThermoVectorBase ()
 Construct a default ThermoVectorBase instance.
 
 ThermoVectorBase (Index nrows)
 Construct a ThermoVectorBase instance with given number of rows. More...
 
 ThermoVectorBase (Index nrows, double val)
 Construct a ThermoVectorBase instance with given number of rows and value. More...
 
 ThermoVectorBase (const V &val, const T &ddT, const P &ddP)
 Construct a ChemicalVectorBase instance with given values and derivatives. More...
 
template<typename VR , typename TR , typename PR >
 ThermoVectorBase (ThermoVectorBase< VR, TR, PR > &other)
 Construct a ChemicalVectorBase instance from another.
 
template<typename VR , typename TR , typename PR >
 ThermoVectorBase (const ThermoVectorBase< VR, TR, PR > &other)
 Construct a ChemicalVectorBase instance from another.
 
auto size () const -> Index
 Return the number of rows in this ChemicalVectorBase instance.
 
auto resize (Index nrows) -> void
 Resize this ChemicalVectorBase instance with new number of rows. More...
 
template<typename VR >
auto fill (const ThermoScalarBase< VR > &other) -> void
 Assign a ThermoScalarBase instance to this.
 
auto fill (double value) -> void
 Assign a scalarsto this.
 
template<typename VR , typename TR , typename PR >
auto operator= (const ThermoVectorBase< VR, TR, PR > &other) -> ThermoVectorBase &
 Assign a ThermoVectorBase instance to this ThermoVectorBase instance.
 
template<typename VR >
auto operator= (const ThermoScalarBase< VR > &other) -> ThermoVectorBase &
 Assign a ThermoScalarBase instance to this ThermoVectorBase instance.
 
auto operator= (double other) -> ThermoVectorBase &
 Assign a scalar to this ThermoVectorBase instance.
 
template<typename VR , typename TR , typename PR >
auto operator+= (const ThermoVectorBase< VR, TR, PR > &other) -> ThermoVectorBase &
 Assign-addition of a ThermoVectorBase instance.
 
template<typename VR >
auto operator+= (const ThermoScalarBase< VR > &other) -> ThermoVectorBase &
 Assign-addition of a ThermoScalarBase instance.
 
auto operator+= (double scalar) -> ThermoVectorBase &
 Assign-addition of a scalar.
 
template<typename VR , typename TR , typename PR >
auto operator-= (const ThermoVectorBase< VR, TR, PR > &other) -> ThermoVectorBase &
 Assign-subtraction of a ThermoVectorBase instance.
 
template<typename VR >
auto operator-= (const ThermoScalarBase< VR > &other) -> ThermoVectorBase &
 Assign-subtraction of a ThermoVectorBase instance.
 
auto operator-= (double other) -> ThermoVectorBase &
 Assign-subtraction of a scalar.
 
template<typename VR , typename TR , typename PR >
auto operator*= (const ThermoVectorBase< VR, TR, PR > &other) -> ThermoVectorBase &
 Assign-multiplication of a ThermoVectorBase instance.
 
auto operator*= (double scalar) -> ThermoVectorBase &
 Assign-multiplication of a ThermoVectorBase instance.
 
auto operator/= (double scalar) -> ThermoVectorBase &
 Assign-division of a ThermoVectorBase instance.
 
auto operator[] (Index irow) -> ThermoScalarBase< decltype(val[irow])>
 Return a ChemicalScalarBase with reference to the thermo scalar in a given row.
 
auto operator[] (Index irow) const -> ThermoScalarBase< decltype(val[irow])>
 Return a ChemicalScalarBase with const reference to the thermo scalar in a given row.
 
auto view (Index irow, Index nrows) -> ThermoVectorRef
 Return a view of an interval of the ThermoVectorBase instance. More...
 
auto view (Index irow, Index nrows) const -> ThermoVectorConstRef
 Return a view of an interval of the ThermoVectorBase instance. More...
 
 operator Vector () const
 Explicitly converts this ThermoVector instance into a Vector.
 

Public Attributes

val
 The vector of values of the thermodynamic properties.
 
ddT
 The vector of partial temperature derivatives of the thermodynamic properties.
 
ddP
 The vector of partial pressure derivatives of the thermodynamic properties.
 

Detailed Description

template<typename V, typename T, typename P>
class Reaktoro::ThermoVectorBase< V, T, P >

A template base class to represent a vector of thermodynamic scalars and their partial derivatives.

See also
ThermoScalar, ThermoVector, ChemicalScalar, ChemicalVector

Constructor & Destructor Documentation

◆ ThermoVectorBase() [1/3]

ThermoVectorBase ( Index  nrows)
inlineexplicit

Construct a ThermoVectorBase instance with given number of rows.

Parameters
nrowsThe number of rows in the thermo vector

◆ ThermoVectorBase() [2/3]

ThermoVectorBase ( Index  nrows,
double  val 
)
inline

Construct a ThermoVectorBase instance with given number of rows and value.

Parameters
nrowsThe number of rows in the thermo vector
valThe constant value

◆ ThermoVectorBase() [3/3]

ThermoVectorBase ( const V &  val,
const T &  ddT,
const P &  ddP 
)
inline

Construct a ChemicalVectorBase instance with given values and derivatives.

Parameters
valThe vector of values of the thermo scalars
ddTThe vector of partial temperature derivatives of the thermo scalars
ddPThe vector of partial pressure derivatives of the thermo scalars

Member Function Documentation

◆ resize()

auto resize ( Index  nrows) -> void
inline

Resize this ChemicalVectorBase instance with new number of rows.

Parameters
nrowsThe new number of rows

◆ view() [1/2]

auto view ( Index  irow,
Index  nrows 
) -> ThermoVectorRef
inline

Return a view of an interval of the ThermoVectorBase instance.

Parameters
irowThe index of the row starting the view.
nrowsThe number of rows in the view.

◆ view() [2/2]

auto view ( Index  irow,
Index  nrows 
) const -> ThermoVectorConstRef
inline

Return a view of an interval of the ThermoVectorBase instance.

Parameters
irowThe index of the row starting the view.
nrowsThe number of rows in the view.

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