Reaktoro  v2.0.0 A unified framework for modeling chemically reactive systems
ChemicalSystem Class Reference

The class used to represent a chemical system and its attributes and properties. More...

#include <ChemicalSystem.hpp>

## Public Member Functions

ChemicalSystem ()
Construct a default uninitialized ChemicalSystem instance.

ChemicalSystem (const Phases &phases)
Construct a ChemicalSystem instance with given phases.

ChemicalSystem (const Database &database, const Vec< Phase > &phases)
Construct a ChemicalSystem instance with given database and phases.

template<typename... GenericPhases>
ChemicalSystem (const Database &database, const GenericPhases &... genericPhases)
Construct a ChemicalSystem instance with given database and one or more generic phases.

auto database () const -> const Database &
Return the database used to construct the chemical system.

auto element (Index index) const -> const Element &
Return the element in the system with given index.

auto elements () const -> const ElementList &
Return the list of elements in the system.

auto species (Index index) const -> const Species &
Return the species in the system with given index.

auto species () const -> const SpeciesList &
Return the list of species in the system.

auto phase (Index index) const -> const Phase &
Return the phase in the system with given index.

auto phases () const -> const PhaseList &
Return the list of phases in the system.

auto formulaMatrix () const -> MatrixXdConstRef
Return the formula matrix of the system. More...

auto formulaMatrixElements () const -> MatrixXdConstRef
Return the top rows of the formula matrix corresponding to elements.

auto formulaMatrixCharge () const -> MatrixXdConstRef
Return the bottom row of the formula matrix corresponding to electric charge.

## Detailed Description

The class used to represent a chemical system and its attributes and properties.

Species, Phase

## ◆ formulaMatrix()

 auto formulaMatrix ( ) const -> MatrixXdConstRef

Return the formula matrix of the system.

The formula matrix is defined as the matrix whose entry *(j, i)* is given by the coefficient of the *j*th element in the *i*th species. The last row of this matrix contains the electric charge of each species.

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