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

Detailed Description

template<typename V, typename T, typename P, typename N>
class Reaktoro::ChemicalVectorBase< V, T, P, N >

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

See also
ThermoScalar, ThermoVector, ChemicalScalar, ChemicalVector

#include <ChemicalVector.hpp>

Collaboration diagram for Reaktoro::ChemicalVectorBase< V, T, P, N >:

Public Member Functions

 ChemicalVectorBase ()
 Construct a default ChemicalVectorBase instance.
 
 ChemicalVectorBase (Index nspecies)
 Construct a ChemicalVectorBase instance with number of rows equal to given number of species. More...
 
 ChemicalVectorBase (Index nrows, Index nspecies)
 Construct a ChemicalVectorBase instance with given number of rows and species. More...
 
 ChemicalVectorBase (Index nrows, Index nspecies, double val)
 Construct a ChemicalVectorBase instance with given number of rows and species, and a constant value. More...
 
 ChemicalVectorBase (const V &val, const T &ddT, const P &ddP, const N &ddn)
 Construct a ChemicalVectorBase instance with given values and derivatives. More...
 
template<typename VR , typename TR , typename PR , typename NR >
 ChemicalVectorBase (const ChemicalVectorBase< VR, TR, PR, NR > &other)
 Construct a ChemicalVectorBase instance from another.
 
auto size () const -> Index
 Return the number of rows in this ChemicalVectorBase instance.
 
auto resize (Index nrows, Index nspecies) -> void
 Resize this ChemicalVectorBase instance with new number of rows and number of species. More...
 
auto resize (Index nspecies) -> void
 Resize this ChemicalVectorBase instance with number of rows equal the number of species. More...
 
template<typename VR , typename NR >
auto fill (const ChemicalScalarBase< VR, NR > &other) -> void
 Assign a ChemicalScalarBase instance to this.
 
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 , typename NR >
auto operator= (const ChemicalVectorBase< VR, TR, PR, NR > &other) -> ChemicalVectorBase &
 Assign another ChemicalVectorBase instance to this.
 
template<typename VR , typename NR >
auto operator= (const ChemicalScalarBase< VR, NR > &other) -> ChemicalVectorBase &
 Assign a ChemicalScalarBase instance to this.
 
template<typename VR >
auto operator= (const ThermoScalarBase< VR > &other) -> ChemicalVectorBase &
 Assign a ThermoScalarBase instance to this.
 
auto operator= (double other) -> ChemicalVectorBase &
 Assign a scalar to this.
 
template<typename VR , typename TR , typename PR , typename NR >
auto operator+= (const ChemicalVectorBase< VR, TR, PR, NR > &other) -> ChemicalVectorBase &
 Assign-addition of a ChemicalVectorBase instance to this.
 
template<typename VR , typename TR , typename PR >
auto operator+= (const ThermoVectorBase< VR, TR, PR > &other) -> ChemicalVectorBase &
 Assign-addition of a ThermoVectorBase instance to this.
 
template<typename VR >
auto operator+= (const ThermoScalarBase< VR > &other) -> ChemicalVectorBase &
 Assign-addition of a ThermoScalarBase instance to this.
 
auto operator+= (double other) -> ChemicalVectorBase &
 Assign-addition of a scalar to this.
 
template<typename VR , typename TR , typename PR , typename NR >
auto operator-= (const ChemicalVectorBase< VR, TR, PR, NR > &other) -> ChemicalVectorBase &
 Assign-subtraction of a ChemicalVectorBase instance to this.
 
template<typename VR , typename TR , typename PR >
auto operator-= (const ThermoVectorBase< VR, TR, PR > &other) -> ChemicalVectorBase &
 Assign-subtraction of a ThermoVectorBase instance to this.
 
template<typename VR >
auto operator-= (const ThermoScalarBase< VR > &other) -> ChemicalVectorBase &
 Assign-subtraction of a ThermoScalarBase instance to this.
 
auto operator-= (double other) -> ChemicalVectorBase &
 Assign-subtraction of a scalar to this.
 
template<typename VR , typename TR , typename PR , typename NR >
auto operator*= (const ChemicalVectorBase< VR, TR, PR, NR > &other) -> ChemicalVectorBase &
 Assign-multiplication of a ChemicalVectorBase instance to this.
 
auto operator*= (double other) -> ChemicalVectorBase &
 Assign-multiplication of a scalar to this.
 
auto operator/= (double other) -> ChemicalVectorBase &
 Assign-division of a scalar to this.
 
auto operator[] (Index irow) -> ChemicalScalarBase< double &, decltype(ddn.row(irow).transpose())>
 Return a ChemicalScalarBase with reference to the chemical scalar in a given row.
 
auto operator[] (Index irow) const -> ChemicalScalarBase< const double &, decltype(ddn.row(irow).transpose())>
 Return a ChemicalScalarBase with const reference to the chemical scalar in a given row.
 
 operator Vector () const
 Explicitly converts this ChemicalVector instance into a Vector.
 

Public Attributes

val
 The vector of chemical scalars.
 
ddT
 The vector of partial temperature derivatives of the chemical scalars.
 
ddP
 The vector of partial pressure derivatives of the chemical scalars.
 
ddn
 The matrix of partial mole derivatives of the chemical scalars.
 

Constructor & Destructor Documentation

template<typename V, typename T, typename P, typename N>
Reaktoro::ChemicalVectorBase< V, T, P, N >::ChemicalVectorBase ( Index  nspecies)
inlineexplicit

Construct a ChemicalVectorBase instance with number of rows equal to given number of species.

Parameters
nspeciesThe number of nspecies in the chemical vector.
template<typename V, typename T, typename P, typename N>
Reaktoro::ChemicalVectorBase< V, T, P, N >::ChemicalVectorBase ( Index  nrows,
Index  nspecies 
)
inline

Construct a ChemicalVectorBase instance with given number of rows and species.

Parameters
nrowsThe number of rows in the chemical vector
nspeciesThe number of species for the molar derivatives
template<typename V, typename T, typename P, typename N>
Reaktoro::ChemicalVectorBase< V, T, P, N >::ChemicalVectorBase ( Index  nrows,
Index  nspecies,
double  val 
)
inline

Construct a ChemicalVectorBase instance with given number of rows and species, and a constant value.

Parameters
nrowsThe number of rows in the chemical vector
nspeciesThe number of species for the molar derivatives
valThe constant value
template<typename V, typename T, typename P, typename N>
Reaktoro::ChemicalVectorBase< V, T, P, N >::ChemicalVectorBase ( const V &  val,
const T &  ddT,
const P &  ddP,
const N &  ddn 
)
inline

Construct a ChemicalVectorBase instance with given values and derivatives.

Parameters
valThe vector of values of the chemical scalars
ddTThe vector of partial temperature derivatives of the chemical scalars
ddPThe vector of partial pressure derivatives of the chemical scalars
ddnThe matrix of partial mole derivatives of the chemical scalars

Member Function Documentation

template<typename V, typename T, typename P, typename N>
auto Reaktoro::ChemicalVectorBase< V, T, P, N >::resize ( Index  nrows,
Index  nspecies 
) -> void
inline

Resize this ChemicalVectorBase instance with new number of rows and number of species.

Parameters
nrowsThe new number of rows
nspeciesThe new number of species for the molar derivatives
template<typename V, typename T, typename P, typename N>
auto Reaktoro::ChemicalVectorBase< V, T, P, N >::resize ( Index  nspecies) -> void
inline

Resize this ChemicalVectorBase instance with number of rows equal the number of species.

Parameters
nspeciesThe new number of species for the molar derivatives

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